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

Method GetMethodByDecl

sdk/angelscript/source/as_objecttype.cpp:307–331  ·  view source on GitHub ↗

interface

Source from the content-addressed store, hash-verified

305
306// interface
307asIScriptFunction *asCObjectType::GetMethodByDecl(const char *decl, bool getVirtual) const
308{
309 if( methods.GetLength() == 0 )
310 return 0;
311
312 // Get the module from one of the methods, but it will only be
313 // used to allow the parsing of types not already known by the object.
314 // It is possible for object types to be orphaned, e.g. by discarding
315 // the module that created it. In this case it is still possible to
316 // find the methods, but any type not known by the object will result in
317 // an invalid declaration.
318 asCModule *mod = engine->scriptFunctions[methods[0]]->module;
319 int id = engine->GetMethodIdByDecl(this, decl, mod);
320 if( id <= 0 )
321 return 0;
322
323 if( !getVirtual )
324 {
325 asCScriptFunction *func = engine->scriptFunctions[id];
326 if( func && func->funcType == asFUNC_VIRTUAL )
327 return virtualFunctionTable[func->vfTableIdx];
328 }
329
330 return engine->scriptFunctions[id];
331}
332
333// interface
334asUINT asCObjectType::GetPropertyCount() const

Callers 15

GetControllerScriptMethod · 0.45
SetValueMethod · 0.45
CopyBufferMethod · 0.45
BuildMethod · 0.45
Test3Function · 0.45
TestFunction · 0.45
callMethodOfBarFunction · 0.45
TestFunction · 0.45
test_exception.cppFile · 0.45
TestFunction · 0.45
TestScriptsFunction · 0.45
TestFunction · 0.45

Calls 2

GetMethodIdByDeclMethod · 0.80
GetLengthMethod · 0.45

Tested by 13

Test3Function · 0.36
TestFunction · 0.36
callMethodOfBarFunction · 0.36
TestFunction · 0.36
TestFunction · 0.36
TestScriptsFunction · 0.36
TestFunction · 0.36
UpdateMethod · 0.36
TestFunction · 0.36
TestFunction · 0.36
CallMeMethod · 0.36
TestModuleFunction · 0.36