23 #ifndef __ccxx_Flags_hxx 24 #define __ccxx_Flags_hxx 37 template<
typename T>
class Flags 42 Flags(
const T& flags = 0);
53 bool isSet(
int index)
const;
61 void set(
int index,
bool on =
true);
71 bool anySet(
const T& mask)
const;
81 bool allSet(
const T& mask)
const;
100 void clear(
int flag);
118 BitRef(
Flags& flags,
int index);
133 #include <commonc++/FlagsImpl.h++> 137 #endif // __ccxx_Flags_hxx
A wrapper template for primitive integer types that represent flag bitmasks.
Definition: Flags.h++:37
bool operator[](int index) const
Index operator.
bool anySet(const T &mask) const
Compare the flags to a mask, returning true if any of the bits in the mask are set in the flags...
Flags(const T &flags=0)
Construct a new Flags object with an initial value of 0.
bool isSet(int index) const
Test if the bit at the given index is set.
void clear()
Clear all of the bits.
Flags & operator=(const T &flags)
Assignment operator.
bool allSet(const T &mask) const
Compare the flags to a mask, returning true if all of the bits in the mask are set in the flags...
Definition: AllocationMap.c++:25