|
Flagger accepting values of enum type E. More...
#include <Flags.h>
Public Types | |
typedef F | fbase_t |
typedef fbase_t::value_t | value_t |
typedef FlagResolver::ivalue_t | ivalue_t |
Public Member Functions | |
template<typename ... T> | |
EnumFlagger (const T &... arg) | |
virtual const FlaggerBase< value_t >::dict_t & | getDict () const |
Returns the static dictionary created for this value_t . More... | |
EnumFlagger< F > & | operator= (const EnumFlagger< F > &flagger) |
template<class T > | |
EnumFlagger< F > & | operator= (const T &v) |
operator value_t () const | |
operator bool () const | |
Static Public Member Functions | |
static ivalue_t | getValueNEW (const std::string &key) |
Return the integer value corresponding to a key. More... | |
static std::string | getKeysNEW2 (const value_t &value, char separator=',') |
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}};
|
inlinevirtual |
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.
|
inlinestatic |
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()).