open62541pp 0.16.0
C++ wrapper of open62541
|
#include <bitmask.hpp>
Bitmask using (scoped) enums.
Zero-cost abstraction to specify bitmasks with enums/ints or enum classes.
T | Enumeration type |
Definition at line 125 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 130 of file bitmask.hpp.
|
constexprdefaultnoexcept |
Create an empty bitmask.
|
inlineconstexprnoexcept |
Create a bitmask from the enumeration type.
Definition at line 136 of file bitmask.hpp.
|
inlineconstexprnoexcept |
Create a bitmask from the underlying type.
Definition at line 140 of file bitmask.hpp.
|
inlineexplicitconstexprnoexcept |
Conversion to the enum type.
Definition at line 144 of file bitmask.hpp.
|
inlineexplicitconstexprnoexcept |
Conversion to the underlying type.
Definition at line 149 of file bitmask.hpp.
|
inlineconstexprnoexcept |
Get the bitmask as the underlying type (integer).
Definition at line 154 of file bitmask.hpp.
Referenced by opcua::Bitmask< T >::operator!=(), opcua::Bitmask< T >::operator!=(), opcua::Bitmask< T >::operator==(), opcua::Bitmask< T >::operator==(), and opcua::services::detail::AttributeHandlerScalar< Bitmask< T > >::toDataValue().
|
inlineconstexprnoexcept |
Set all bits.
Definition at line 159 of file bitmask.hpp.
|
inlineconstexprnoexcept |
Set specified bits.
Definition at line 165 of file bitmask.hpp.
|
inlineconstexprnoexcept |
Reset all bits.
Definition at line 171 of file bitmask.hpp.
|
inlineconstexprnoexcept |
Reset specified bits.
Definition at line 177 of file bitmask.hpp.
|
inlineconstexprnoexcept |
Flip all bits.
Definition at line 183 of file bitmask.hpp.
|
inlineconstexprnoexcept |
Check if all bits are set.
Definition at line 189 of file bitmask.hpp.
|
inlineconstexprnoexcept |
Check if all of the specified bits are set.
Definition at line 194 of file bitmask.hpp.
|
inlineconstexprnoexcept |
Check if any bits are set.
Definition at line 199 of file bitmask.hpp.
|
inlineconstexprnoexcept |
Check if any of the specified bits are set.
Definition at line 204 of file bitmask.hpp.
|
inlineconstexprnoexcept |
Check if none bits are set.
Definition at line 209 of file bitmask.hpp.
|
inlineconstexprnoexcept |
Check if none of the specified bits are set.
Definition at line 214 of file bitmask.hpp.