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

Method GetGlobalPropertyByIndex

sdk/angelscript/source/as_scriptengine.cpp:2806–2829  ·  view source on GitHub ↗

interface TODO: If the typeId ever encodes the const flag, then the isConst parameter should be removed

Source from the content-addressed store, hash-verified

2804// interface
2805// TODO: If the typeId ever encodes the const flag, then the isConst parameter should be removed
2806int asCScriptEngine::GetGlobalPropertyByIndex(asUINT index, const char **name, const char **nameSpace, int *typeId, bool *isConst, const char **configGroup, void **pointer, asDWORD *accessMask) const
2807{
2808 const asCGlobalProperty *prop = registeredGlobalProps.Get(index);
2809 if( !prop )
2810 return asINVALID_ARG;
2811
2812 if( name ) *name = prop->name.AddressOf();
2813 if( nameSpace ) *nameSpace = prop->nameSpace->name.AddressOf();
2814 if( typeId ) *typeId = GetTypeIdFromDataType(prop->type);
2815 if( isConst ) *isConst = prop->type.IsReadOnly();
2816 if( pointer ) *pointer = prop->GetRegisteredAddress();
2817 if( accessMask ) *accessMask = prop->accessMask;
2818
2819 if( configGroup )
2820 {
2821 asCConfigGroup *group = FindConfigGroupForGlobalVar(index);
2822 if( group )
2823 *configGroup = group->groupName.AddressOf();
2824 else
2825 *configGroup = 0;
2826 }
2827
2828 return asSUCCESS;
2829}
2830
2831// interface
2832int asCScriptEngine::GetGlobalPropertyIndexByName(const char *in_name) const

Callers 4

ListVariablesFunction · 0.80
WriteConfigToStreamFunction · 0.80
DumpModuleFunction · 0.80
TestFunction · 0.80

Calls 4

GetRegisteredAddressMethod · 0.80
GetMethod · 0.45
AddressOfMethod · 0.45
IsReadOnlyMethod · 0.45

Tested by 2

DumpModuleFunction · 0.64
TestFunction · 0.64