template<typename T>
BitFlag class
Public static functions
- static auto makeMask(int bit) -> T
Constructors, destructors, conversion operators
- BitFlag()
- BitFlag(T bits)
- operator T() const
Public functions
- void makeAllZero()
- void makeAllOne()
- void setDirect(T bits)
- auto getDirect() const -> T
- auto getPtr() -> T*
- auto getPtr() const -> const T*
-
auto getByteSize() const -> size_
t - void set(T val)
- void reset(T val)
- void toggle(T val)
- void change(T val, bool on)
- auto isZero() const -> bool
- auto isOn(T val) const -> bool
- Checks if (at least) one of the bits are set.
- auto isOnAll(T val) const -> bool
- Checks if all of the bits are set.
- auto isOff(T val) const -> bool
- auto testAndClear(T val) -> bool
- auto getMask(T v) const -> T
- void setBit(int bit)
- void resetBit(int bit)
- void changeBit(int bit, bool on)
- void toggleBit(int bit)
- auto isOnBit(int bit) const -> bool
- auto isOffBit(int bit) const -> bool
- auto testAndClearBit(int bit) -> bool
- auto countOnBit() const -> int
- Popcount.
- auto countContinuousOffBitFromRight() const -> int
- Count trailing zeroes.
- auto countRightOnBit(int bit) const -> int
- auto findOnBitFromRight(int num) const -> int
Protected variables
- T mBits