App: Initialize StringHasher and StringID classes

This commit is contained in:
marioalexis
2023-08-10 11:43:06 -03:00
parent b7f149864b
commit 818a4f1cc8

View File

@@ -114,6 +114,8 @@
#include "PropertyFile.h"
#include "PropertyLinks.h"
#include "PropertyPythonObject.h"
#include "StringHasherPy.h"
#include "StringIDPy.h"
#include "TextDocument.h"
#include "Transactions.h"
#include "VRMLObject.h"
@@ -311,6 +313,9 @@ void Application::setupPythonTypes()
Base::Interpreter().addType(&App::MaterialPy::Type, pAppModule, "Material");
Base::Interpreter().addType(&App::MetadataPy::Type, pAppModule, "Metadata");
Base::Interpreter().addType(&App::StringHasherPy::Type, pAppModule, "StringHasher");
Base::Interpreter().addType(&App::StringIDPy::Type, pAppModule, "StringID");
// Add document types
Base::Interpreter().addType(&App::PropertyContainerPy::Type, pAppModule, "PropertyContainer");
Base::Interpreter().addType(&App::ExtensionContainerPy::Type, pAppModule, "ExtensionContainer");
@@ -2109,6 +2114,10 @@ void Application::initTypes()
App::RangeExpression ::init();
App::PyObjectExpression ::init();
// Topological naming classes
App::StringHasher ::init();
App::StringID ::init();
// register transaction type
new App::TransactionProducer<TransactionDocumentObject>
(DocumentObject::getClassTypeId());