10 #ifndef ECL_UTILITIES_FLAGS_HPP_ 11 #define ECL_UTILITIES_FLAGS_HPP_ 64 template<
typename Enum>
86 if ((
value & flag) != 0)
92 if ( ( flag == 0 ) && (
value == 0 ) ) {
210 value =
static_cast<int>(flag);
bool testFlag(Enum flag) const
Embedded control libraries.
Flags< Enum > operator~() const
Flags< Enum > & operator=(const Enum &flag)
Flags< Enum > operator&(Enum flag) const
Flags< Enum > & operator=(const Flags< Enum > &other)
Flags(const Flags< Enum > &other)
friend Flags< Enum > operator|(Enum flag, Flags< Enum > flags)
Flags< Enum > & operator^=(Enum flag)
Flags< Enum > operator|(Flags< Enum > other) const
Flags< Enum > & operator|=(Enum flag)
Flags< Enum > operator|(Enum flag) const
Flags< Enum > operator&(int mask) const
Convenience class for organising boolean flags.
Flags< Enum > & operator^=(Flags< Enum > other)
Flags< Enum > & operator&=(int mask)
Flags< Enum > & operator|=(Flags< Enum > other)
Flags< Enum > operator^(Flags< Enum > other) const
Flags< Enum > operator^(Enum flag) const