MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / createInstanceByName

Method createInstanceByName

src/Base/Type.cpp:94–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94void* Type::createInstanceByName(std::string_view typeName, bool loadModule)
95{
96 // if not already, load the module
97 if (loadModule) {
98 importModule(typeName);
99 }
100
101 // now the type should be in the type map
102 const Type type = fromName(typeName);
103 // let createInstance handle isBad check
104 return type.createInstance();
105}
106
107void Type::importModule(std::string_view typeName)
108{

Callers

nothing calls this directly

Calls 1

createInstanceMethod · 0.45

Tested by

no test coverage detected