|
| Flagger (const dict_t &dict, char separator=0) |
|
| Flagger (ivalue_t &value, const dict_t &dict, char separator=0) |
|
| Flagger (const Flagger &flags) |
|
template<typename T , typename ... TT> |
Flagger & | set (const T &arg, const TT &... args) |
| Set desired flags. Does not reset any flag (zero value has no effect). More...
|
|
Flagger & | unset (ivalue_t x) |
| Unset desired flags. Does not set any flag.
|
|
Flagger & | unset (const key_t &key) |
| Unset desired flags. Does not set any flag.
|
|
Flagger & | reset () |
| Reset all the flags.
|
|
bool | isSet (ivalue_t x) const |
| Checks if a given bit, or any of given bits, is set.
|
|
bool | isSet (const key_t &key) const |
|
Flagger & | operator= (const Flagger &x) |
|
template<class T > |
Flagger & | operator= (const T &x) |
| Sets value, ie. set or unsets all the flags. More...
|
|
void | assign (ivalue_t x) |
| Sets value, ie. set or unsets all the flags. More...
|
|
void | assign (const Flagger &flags) |
| Copies flags as an integer value . Same dictionary not checked. More...
|
|
void | assign (const std::string ¶ms) |
| Set flags, like 'FILEOK=1,WARN=0'. More...
|
|
| operator ivalue_t () const |
|
| operator bool () const |
|
| operator std::string () const |
|
ivalue_t | getValue (const std::string &key, char separator=0) const |
| Computes bitwise OR function on the numeric or alphabetic value(s) presented by a string. More...
|
|
std::string | getKeys (ivalue_t value, char separator=0) const |
| Given an integer, retrieves dictionary keys corresponding to each index of set bits.
|
|
std::string | getKeys (char separator=0) const |
| Given an integer, retrieves dictionary keys corresponding to each index of set bits.
|
|
const dict_t::keylist_t & | keys () const |
|
std::ostream & | keysToStream (std::ostream &ostr=std::cout, char separator=0) const |
| Display current value as key values of which the value is composed with OR function. More...
|
|
template<class T > |
void | exportStatus (std::map< std::string, T > &statusMap) const |
|
template<typename T > |
FlagResolver::ivalue_t | addEntry (drain::Dictionary< key_t, T > &dict, const typename dict_t::key_t &key, ivalue_t i) |
|
|
typedef std::string | key_t |
|
typedef unsigned long int | ivalue_t |
|
typedef drain::Dictionary< key_t, ivalue_t > | dict_t |
| "Recommended" dictionary type. All the methods are templates, however.
|
|
template<typename T > |
static ivalue_t | getValue (const drain::Dictionary< key_t, T > &dict, const std::string &key, char separator=',') |
| Computes bitwise OR function on the numeric or alphabetic value(s) presented by a string. More...
|
|
template<typename T > |
static std::string | getKeys (const drain::Dictionary< key_t, T > &dict, ivalue_t, char separator=',') |
| Given an integer, retrieves dictionary keys corresponding to each index of set bits. More...
|
|
template<typename T > |
static std::ostream & | keysToStream (const drain::Dictionary< key_t, T > &dict, ivalue_t value, std::ostream &ostr, char separator=',') |
| Write keys in a stream, in numeric order. More...
|
|
template<typename T , typename V > |
static void | valuesToList (ivalue_t value, const drain::Dictionary< key_t, T > &dict, std::list< V > &container) |
| Given a bit vector (integer value), extracts separate flag values to a list. More...
|
|
template<typename T > |
static ivalue_t | addEntry (drain::Dictionary< key_t, T > &dict, const key_t &key, ivalue_t i=0) |
| Add a new entry in the dictionary. More...
|
|
template<typename T > |
static ivalue_t | getFreeBit (const drain::Dictionary< key_t, T > &dict) |
| Return an interger (bit vector) with a new, previously unused value. More...
|
|
A bit vector with external Dictionary mapping from strings to bits and vice versa.