Holds a bitset containing flags to indicate which features a certain instrument/ module etc. supports.
More...
|
constexpr | FeatureTester () noexcept=default |
| Constructs a FeatureTester instance with no flags set. More...
|
|
template<size_t N> |
| FeatureTester (const std::array< EnumType, N > &Flags) |
| Constructs a FeatureTester instance with the Flags passed as an array being set. More...
|
|
template<size_t N> |
bool | Test (const std::array< EnumType, N > &Flags) const |
| Tests whether all of the flags passed as an array are set. More...
|
|
bool | Test (EnumType Flag) const |
| Tests whether a single flag is set. More...
|
|
void | Set (EnumType Flag) |
| Sets a flag. More...
|
|
|
std::bitset< static_cast< size_t >EnumType::NUM_ELEMENTS)> | Features |
| Bitset containing the flags and their states. More...
|
|
template<typename EnumType, std::enable_if_t< std::is_enum_v< EnumType >, int > = 0>
class Util::FeatureTester< EnumType, >
Holds a bitset containing flags to indicate which features a certain instrument/ module etc. supports.
- Template Parameters
-
EnumType | Enum class type containing flags the respective FeatureTester operates on. NUM_ELEMENTS must be the last element in EnumType. No values must be assigned to the enum's elements! |
Definition at line 1230 of file Util.h.
◆ FeatureTester() [1/2]
template<typename EnumType , std::enable_if_t< std::is_enum_v< EnumType >, int > = 0>
◆ FeatureTester() [2/2]
template<typename EnumType , std::enable_if_t< std::is_enum_v< EnumType >, int > = 0>
template<size_t N>
Constructs a FeatureTester instance with the Flags passed as an array being set.
- Template Parameters
-
N | Amount of flags contained in Flags . Automatically derived. Do not specify. |
- Parameters
-
Definition at line 1244 of file Util.h.
◆ Set()
template<typename EnumType , std::enable_if_t< std::is_enum_v< EnumType >, int > = 0>
Sets a flag.
- Parameters
-
Definition at line 1281 of file Util.h.
◆ Test() [1/2]
template<typename EnumType , std::enable_if_t< std::is_enum_v< EnumType >, int > = 0>
template<size_t N>
Tests whether all of the flags passed as an array are set.
- Template Parameters
-
N | Amount of flags contained in Flags . Automatically derived. Do not specify. |
- Parameters
-
Flags | Flags Flags to check |
- Returns
- Returns true if all flags contained in
Flags
are set, false otherwise.
Definition at line 1257 of file Util.h.
◆ Test() [2/2]
template<typename EnumType , std::enable_if_t< std::is_enum_v< EnumType >, int > = 0>
Tests whether a single flag is set.
- Parameters
-
- Returns
- Returns true if the flag is set, false otherwise.
Definition at line 1275 of file Util.h.
◆ Features
template<typename EnumType , std::enable_if_t< std::is_enum_v< EnumType >, int > = 0>
std::bitset<static_cast<size_t>EnumType::NUM_ELEMENTS)> Util::FeatureTester< EnumType, >::Features |
|
private |
Bitset containing the flags and their states.
Definition at line 1287 of file Util.h.
The documentation for this class was generated from the following file: