41 template <
typename EnumType>
65 : m_value(static_cast<uint64_t>(flags))
78 uint64_t
value()
const {
return m_value; }
83 bool has(
FlagSet flags)
const {
return (m_value & flags.m_value) == flags.m_value; }
95 bool operator==(
FlagSet flags)
const {
return m_value == flags.m_value; }
97 bool operator!=(
FlagSet flags)
const {
return m_value != flags.m_value; }
105 m_value |= flags.m_value;
111 m_value &= flags.m_value;
117 m_value ^= flags.m_value;
137 #define IOLINK_DEFINE_ENUM_BITWISE_OPERATORS(EnumType) \
138 inline FlagSet<EnumType> operator|(EnumType lhs, EnumType rhs) { return FlagSet<EnumType>(lhs) |= rhs; } \
139 inline FlagSet<EnumType> operator&(EnumType lhs, EnumType rhs) { return FlagSet<EnumType>(lhs) &= rhs; } \
140 inline FlagSet<EnumType> operator^(EnumType lhs, EnumType rhs) { return FlagSet<EnumType>(lhs) ^= rhs; }