![]() |
|
#include <Flags.h>
Public Types | |
typedef E | value_t |
typedef E | storage_t |
typedef FlaggerBase< E, E > | flagger_t |
typedef flagger_t::dict_t | dict_t |
typedef dict_t::key_t | key_t |
![]() | |
typedef E | value_t |
typedef E | storage_t |
typedef Dictionary< std::string, E > | dict_t |
typedef dict_t::key_t | key_t |
Public Member Functions | |
virtual const dict_t & | getDict () const override |
Returns the static dictionary created for this value_t . | |
SingleFlagger (const dict_t &dict) | |
SingleFlagger (const dict_t &dict, const storage_t &v) | |
SingleFlagger (const dict_t &dict, storage_t &v, char sep=',') | |
virtual bool | isSet (const storage_t &x) const override |
Return true, if value is exactly x . | |
virtual void | set (const key_t &key) |
virtual void | set (const value_t &value) |
Set a single flag. | |
virtual void | set (const FlaggerBase< E > &flagger) |
template<class T > | |
SingleFlagger< E > & | operator= (const T &v) |
virtual const key_t & | str () const override |
String corresponding the current value. Returns empty, if not found. | |
![]() | |
virtual void | reset () |
bool | isSet (const key_t &key) const |
const storage_t & | getValue () const |
operator const storage_t & () const | |
operator storage_t & () | |
operator bool () const | |
operator const key_t & () const | |
void | debug (std::ostream &ostr) const |
Protected Member Functions | |
virtual void | assign (const std::string &key) override |
Assign key. Expects a single key, not a combination of keys. | |
![]() | |
FlaggerBase (char separator=',') | |
FlaggerBase (storage_t &v, char separator=',') | |
Value-referencing constructor. | |
Protected Attributes | |
const dict_t & | dict |
Additional Inherited Members | |
![]() | |
storage_t & | value |
char | separator |
Abstract class, because getDict() returning Dictionary<std::string,E> still undefined.
|
inlineoverrideprotectedvirtual |
Assign key. Expects a single key, not a combination of keys.
By definition, SingleFlagger contains a value that corresponds to a single key, at a time.
MultiFlagger::assign() supports setting several keys at once.
Implements FlaggerBase< E, E >.
|
inlineoverridevirtual |
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.
Implements FlaggerBase< E, E >.
|
inlineoverridevirtual |
Return true, if value is exactly x
.
Implements FlaggerBase< E, E >.
|
inlineoverridevirtual |
String corresponding the current value. Returns empty, if not found.
Implements FlaggerBase< E, E >.