GG
|
#include <Flags.h>
Friends | |
std::ostream & | operator<< (std::ostream &os, Flags< FlagType > flags) |
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) |
A set of flags of the same type.
Individual flags and sets of flags can be passed as parameters and/or be stored as member variables in Flags objects.
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.
|
inline |
|
friend |
Writes flags to os in the format "flag1 | flag2 | ... flagn".