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

Method find

Engine/source/console/consoleInternal.cpp:944–965  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

942}
943
944Namespace *Namespace::find(StringTableEntry name, StringTableEntry package)
945{
946 if (name == NULL && package == NULL)
947 return mGlobalNamespace;
948
949 auto pair = std::make_pair(name, package);
950 auto pos = gNamespaceCache.find(pair);
951 if (pos != gNamespaceCache.end())
952 return pos->second;
953
954 Namespace *ret = (Namespace *)mAllocator.alloc(sizeof(Namespace));
955 constructInPlace(ret);
956 ret->mPackage = package;
957 ret->mName = name;
958 ret->mNext = mNamespaceList;
959 mNamespaceList = ret;
960
961 // insert into namespace cache.
962 gNamespaceCache[pair] = ret;
963
964 return ret;
965}
966
967bool Namespace::unlinkClass(Namespace *parent)
968{

Callers 1

getBriefDescriptionMethod · 0.45

Calls 3

constructInPlaceFunction · 0.85
endMethod · 0.45
allocMethod · 0.45

Tested by

no test coverage detected