open62541pp 0.17.0
C++ wrapper of open62541
|
#include <bitmask.hpp>
Bitmask using (scoped) enums.
Zero-cost abstraction to specify bitmasks with enums/ints or enum classes.
Bitmask enums are defined by specializing the IsBitmaskEnum trait.
T | Enumeration type |
Definition at line 127 of file bitmask.hpp.
Public Types | |
using | Underlying = std::underlying_type_t<T> |
Public Member Functions | |
constexpr | Bitmask () noexcept=default |
constexpr | Bitmask (T mask) noexcept |
constexpr | Bitmask (Underlying mask) noexcept |
constexpr | operator T () const noexcept |
constexpr | operator Underlying () const noexcept |
constexpr Underlying | get () const noexcept |
constexpr Bitmask & | set () noexcept |
constexpr Bitmask & | set (T mask) noexcept |
constexpr Bitmask & | reset () noexcept |
constexpr Bitmask & | reset (T mask) noexcept |
constexpr Bitmask & | flip () noexcept |
constexpr bool | all () const noexcept |
constexpr bool | allOf (T mask) const noexcept |
constexpr bool | any () const noexcept |
constexpr bool | anyOf (T mask) const noexcept |
constexpr bool | none () const noexcept |
constexpr bool | noneOf (T mask) const noexcept |
Related Symbols | |
(Note that these are not member symbols.) | |
template<typename T , typename U > | |
constexpr bool | operator== (Bitmask< T > lhs, U rhs) noexcept |
template<typename T , typename U > | |
constexpr bool | operator!= (Bitmask< T > lhs, U rhs) noexcept |
template<typename T , typename U > | |
constexpr bool | operator== (U lhs, Bitmask< T > rhs) noexcept |
template<typename T , typename U > | |
constexpr bool | operator!= (U lhs, Bitmask< T > rhs) noexcept |
using opcua::Bitmask< T >::Underlying = std::underlying_type_t<T> |
Definition at line 132 of file bitmask.hpp.
|
constexprdefaultnoexcept |
Create an empty bitmask.
|
inlineconstexprnoexcept |
Create a bitmask from the enumeration type.
Definition at line 138 of file bitmask.hpp.
|
inlineconstexprnoexcept |
Create a bitmask from the underlying type.
Definition at line 142 of file bitmask.hpp.
|
inlineexplicitconstexprnoexcept |
Conversion to the enum type.
Definition at line 146 of file bitmask.hpp.
|
inlineexplicitconstexprnoexcept |
Conversion to the underlying type.
Definition at line 151 of file bitmask.hpp.
|
inlineconstexprnoexcept |
Get the bitmask as the underlying type (integer).
Definition at line 156 of file bitmask.hpp.
Referenced by opcua::Bitmask< T >::operator!=(), opcua::Bitmask< T >::operator!=(), opcua::Bitmask< T >::operator==(), and opcua::Bitmask< T >::operator==().
|
inlineconstexprnoexcept |
Set all bits.
Definition at line 161 of file bitmask.hpp.
|
inlineconstexprnoexcept |
Set specified bits.
Definition at line 167 of file bitmask.hpp.
|
inlineconstexprnoexcept |
Reset all bits.
Definition at line 173 of file bitmask.hpp.
|
inlineconstexprnoexcept |
Reset specified bits.
Definition at line 179 of file bitmask.hpp.
|
inlineconstexprnoexcept |
Flip all bits.
Definition at line 185 of file bitmask.hpp.
|
inlineconstexprnoexcept |
Check if all bits are set.
Definition at line 191 of file bitmask.hpp.
|
inlineconstexprnoexcept |
Check if all of the specified bits are set.
Definition at line 196 of file bitmask.hpp.
|
inlineconstexprnoexcept |
Check if any bits are set.
Definition at line 201 of file bitmask.hpp.
|
inlineconstexprnoexcept |
Check if any of the specified bits are set.
Definition at line 206 of file bitmask.hpp.
|
inlineconstexprnoexcept |
Check if none bits are set.
Definition at line 211 of file bitmask.hpp.
|
inlineconstexprnoexcept |
Check if none of the specified bits are set.
Definition at line 216 of file bitmask.hpp.