Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MultiFlagger< E > Class Template Reference
Inheritance diagram for MultiFlagger< E >:
Inheritance graph
[legend]
Collaboration diagram for MultiFlagger< E >:
Collaboration graph
[legend]

Public Types

typedef FlaggerBase< E >::dict_value_t dict_value_t
 Fundamental type – in this case an enum.
 
typedef FlagResolver::dict_t dict_t
 
typedef dict_t::key_t key_t
 Fundamental type of the bitvector - an integral type.
 
typedef dict_t::value_t dvalue_t
 Fundamental type of the bitvector - an integral type.
 
- Public Types inherited from FlaggerBase< E >
typedef E value_t
 
typedef FlagResolver::dict_t dict_t
 
typedef dict_t::key_t key_t
 
typedef dict_t::value_t dict_value_t
 

Public Member Functions

template<typename ... T>
 MultiFlagger (const T &... args)
 
template<typename ... T>
void set (const T &... args)
 Set bits, accepting numeric values or keys. More...
 
virtual void assign (const std::string &s)
 Set bits, accepting keys only. More...
 
template<typename T , typename ... TT>
void add (const T &arg, const TT &... args)
 Add bit values.
 
virtual const key_tstr () const
 For exporting values.
 
virtual std::string & str ()
 Given only a numeric/enum value,. More...
 
- Public Member Functions inherited from FlaggerBase< E >
 FlaggerBase (dict_value_t &v)
 Own value will be unused (and invisible). More...
 
virtual const dict_tgetDict () 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)
 
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 & ()
 
 operator const key_t & () const
 
void debug (std::ostream &ostr) const
 

Protected Member Functions

void add ()
 This should be called after assigning a string to & str() .
 
virtual void addOne (const dict_value_t &value)
 
void addOne (const key_t &key)
 

Protected Attributes

std::string currentStr
 

Additional Inherited Members

- Public Attributes inherited from FlaggerBase< E >
dict_value_t & value
 
char separator
 

Member Function Documentation

◆ assign()

virtual void assign ( const std::string &  s)
inlinevirtual

Set bits, accepting keys only.

Starts with resetting the flags.

\tparam T – numeric values or strings

inline void setKeys(const std::string & keys) { this->reset(); } Split a string to separate keys and/or values and set them.

Implements FlaggerBase< E >.

◆ set()

void set ( const T &...  args)
inline

Set bits, accepting numeric values or keys.

Starts with resetting the flags.

Template Parameters
T– numeric values or strings

◆ str()

virtual std::string& str ( )
inlinevirtual

Given only a numeric/enum value,.

For importing values. After assignment, update() should be called. Experimental


The documentation for this class was generated from the following file: