MCPcopy Create free account
hub / github.com/anjo76/angelscript / GetParentNameSpace

Method GetParentNameSpace

sdk/angelscript/source/as_scriptengine.cpp:6928–6942  ·  view source on GitHub ↗

internal

Source from the content-addressed store, hash-verified

6926
6927// internal
6928asSNameSpace *asCScriptEngine::GetParentNameSpace(asSNameSpace *ns) const
6929{
6930 if( ns == 0 ) return 0;
6931 if( ns == nameSpaces[0] ) return 0;
6932
6933 asCString scope = ns->name;
6934 int pos = scope.FindLast("::");
6935 if( pos >= 0 )
6936 {
6937 scope = scope.SubString(0, pos);
6938 return FindNameSpace(scope.AddressOf());
6939 }
6940
6941 return nameSpaces[0];
6942}
6943
6944END_AS_NAMESPACE
6945

Callers 11

SymbolLookupMethod · 0.80
GetNameSpaceByStringMethod · 0.80
GetFunctionByNameMethod · 0.80
GetFunctionByDeclMethod · 0.80
GetTypeInfoByNameMethod · 0.80

Calls 3

FindLastMethod · 0.80
SubStringMethod · 0.80
AddressOfMethod · 0.45

Tested by

no test coverage detected