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

Method setClassNamespace

Engine/source/console/simObject.cpp:1917–1942  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1915//-----------------------------------------------------------------------------
1916
1917void SimObject::setClassNamespace( const char *classNamespace )
1918{
1919 StringTableEntry oldClassNamespace = mClassName;
1920 StringTableEntry newClassNamespace = StringTable->insert( classNamespace );
1921
1922 if( oldClassNamespace == newClassNamespace )
1923 return;
1924
1925 if( isProperlyAdded() )
1926 unlinkNamespaces();
1927
1928 mClassName = newClassNamespace;
1929
1930 if( isProperlyAdded() )
1931 {
1932 linkNamespaces();
1933
1934 // Restore old namespace setup if linkage failed.
1935
1936 if( mClassName != newClassNamespace )
1937 {
1938 mClassName = oldClassNamespace;
1939 linkNamespaces();
1940 }
1941 }
1942}
1943
1944//-----------------------------------------------------------------------------
1945

Callers 2

simObject.cppFile · 0.80
setClassMethod · 0.80

Calls 3

unlinkNamespacesFunction · 0.85
linkNamespacesFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected