Lines Matching full:flags
13 // The Flags class provides a type-safe way of storing OR-combinations of enum
14 // values. The Flags<T, S> class is a template class, where T is an enum type,
23 class Flags FINAL {
28 Flags() : mask_(0) {} in Flags() function
29 Flags(flag_type flag) : mask_(flag) {} // NOLINT(runtime/explicit) in Flags() function
30 explicit Flags(mask_type mask) : mask_(mask) {} in Flags() function
32 Flags& operator&=(const Flags& flags) {
33 mask_ &= flags.mask_;
36 Flags& operator|=(const Flags& flags) {
37 mask_ |= flags.mask_;
40 Flags& operator^=(const Flags& flags) {
41 mask_ ^= flags.mask_;
45 Flags operator&(const Flags& flags) const { return Flags(*this) &= flags; }
46 Flags operator|(const Flags& flags) const { return Flags(*this) |= flags; }
47 Flags operator^(const Flags& flags) const { return Flags(*this) ^= flags; }
49 Flags& operator&=(flag_type flag) { return operator&=(Flags(flag)); }
50 Flags& operator|=(flag_type flag) { return operator|=(Flags(flag)); }
51 Flags& operator^=(flag_type flag) { return operator^=(Flags(flag)); }
53 Flags operator&(flag_type flag) const { return operator&(Flags(flag)); }
54 Flags operator|(flag_type flag) const { return operator|(Flags(flag)); }
55 Flags operator^(flag_type flag) const { return operator^(Flags(flag)); }
57 Flags operator~() const { return Flags(~mask_); }