Public Member Functions | Static Public Member Functions | List of all members
GlobalFlags< T > Class Template Reference

Flags using a global dictionary. More...

#include <GlobalFlags.h>

Inheritance diagram for GlobalFlags< T >:
Inheritance graph
[legend]
Collaboration diagram for GlobalFlags< T >:
Collaboration graph
[legend]

Public Member Functions

template<class T2 >
GlobalFlags< T > & operator= (const T2 &x)
 Sets value, ie. set or unsets all the flags.
 
- Public Member Functions inherited from MultiFlagger< int >
 MultiFlagger (const dict_t &dict)
 
 MultiFlagger (const dict_t &dict, const V &... args)
 
 MultiFlagger (const dict_t &dict, storage_t &target, char sep=',')
 
virtual const dict_tgetDict () const override
 Returns the static dictionary created for this value_t . More...
 
virtual bool isSet (const storage_t &x) const override
 Return true, all the bits of argument x are set.
 
void unset (const storage_t &x)
 Unset some bit(s).
 
void set (const V &... args)
 Set bits, accepting numeric values or keys. More...
 
void add (const V &arg, const VV &... args)
 Add bit values.
 
virtual const key_t & str () const override
 For exporting values.
 
virtual std::string & str ()
 For importing values. After assignment, update() should be called. Experimental.
 
- Public Member Functions inherited from FlaggerBase< E, T >
 FlaggerBase (char separator=',')
 
 FlaggerBase (storage_t &v, char separator=',')
 Value-referencing constructor. More...
 
virtual void reset ()
 
virtual void set (const key_t &key)
 Sets one or several flags.
 
virtual void set (const value_t &value)
 Set a single flag.
 
virtual void set (const FlaggerBase< E > &flagger)
 
bool isSet (const key_t &key) const
 
const storage_t & getValue () const
 
 operator const storage_t & () const
 Given an integer, retrieves dictionary keys corresponding to each index of set bits.
 
 operator storage_t & ()
 
 operator bool () const
 
 operator const key_t & () const
 
void debug (std::ostream &ostr) const
 

Static Public Member Functions

static MultiFlagger< int > & getShared ()
 
static const MultiFlagger< int >::dict_tgetSharedDict ()
 

Additional Inherited Members

- Public Types inherited from MultiFlagger< int >
typedef int value_t
 
typedef size_t storage_t
 
typedef FlaggerBase< int, size_t > flagger_t
 
typedef flagger_t::dict_t dict_t
 
typedef dict_t::key_t key_t
 
- Public Types inherited from FlaggerBase< E, T >
typedef E value_t
 
typedef T storage_t
 
typedef Dictionary< std::string, E > dict_t
 
typedef dict_t::key_t key_t
 
- Public Attributes inherited from FlaggerBase< E, T >
storage_t & value
 
char separator
 
- Protected Member Functions inherited from MultiFlagger< int >
void add ()
 
virtual void assign (const std::string &s) override
 Split a string to separate keys and/or values and set them.
 
void addOne (const key_t &key)
 
void addOne (const T2 &value)
 
- Protected Attributes inherited from MultiFlagger< int >
const dict_tdict
 Given only a numeric/enum value,. More...
 
std::string currentStr
 

Detailed Description

template<class T>
class drain::GlobalFlags< T >

Flags using a global dictionary.


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