ponder
3.2
C++ reflection library
|
Wrapper to manipulate enumerated values in the Ponder system. More...
#include <enumobject.hpp>
Public Member Functions | |
template<typename T > | |
EnumObject (T value, typename std::enable_if< std::is_enum< T >::value >::type *=0) | |
Construct the enum object from an enumerated value. More... | |
long | value () const |
Get the value of the enum object. More... | |
template<typename E > | |
E | value () const |
Get the value of the enum class object. More... | |
IdReturn | name () const |
Get the name of the enum object. More... | |
const Enum & | getEnum () const |
Retrieve the metaenum of the stored enum object. More... | |
bool | operator== (const EnumObject &other) const |
Operator == to compare equality between two enum objects. More... | |
bool | operator< (const EnumObject &other) const |
Operator < to compare two enum objects. More... | |
Wrapper to manipulate enumerated values in the Ponder system.
ponder::EnumObject is an abstract representation of enum values, and supports conversions from strings and integers.
ponder::EnumObject::EnumObject | ( | T | value, |
typename std::enable_if< std::is_enum< T >::value >::type * | = 0 |
||
) |
Construct the enum object from an enumerated value.
value | Value to store in the enum object |
const Enum& ponder::EnumObject::getEnum | ( | ) | const |
Retrieve the metaenum of the stored enum object.
IdReturn ponder::EnumObject::name | ( | ) | const |
Get the name of the enum object.
bool ponder::EnumObject::operator< | ( | const EnumObject & | other | ) | const |
Operator < to compare two enum objects.
other | Enum object to compare with this |
bool ponder::EnumObject::operator== | ( | const EnumObject & | other | ) | const |
Operator == to compare equality between two enum objects.
Two enum objects are equal if their metaenums and values are both equal
other | Enum object to compare with this |
long ponder::EnumObject::value | ( | ) | const |
Get the value of the enum object.
E ponder::EnumObject::value | ( | ) | const |
Get the value of the enum class object.