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);
Embedded control libraries.
Flags< Enum > & operator=(const Enum &flag)
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|=(Enum flag)
Flags< Enum > & operator &=(int mask)
bool testFlag(Enum flag) const
Flags< Enum > operator^(Enum flag) const
Flags< Enum > operator|(Flags< Enum > other) const
Flags< Enum > operator^(Flags< Enum > other) const
Convenience class for organising boolean flags.
Flags< Enum > & operator^=(Flags< Enum > other)
Flags< Enum > operator~() const
Flags< Enum > & operator|=(Flags< Enum > other)
Flags< Enum > operator &(int mask) const
Flags< Enum > operator|(Enum flag) const