19template <
typename T = u
int32_t>
25 ABitField(T storage =
static_cast<T
>(0)) : mStorage(storage) {}
35 const T& value()
const {
65 if (!!(mStorage & flag)) {
94 return (mStorage & flags) == flags;
103 return bool(mStorage & flags);
116 void set(T flag,
bool value) {
Bit field implementation.
Definition: ABitField.h:20
ABitField & operator<<(T flag)
Sets flag.
Definition: ABitField.h:44
ABitField & operator>>(T flag)
Resets flag.
Definition: ABitField.h:54
bool checkAndReset(T flag)
Determines whether flag set or not and sets flag.
Definition: ABitField.h:77
bool checkAndSet(T flag)
Determines whether flag set or not and resets flag.
Definition: ABitField.h:64
bool testAny(T flags) const
Determines whether flag (or one of the flags flags) set or not.
Definition: ABitField.h:102
bool operator&(T flags) const
Determines whether flag(s) set or not.
Definition: ABitField.h:112
bool test(T flags) const
Determines whether flag (or all flags) set or not.
Definition: ABitField.h:93