Honeycomb
0.1
Component-Model Framework
|
Factory method to generate type-safe enumeration classes with runtime reflection. More...
Classes | |
struct | honey::EnumError |
class | honey::EnumElem |
Base class of all generated enum classes. A single element in the enumeration. See Enumeration Classes. More... | |
struct | honey::EnumInfo_< EnumType >::Elem |
class | honey::EnumInfo_< EnumType > |
Run-time info about an enum class. Contains a list of elements and maps for element lookups. See Enumeration Classes for more info and examples. More... | |
Macros | |
#define | ENUM(Base, Class) |
Enum class factory method. See Enumeration Classes for more info. More... | |
Factory method to generate type-safe enumeration classes with runtime reflection.
To generate an enum class, define ENUM_LIST and call ENUM():
#define ENUM_LIST(e,_) e(_, elem_name) e(_, elem_name, elem_string_id, elem_value) ENUM(BaseClass, EnumClass); #undef ENUM_LIST
BaseClass is the name of the enclosing class scope, which will be used to create the enum's classId.
EnumClass is the name of the enum class that will be generated.
If there is no base class then leave it empty. If the base class parameter has a comma then it must be bracketed.
Example:
#define ENUM | ( | Base, | |
Class | |||
) |
Enum class factory method. See Enumeration Classes for more info.