Convenience class for organising boolean flags. More...
#include <flags.hpp>
Public Member Functions | |
Flags () | |
Flags (const Flags< Enum > &other) | |
Flags (Enum flag) | |
operator int () const | |
Flags< Enum > | operator& (Enum flag) const |
Flags< Enum > | operator& (int mask) const |
Flags< Enum > & | operator&= (int mask) |
Flags< Enum > & | operator= (const Enum &flag) |
Flags< Enum > & | operator= (const Flags< Enum > &other) |
Flags< Enum > | operator^ (Enum flag) const |
Flags< Enum > | operator^ (Flags< Enum > other) const |
Flags< Enum > & | operator^= (Enum flag) |
Flags< Enum > & | operator^= (Flags< Enum > other) |
Flags< Enum > | operator| (Enum flag) const |
Flags< Enum > | operator| (Flags< Enum > other) const |
Flags< Enum > & | operator|= (Enum flag) |
Flags< Enum > & | operator|= (Flags< Enum > other) |
Flags< Enum > | operator~ () const |
bool | testFlag (Enum flag) const |
~Flags () | |
Private Attributes | |
int | value |
Friends | |
Flags< Enum > | operator| (Enum flag, Flags< Enum > flags) |
Convenience class for organising boolean flags.
This class organises a group of flags (via enums) in a convenient and typesafe manner. It is essentially a container for flags (in the form of enums) with a convenient interface on top.
Usage:
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |