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

Method GetGlobalVar

sdk/angelscript/source/as_module.cpp:1103–1118  ·  view source on GitHub ↗

interface

Source from the content-addressed store, hash-verified

1101
1102// interface
1103int asCModule::GetGlobalVar(asUINT index, const char **out_name, const char **out_nameSpace, int *out_typeId, bool *out_isConst) const
1104{
1105 const asCGlobalProperty *prop = m_scriptGlobals.Get(index);
1106 if (!prop) return asINVALID_ARG;
1107
1108 if( out_name )
1109 *out_name = prop->name.AddressOf();
1110 if( out_nameSpace )
1111 *out_nameSpace = prop->nameSpace->name.AddressOf();
1112 if( out_typeId )
1113 *out_typeId = m_engine->GetTypeIdFromDataType(prop->type);
1114 if( out_isConst )
1115 *out_isConst = prop->type.IsReadOnly();
1116
1117 return asSUCCESS;
1118}
1119
1120// interface
1121asUINT asCModule::GetObjectTypeCount() const

Callers 8

PrintValueMethod · 0.80
ListGlobalVariablesMethod · 0.80
StoreMethod · 0.80
RestoreMethod · 0.80
TestConditionFunction · 0.80
TestFunction · 0.80
TestFunction · 0.80
TestEnumGlobVarFunction · 0.80

Calls 4

GetTypeIdFromDataTypeMethod · 0.80
GetMethod · 0.45
AddressOfMethod · 0.45
IsReadOnlyMethod · 0.45

Tested by 4

TestConditionFunction · 0.64
TestFunction · 0.64
TestFunction · 0.64
TestEnumGlobVarFunction · 0.64