template<typename Enum>
EnumBitMask class
A strongly typed mask for a set of enum flags. Requires that the underlying enum values are powers of two.
Public static functions
- static auto None() -> EnumBitMask<Enum> constexpr
- Returns a bit mask with no bits set.
Public functions
- auto contains(Enum flag) const -> bool constexpr
- Returns
true
if this bit mask contains the given flag. - auto containsAll(EnumBitMask<Enum> other) const -> bool constexpr
- Returns
true
if this bit mask contains all of the flags of the other bit mask. Meaning the set of flags represented by this bit mask is a superset of the other. - auto containsAny() const -> bool constexpr
- Returns
true
if this bit mask contains any flag. - auto containsAny(EnumBitMask<Enum> other) const -> bool constexpr
- Returns
true
if this bit mask contains any of the flags of the other bit mask. Meaning the intersection of the sets of flags the bit masks represent is not empty. - auto countFlagsSet() const -> uint32_t
- Returns the number of flags set in the bit mask.
Public variables
- EnumValueType value
- The raw value of the bit mask.