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

Method AddNameSpace

sdk/angelscript/source/as_scriptengine.cpp:1169–1187  ·  view source on GitHub ↗

internal

Source from the content-addressed store, hash-verified

1167
1168// internal
1169asSNameSpace *asCScriptEngine::AddNameSpace(const char *name)
1170{
1171 // First check if it doesn't exist already
1172 asSNameSpace *ns = FindNameSpace(name);
1173 if( ns ) return ns;
1174
1175 ns = asNEW(asSNameSpace);
1176 if( ns == 0 )
1177 {
1178 // Out of memory
1179 return 0;
1180 }
1181 ns->name = name;
1182
1183 // TODO: thread-safety: This can potentially be called from multiple threads so it must be protected with critical section
1184 nameSpaces.PushLast(ns);
1185
1186 return ns;
1187}
1188
1189// internal
1190asSNameSpace *asCScriptEngine::FindNameSpace(const char *name) const

Callers 10

ReadFunctionSignatureMethod · 0.80
ReadTypeDeclarationMethod · 0.80
ReadGlobalPropertyMethod · 0.80
ReadTypeInfoMethod · 0.80
ReadUsedGlobalPropsMethod · 0.80
SetDefaultNamespaceMethod · 0.80

Calls 1

PushLastMethod · 0.80

Tested by

no test coverage detected