template<size_t N, typename E>
requires (std::is_enum_v<E> && N > 64)
class EGG::TBitFlagExt< N, E >
Wrapper around a variable length bitfield with an enum corresponding to its bits.
- Template Parameters
-
| N | The number of bits in the bitfield. Must be >= 64 to distinguish from TBitFlag. |
| E | The enum to correspond to. |
Definition at line 322 of file BitFlag.hh.
|
| constexpr | TBitFlagExt () |
| | Default constructor, initializes all flags to off.
|
| |
| constexpr TBitFlagExt< N, E > & | makeAllZero () |
| | Resets all the bits to zero across the entire bitfield array.
|
| |
template<typename... Es>
requires (std::is_same_v<Es, E> && ...) |
| constexpr TBitFlagExt< N, E > & | setBit (Es... es) |
| | Sets the corresponding bits for the provided enum values.
|
| |
template<typename... Es>
requires (std::is_same_v<Es, E> && ...) |
| constexpr TBitFlagExt< N, E > & | resetBit (Es... es) |
| | Resets the corresponding bits for the provided enum values.
|
| |
template<typename... Es>
requires (std::is_same_v<Es, E> && ...) |
| constexpr TBitFlagExt< N, E > & | changeBit (bool on, Es... es) |
| | Changes the state of the corresponding bits for the provided enum values.
|
| |
template<typename... Es>
requires (std::is_same_v<Es, E> && ...) |
| constexpr bool | onBit (Es... es) const |
| | Checks if any of the corresponding bits for the provided enum values are on.
|
| |
template<typename... Es>
requires (std::is_same_v<Es, E> && ...) |
| constexpr bool | onAnyBit (Es... es) const |
| | Checks if any of the corresponding bits for the provided enum values are on.
|
| |
template<typename... Es>
requires (std::is_same_v<Es, E> && ...) |
| constexpr bool | onAllBit (Es... es) const |
| | Checks if all of the corresponding bits for the provided enum values are on.
|
| |
template<typename... Es>
requires (std::is_same_v<Es, E> && ...) |
| constexpr bool | offBit (Es... es) const |
| | Checks if all of the corresponding bits for the provided enum values are off.
|
| |
template<typename... Es>
requires (std::is_same_v<Es, E> && ...) |
| constexpr bool | offAllBit (Es... es) const |
| | Checks if all of the corresponding bits for the provided enum values are off.
|
| |
template<typename... Es>
requires (std::is_same_v<Es, E> && ...) |
| constexpr bool | offAnyBit (Es... es) const |
| | Checks if any of the corresponding bits for the provided enum values are off.
|
| |
|
| constexpr void | setBit_ (E e) |
| | Internal. Sets a specific bit.
|
| |
| constexpr void | resetBit_ (E e) |
| | Internal. Resets a specific bit.
|
| |
| constexpr void | changeBit_ (bool on, E e) |
| | Internal. Changes a specific bit.
|
| |
| constexpr bool | onBit_ (E e) const |
| | Checks if a specific bit is on.
|
| |
| constexpr bool | offBit_ (E e) const |
| | Checks if a specific bit is off.
|
| |
| constexpr std::pair< T, T > | makeMask_ (E e) const |
| | Gets bit index and mask for a specific bit.
|
| |
| constexpr std::pair< T &, T > | makeMask_ (E e) |
| | Gets bit index and mask for a specific bit.
|
| |
template<size_t N, typename E >
template<typename... Es>
requires (std::is_same_v<Es, E> && ...)
Changes the state of the corresponding bits for the provided enum values.
- Template Parameters
-
| ...Es | Variadic template for packing. |
- Parameters
-
| on | Determines whether to set or reset the bits. |
| ...es | Enum values representing the bits to change. |
- Returns
- Reference for chaining.
Definition at line 367 of file BitFlag.hh.
template<size_t N, typename E >
template<typename... Es>
requires (std::is_same_v<Es, E> && ...)
Checks if all of the corresponding bits for the provided enum values are off.
Matches the expression (bits & mask) == 0.
- Template Parameters
-
| ...Es | Variadic template for packing. |
- Parameters
-
| ...es | Enum values representing the bits to check. |
- Returns
- True if all of the specified bits are off, otherwise false.
Definition at line 423 of file BitFlag.hh.
template<size_t N, typename E >
template<typename... Es>
requires (std::is_same_v<Es, E> && ...)
Checks if any of the corresponding bits for the provided enum values are off.
Matches the expression (bits & mask) != mask.
- Template Parameters
-
| ...Es | Variadic template for packing. |
- Parameters
-
| ...es | Enum values representing the bits to check. |
- Returns
- True if any of the specified bits are off, otherwise false.
Definition at line 434 of file BitFlag.hh.
template<size_t N, typename E >
template<typename... Es>
requires (std::is_same_v<Es, E> && ...)
Checks if all of the corresponding bits for the provided enum values are off.
Matches the expression (bits & mask) == 0.
- Template Parameters
-
| ...Es | Variadic template for packing. |
- Parameters
-
| ...es | Enum values representing the bits to check. |
- Returns
- True if all of the specified bits are off, otherwise false.
Definition at line 412 of file BitFlag.hh.
template<size_t N, typename E >
template<typename... Es>
requires (std::is_same_v<Es, E> && ...)
Checks if all of the corresponding bits for the provided enum values are on.
Matches the expression (bits & mask) == mask.
- Template Parameters
-
| ...Es | Variadic template for packing. |
- Parameters
-
| ...es | Enum values representing the bits to check. |
- Returns
- True if all of the specified bits are on, otherwise false.
Definition at line 401 of file BitFlag.hh.
template<size_t N, typename E >
template<typename... Es>
requires (std::is_same_v<Es, E> && ...)
Checks if any of the corresponding bits for the provided enum values are on.
Matches the expression (bits & mask) != 0.
- Template Parameters
-
| ...Es | Variadic template for packing. |
- Parameters
-
| ...es | Enum values representing the bits to check. |
- Returns
- True if one of the specified bits are on, otherwise false.
Definition at line 390 of file BitFlag.hh.
template<size_t N, typename E >
template<typename... Es>
requires (std::is_same_v<Es, E> && ...)
Checks if any of the corresponding bits for the provided enum values are on.
Matches the expression (bits & mask) != 0.
- Template Parameters
-
| ...Es | Variadic template for packing. |
- Parameters
-
| ...es | Enum values representing the bits to check. |
- Returns
- True if one of the specified bits are on, otherwise false.
Definition at line 379 of file BitFlag.hh.
template<size_t N, typename E >
template<typename... Es>
requires (std::is_same_v<Es, E> && ...)
Sets the corresponding bits for the provided enum values.
Matches the expression bits |= mask.
- Template Parameters
-
| ...Es | Variadic template for packing. |
- Parameters
-
| ...es | Enum values representing the bits to set. |
- Returns
- Reference for chaining.
Definition at line 344 of file BitFlag.hh.