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

Method GetAddressOfProperty

sdk/angelscript/source/as_scriptobject.cpp:796–808  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

794}
795
796void *asCScriptObject::GetAddressOfProperty(asUINT prop)
797{
798 if( prop >= objType->properties.GetLength() )
799 return 0;
800
801 // Objects are stored by reference, so this must be dereferenced
802 asCDataType *dt = &objType->properties[prop]->type;
803 if( dt->IsObject() && !dt->IsObjectHandle() &&
804 (dt->IsReference() || dt->GetTypeInfo()->flags & asOBJ_REF) )
805 return *(void**)(((char*)this) + objType->properties[prop]->byteOffset);
806
807 return (void*)(((char*)this) + objType->properties[prop]->byteOffset);
808}
809
810void asCScriptObject::EnumReferences(asIScriptEngine *engine)
811{

Callers 12

ifFunction · 0.80
StoreMethod · 0.80
RestoreMethod · 0.80
TestFunction · 0.80
TestFunction · 0.80
TestFunction · 0.80
TestFunction · 0.80
TestFunction · 0.80
TestFunction · 0.80
TestFunction · 0.80

Calls 5

IsObjectMethod · 0.80
IsObjectHandleMethod · 0.80
GetTypeInfoMethod · 0.80
GetLengthMethod · 0.45
IsReferenceMethod · 0.45

Tested by 7

TestFunction · 0.64
TestFunction · 0.64
TestFunction · 0.64
TestFunction · 0.64
TestFunction · 0.64
TestFunction · 0.64
TestFunction · 0.64