56 bool constexpr getBit(
size_t pos)
const noexcept ;
61 void setBit(
size_t pos,
bool on);
95 return (mBitMask & (1 << pos)) != 0;
111 mBitMask = mBitMask | 1 << pos;
117 mBitMask = mBitMask & ~(1 << pos);
127 constexpr size_t numBits =
sizeof(T) * 8;
size_t maxBits() const
Returns the upper limit for bit positions.
void clearBit(size_t pos)
Will clear the bit at the given postion to false.
T getMask() const
Returns the current bit-mask.
void setBit(size_t pos, bool on)
Will set the bit at the given position to the given state.
TBitField()=default
The default class constructor.
bool constexpr getBit(size_t pos) const noexcept
Will return the bit at the given position.
void clear()
Will clear all bits, they will set to false.
~TBitField()=default
The class destructor.