MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / setClassNamespace

Method setClassNamespace

Engine/source/console/simObject.cpp:2063–2088  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2061//-----------------------------------------------------------------------------
2062
2063void SimObject::setClassNamespace( const char *classNamespace )
2064{
2065 StringTableEntry oldClassNamespace = mClassName;
2066 StringTableEntry newClassNamespace = StringTable->insert( classNamespace );
2067
2068 if( oldClassNamespace == newClassNamespace )
2069 return;
2070
2071 if( isProperlyAdded() )
2072 unlinkNamespaces();
2073
2074 mClassName = newClassNamespace;
2075
2076 if( isProperlyAdded() )
2077 {
2078 linkNamespaces();
2079
2080 // Restore old namespace setup if linkage failed.
2081
2082 if( mClassName != newClassNamespace )
2083 {
2084 mClassName = oldClassNamespace;
2085 linkNamespaces();
2086 }
2087 }
2088}
2089
2090//-----------------------------------------------------------------------------
2091

Callers 4

simObject.cppFile · 0.80
setClassMethod · 0.80
loadModuleGroupMethod · 0.80
loadModuleExplicitMethod · 0.80

Calls 3

unlinkNamespacesFunction · 0.85
linkNamespacesFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected