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

Method GetBehaviourCount

sdk/angelscript/source/as_objecttype.cpp:395–417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

393}
394
395asUINT asCObjectType::GetBehaviourCount() const
396{
397 // Count the number of behaviours (except factory functions)
398 asUINT count = 0;
399
400 if( beh.destruct ) count++;
401 if( beh.addref ) count++;
402 if( beh.release ) count++;
403 if( beh.gcGetRefCount ) count++;
404 if( beh.gcSetFlag ) count++;
405 if( beh.gcGetFlag ) count++;
406 if( beh.gcEnumReferences ) count++;
407 if( beh.gcReleaseAllReferences ) count++;
408 if( beh.templateCallback ) count++;
409 if( beh.listFactory ) count++;
410 if( beh.getWeakRefFlag ) count++;
411
412 // For reference types, the factories are also stored in the constructor
413 // list, so it is sufficient to enumerate only those
414 count += (asUINT)beh.constructors.GetLength();
415
416 return count;
417}
418
419asIScriptFunction *asCObjectType::GetBehaviourByIndex(asUINT index, asEBehaviours *outBehaviour) const
420{

Callers 8

WriteMethod · 0.45
test_debug.cppFile · 0.45
TestFunction · 0.45
TestRefScopedFunction · 0.45
DumpObjectTypeFunction · 0.45

Calls 1

GetLengthMethod · 0.45

Tested by 3

TestFunction · 0.36
TestRefScopedFunction · 0.36
DumpObjectTypeFunction · 0.36