|
| FlaggerBase (dict_value_t &v) |
| Own value will be unused (and invisible). More...
|
|
virtual const dict_t & | getDict () const =0 |
|
void | reset () |
|
virtual void | set (const key_t &key) |
|
virtual void | set (const dict_value_t &value) |
|
virtual void | set (const FlaggerBase< E > &flagger) |
|
virtual void | assign (const std::string &s)=0 |
|
bool | isSet (dict_value_t x) const |
| Checks if a given bit, or any of given bits, is set.
|
|
bool | isSet (const key_t &key) const |
|
const dict_value_t & | getValue () const |
|
| operator const dict_value_t & () const |
| Given an integer, retrieves dictionary keys corresponding to each index of set bits.
|
|
| operator dict_value_t & () |
|
virtual const key_t & | str () const =0 |
| String corresponding the current value. Returns empty, if not found.
|
|
| operator const key_t & () const |
|
void | debug (std::ostream &ostr) const |
|
template<typename E = std::size_t>
class drain::FlaggerBase< E >
A Flag mapper designed for global use, also supporting ENUM types. @See Perhaps replacing GlobalFlagger later.
Example:
enum Crit {DATA, ELANGLE, TIME};
template <>
const SingleFlagger<Crit>::dict_t SingleFlagger<Crit>::dict = {{"DATA", DATA}, {"ELANGLE", ELANGLE}, {"TIME", TIME}};
Inside a class:
class Reader {
public:
enum Mode {ATTRIBUTES=1, DATASETS=2};
}
template <>
template <>
{{"ATTRIBUTES", Reader::ATTRIBUTES}, {"DATASETS", Reader::DATASETS}};
- Template Parameters
-
E | - enum or integer |
D | - dictionary, possibly const |