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

Method GetMethodByName

sdk/angelscript/source/as_objecttype.cpp:280–304  ·  view source on GitHub ↗

interface

Source from the content-addressed store, hash-verified

278
279// interface
280asIScriptFunction *asCObjectType::GetMethodByName(const char *in_name, bool in_getVirtual) const
281{
282 int id = -1;
283 for( asUINT n = 0; n < methods.GetLength(); n++ )
284 {
285 if( engine->scriptFunctions[methods[n]]->name == in_name )
286 {
287 if( id == -1 )
288 id = methods[n];
289 else
290 return 0;
291 }
292 }
293
294 if( id == -1 ) return 0;
295
296 asCScriptFunction *func = engine->scriptFunctions[id];
297 if( !in_getVirtual )
298 {
299 if( func && func->funcType == asFUNC_VIRTUAL )
300 return virtualFunctionTable[func->vfTableIdx];
301 }
302
303 return func;
304}
305
306// interface
307asIScriptFunction *asCObjectType::GetMethodByDecl(const char *decl, bool getVirtual) const

Callers 12

BuildMethod · 0.45
TestFunction · 0.45
test_debug.cppFile · 0.45
TestFunction · 0.45
TestFunction · 0.45
TestFunction · 0.45
printFunction · 0.45
TestFunction · 0.45
TestFunction · 0.45
TestFunction · 0.45
TestFunction · 0.45

Calls 1

GetLengthMethod · 0.45

Tested by 9

TestFunction · 0.36
TestFunction · 0.36
TestFunction · 0.36
TestFunction · 0.36
printFunction · 0.36
TestFunction · 0.36
TestFunction · 0.36
TestFunction · 0.36
TestFunction · 0.36