32 #ifndef Flags_INCLUDE_ONCE 33 #define Flags_INCLUDE_ONCE 38 template <
typename T_FlagEnum>
52 flag_storage
flags()
const {
return mFlags; }
61 other.mFlags |= flag.mFlags;
68 other.mFlags &= flag.mFlags;
75 other.mFlags ^= flag.mFlags;
82 other.mFlags &= ~flag.mFlags;
134 operator bool()
const 143 template <
typename T>
151 template <
typename T>
160 #define VL_DECLARE_FLAGS(EnumType, FlagTypeName) \ 161 template<EnumType> Flags<EnumType> operator|(EnumType flag1, EnumType flag2); \ 162 template<EnumType> Flags<EnumType> operator&(EnumType flag1, EnumType flag2); \ 163 typedef Flags<EnumType> FlagTypeName; Simple class to manage flags in a type safe manner.
Flags & operator=(T_FlagEnum flag)
flag_storage flags() const
Flags operator|(const Flags &flag) const
Flags operator^(const Flags &flag) const
Flags operator|(T_FlagEnum flag) const
friend Flags< T > operator|(T flag1, T flag2)
Visualization Library main namespace.
Flags operator-(const Flags &flag) const
Flags operator-(T_FlagEnum flag) const
Flags operator^(T_FlagEnum flag) const
unsigned int flag_storage
Flags & unset(T_FlagEnum flag)
friend Flags< T > operator &(T flag1, T flag2)