#include <Flags.h>
Exceptions | |
GG_ABSTRACT_EXCEPTION (Exception) | |
GG_CONCRETE_EXCEPTION (UnknownFlag, GG::Flags, Exception) | |
Structors | |
Flags () | |
Flags (FlagType flag) | |
Accessors | |
operator int ConvertibleToBoolDummy::* () const | |
bool | operator== (Flags< FlagType > rhs) const |
bool | operator!= (Flags< FlagType > rhs) const |
bool | operator< (Flags< FlagType > rhs) const |
Mutators | |
Flags< FlagType > & | operator|= (Flags< FlagType > rhs) |
Flags< FlagType > & | operator &= (Flags< FlagType > rhs) |
Flags< FlagType > & | operator^= (Flags< FlagType > rhs) |
Friends | |
std::ostream & | operator<< (std::ostream &os, Flags< FlagType > flags) |
Individual flags and sets of flags can be passed as parameters and/or be stored as member variables in Flags objects.
Definition at line 253 of file Flags.h.
Ctor.
Note that this ctor allows implicit conversions from FlagType to Flags.
Throws | GG::Flags::UnknownFlag if flag is not found in FlagSpec<FlagType>::instance(). |
GG::Flags< FlagType >::GG_ABSTRACT_EXCEPTION | ( | Exception | ) |
The base class for Flags exceptions.
GG::Flags< FlagType >::GG_CONCRETE_EXCEPTION | ( | UnknownFlag | , | |
GG::Flags< FlagType > | , | |||
Exception | ||||
) |
Thrown when an unknown flag is used to construct a Flags.
GG::Flags< FlagType >::operator int ConvertibleToBoolDummy::* | ( | ) | const [inline] |
std::ostream& operator<< | ( | std::ostream & | os, | |
Flags< FlagType > | flags | |||
) | [friend] |
Writes flags to os in the format "flag1 | flag2 | ... flagn".