Enumerate names of Enum

Started by
1 comment, last by Jason Goepel 10 years, 5 months ago

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 ??
}
Advertisement

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

Silly me. For some reason I was completely ignoring the return value. Thanks for answering my silly question.

This topic is closed to new replies.

Advertisement