#include <enum-set.hpp>
Public Types | |
using | EnumType = TEnum |
Enumeration type used. More... | |
using | BaseType = std::bitset< static_cast< std::size_t >(TEnum::_Total)> |
Base biset type. More... | |
using | reference = BaseType::reference |
Public Member Functions | |
EnumSet (std::initializer_list< TEnum > values) | |
Constructor from a set of values. More... | |
bool | operator[] (EnumType pos) const |
Access a specific bit. More... | |
reference | operator[] (EnumType pos) |
Access a specific bit. More... | |
bool | test (EnumType pos) const |
Access a specific bit. More... | |
EnumSet & | set (EnumType pos, bool value=true) |
Set the value of a specific bit. More... | |
using kouta::utils::EnumSet< TEnum >::BaseType = std::bitset<static_cast<std::size_t>(TEnum::_Total)> |
Base biset type.
using kouta::utils::EnumSet< TEnum >::EnumType = TEnum |
Enumeration type used.
using kouta::utils::EnumSet< TEnum >::reference = BaseType::reference |
|
inline |
Constructor from a set of values.
[in] | values | Values to set. |
|
inline |
Access a specific bit.
[in] | pos | Position to check. |
|
inline |
Access a specific bit.
[in] | pos | Position to check. |
|
inline |
Set the value of a specific bit.
[in] | pos | Position to set. |
[in] | value | Value to set. |
std::out_of_range | if pos does not correspond to a valid position within the bitset. |
|
inline |
Access a specific bit.
[in] | pos | Position to check. |
std::out_of_range | if pos does not correspond to a valid position within the bitset. |