How does one enumerate the names of all globally registered Enums?
for (asUINT i = 0, n = p_engine->GetEnumCount(); i < n; ++i)
{
int enumTypeId;
p_engine->GetEnumByIndex(i, &enumTypeId);
// Get Name ??
}
How does one enumerate the names of all globally registered Enums?
for (asUINT i = 0, n = p_engine->GetEnumCount(); i < n; ++i)
{
int enumTypeId;
p_engine->GetEnumByIndex(i, &enumTypeId);
// Get Name ??
}
The name of the enum type is returned by GetEnumByIndex. Alternatively it can be obtained with GetTypeDeclaration. The name/value of each enum in the enum type is obtained with GetEnumValueByIndex.
I've documented this here: Manual: Reflection
Regards,
Andreas
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game