![]() |
|
Default default value... More...
#include <EnumFlags.h>


Public Types | |
| typedef F | fbase_t |
| typedef F::value_t | value_t |
| typedef F::storage_t | storage_t |
| typedef F::dict_t | dict_t |
| typedef FlagResolver::ivalue_t | ivalue_t |
Public Member Functions | |
| EnumFlagger () | |
| Default constructor. | |
| EnumFlagger (const storage_t &v) | |
| Constructor with initial value. | |
| template<typename ... T> | |
| EnumFlagger (const T &... arg) | |
| EnumFlagger< F > & | operator= (const EnumFlagger< F > &flagger) |
| template<class T > | |
| EnumFlagger< F > & | operator= (const T &v) |
Static Public Member Functions | |
| static ivalue_t | getValueNEW (const std::string &key) |
Returns the static dictionary created for this value_t . | |
Default default value...
Flagger accepting values of enum type E.
| F | – SingleFlagger<E> or MultiFlagger<E> |
Enum dictionary should be defined as follows:
template <> const drain::EnumDict<...>::dict_t drain::EnumDict<...>::dict = {{"A", A}, {"B", B}, {"C", C}};
|
inlinestatic |
Returns the static dictionary created for this value_t .
Notice that this function is non-static but returns a reference to a static dictionary. In C++ virtual functions must be non-static. This is nevertheless handy in templated design, for example.
virtual const dict_t & getDict() const override { return EnumDict<value_t>::dict; }; Return the integer value corresponding to a key. Retrieves the value directly from the dictionary. Dictionary throws except if key now found.
|
inline |
Dictionary throws except if key now found.
static value_t getKeys(const value_t & value){ return (value_t)EnumDict<value_t>::dict.getValue(key); }; Consider handler through this->set(Flagger) ? Needs protected/private _set() (or assign()).
1.9.8