AUI Framework
develop
Cross-platform base for C++ UI apps
|
Enum trait to transform enum to name, name to enum, list all enums and vise versa. More...
#include <AUI/Reflect/AEnumerate.h>
Classes | |
struct | Values |
Static Public Member Functions | |
template<enum_t value> | |
static AString | valueName () |
Maps compile-time specified enum value to name. | |
static const AMap< AString, enum_t > & | nameToValueMap () |
Get runtime name to enum value mapping. | |
static const AMap< enum_t, AString, enum_less > & | valueToNameMap () |
Map runtime enum value to name. | |
static enum_t | byName (const AString &name) |
Map runtime name to enum value. Transforms name to uppercase as a fallback. Throws an exception if no such value. | |
static const AString & | toName (enum_t value) |
Map runtime enum value to name. Throws an exception if no such value. | |
Enum trait to transform enum to name, name to enum, list all enums and vise versa.
|
static |
Get runtime name to enum value mapping.
|
inlinestatic |
Maps compile-time specified enum value to name.
Use names()[enumValue] for mapping runtime values.
This function's behaviour can be reimplemented by aui::enumerate::ValueToName trait.