ponder
3.2
C++ reflection library
|
Proxy class which fills a metaenum with its members. More...
#include <enumbuilder.hpp>
Public Member Functions | |
EnumBuilder (Enum &target) | |
Construct the builder with a target metaenum. More... | |
EnumBuilder & | value (IdRef name, long value) |
Add a new pair to the metaenum. More... | |
template<typename E > | |
EnumBuilder & | value (IdRef name, E enumValue) |
Add a new pair to the metaenum using enum class. More... | |
Proxy class which fills a metaenum with its members.
This class is returned by Enum::declare<T> in order construct a new metaenum. It contains functions to declare <name, value> pairs to fill the metaenum.
This class should never be explicitely instantiated, unless you need to split the metaenum creation in multiple parts.
|
explicit |
Construct the builder with a target metaenum.
target | Target metaenum to construct |
|
inline |
Add a new pair to the metaenum using enum class.
e.g. value("one", MyEnum::One)
name | Name of the pair |
enumValue | Value of the pair |
EnumBuilder& ponder::EnumBuilder::value | ( | IdRef | name, |
long | value | ||
) |
Add a new pair to the metaenum.
name | Name of the pair |
value | Value of the pair |