Lines Matching full:flags
15 // The Flags class provides a type-safe way of storing OR-combinations of enum
16 // values. The Flags<T, S> class is a template class, where T is an enum type,
25 class Flags final {
30 Flags() : mask_(0) {} in Flags() function
31 Flags(flag_type flag) // NOLINT(runtime/explicit) in Flags() function
33 explicit Flags(mask_type mask) : mask_(static_cast<S>(mask)) {} in Flags() function
42 Flags& operator&=(const Flags& flags) {
43 mask_ &= flags.mask_;
46 Flags& operator|=(const Flags& flags) {
47 mask_ |= flags.mask_;
50 Flags& operator^=(const Flags& flags) {
51 mask_ ^= flags.mask_;
55 Flags operator&(const Flags& flags) const { return Flags(*this) &= flags; }
56 Flags operator|(const Flags& flags) const { return Flags(*this) |= flags; }
57 Flags operator^(const Flags& flags) const { return Flags(*this) ^= flags; }
59 Flags& operator&=(flag_type flag) { return operator&=(Flags(flag)); }
60 Flags& operator|=(flag_type flag) { return operator|=(Flags(flag)); }
61 Flags& operator^=(flag_type flag) { return operator^=(Flags(flag)); }
63 Flags operator&(flag_type flag) const { return operator&(Flags(flag)); }
64 Flags operator|(flag_type flag) const { return operator|(Flags(flag)); }
65 Flags operator^(flag_type flag) const { return operator^(Flags(flag)); }
67 Flags operator~() const { return Flags(~mask_); }
72 friend size_t hash_value(const Flags& flags) { return flags.mask_; } in hash_value() argument