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

Method GetFunctionDescriptions

sdk/angelscript/source/as_builder.cpp:5894–5928  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5892}
5893
5894void asCBuilder::GetFunctionDescriptions(const char *name, asCArray<int> &funcs, asSNameSpace *ns)
5895{
5896 asUINT n;
5897
5898 // Get the script declared global functions
5899 const asCArray<unsigned int> &idxs = module->m_globalFunctions.GetIndexes(ns, name);
5900 for( n = 0; n < idxs.GetLength(); n++ )
5901 {
5902 const asCScriptFunction *f = module->m_globalFunctions.Get(idxs[n]);
5903 asASSERT( f->objectType == 0 );
5904 funcs.PushLast(f->id);
5905 }
5906
5907 // Add the imported functions
5908 // TODO: optimize: Linear search: This is probably not that critial. Also bindInformation will probably be removed in near future
5909 for( n = 0; n < module->m_bindInformations.GetLength(); n++ )
5910 {
5911 if( module->m_bindInformations[n]->importedFunctionSignature->name == name &&
5912 module->m_bindInformations[n]->importedFunctionSignature->nameSpace == ns )
5913 funcs.PushLast(module->m_bindInformations[n]->importedFunctionSignature->id);
5914 }
5915
5916 // Add the registered global functions
5917 const asCArray<unsigned int> &idxs2 = engine->registeredGlobalFuncs.GetIndexes(ns, name);
5918 for( n = 0; n < idxs2.GetLength(); n++ )
5919 {
5920 asCScriptFunction *f = engine->registeredGlobalFuncs.Get(idxs2[n]);
5921
5922 // Verify if the module has access to the function
5923 if( module->m_accessMask & f->accessMask )
5924 {
5925 funcs.PushLast(f->id);
5926 }
5927 }
5928}
5929
5930// scope is only informed when looking for a base class' method
5931void asCBuilder::GetObjectMethodDescriptions(const char *name, asCObjectType *objectType, asCArray<int> &methods, bool objIsConst, const asCString &scope, asCScriptNode *errNode, asCScriptCode *script)

Callers 8

DetermineSingleFuncMethod · 0.80
ImplicitConvObjectRefMethod · 0.80
SymbolLookupMethod · 0.80
CompileVariableAccessMethod · 0.80
CompileConstructCallMethod · 0.80
CompileFunctionCallMethod · 0.80
FindPropertyAccessorMethod · 0.80

Calls 3

PushLastMethod · 0.80
GetLengthMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected