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

Method GetGlobalVarDeclaration

sdk/angelscript/source/as_module.cpp:1087–1100  ·  view source on GitHub ↗

interface

Source from the content-addressed store, hash-verified

1085
1086// interface
1087const char *asCModule::GetGlobalVarDeclaration(asUINT index, bool includeNamespace) const
1088{
1089 const asCGlobalProperty *prop = m_scriptGlobals.Get(index);
1090 if (!prop) return 0;
1091
1092 asCString *tempString = &asCThreadManager::GetLocalData()->string;
1093 *tempString = prop->type.Format(m_defaultNamespace);
1094 *tempString += " ";
1095 if( includeNamespace && prop->nameSpace->name != "" )
1096 *tempString += prop->nameSpace->name + "::";
1097 *tempString += prop->name;
1098
1099 return tempString->AddressOf();
1100}
1101
1102// interface
1103int asCModule::GetGlobalVar(asUINT index, const char **out_name, const char **out_nameSpace, int *out_typeId, bool *out_isConst) const

Callers 6

ListVariablesFunction · 0.80
ListGlobalVariablesMethod · 0.80
DumpModuleFunction · 0.80
TestEnumGlobVarFunction · 0.80
TestFunction · 0.80
test_namespace.cppFile · 0.80

Calls 3

GetMethod · 0.45
FormatMethod · 0.45
AddressOfMethod · 0.45

Tested by 3

DumpModuleFunction · 0.64
TestEnumGlobVarFunction · 0.64
TestFunction · 0.64