FlagSet.hh
Go to the documentation of this file.
FlagSet & operator &=(const T &_val) noexcept
Return a FlagSet with only the given flag set (or even this one unset if it wasn't set in this FlagSe...
Definition: FlagSet.hh:91
size_t Hash() const
Compute hash of the FlagSet.
Definition: FlagSet.hh:340
FlagSet & Flip()
Set all flags to their negation.
Definition: FlagSet.hh:245
bool operator!=(const FlagSet &_o) const
Test FlagSet inequality.
Definition: FlagSet.hh:205
bool Any() const
Test whether any flag is set.
Definition: FlagSet.hh:281
T any(T... args)
T to_string(T... args)
static FlagSet AllSet()
Retrurn a FlagSet with all flags set to true.
Definition: FlagSet.hh:301
Definition: FlagSet.hh:358
STL namespace.
FlagSet & Set(const T &_val, bool _value=true)
Set the given flag to the specified value.
Definition: FlagSet.hh:255
T flip(T... args)
STL class.
T test(T... args)
friend std::ostream & operator<<(std::ostream &_stream, const FlagSet &_self)
Operator for outputting to std::ostream.
Definition: FlagSet.hh:332
bool None() const
Test whether no flag is set.
Definition: FlagSet.hh:295
static FlagSet NoneSet()
Retrurn a FlagSet with all flags set to false.
Definition: FlagSet.hh:307
static constexpr size_t numElements
Number of elements of the bitset.
Definition: FlagSet.hh:349
bool operator==(const FlagSet &_o) const
Test FlagSet equality.
Definition: FlagSet.hh:197
FlagSet operator~() const
Return a negation of this FlagSet.
Definition: FlagSet.hh:177
FlagSet(const T &_val)
Construct a FlagSet with the given flag set and all other unset.
Definition: FlagSet.hh:70
T reset(T... args)
FlagSet & operator|=(const FlagSet &_o) noexcept
Return a bit OR of this FlagSet and the argument.
Definition: FlagSet.hh:120
FlagSet(const std::initializer_list< T > &_list)
Construct a FlagSet with the given flags set and all other unset.
Definition: FlagSet.hh:77
FlagSet operator|(const FlagSet &_val) const
Return a bit OR of this FlagSet and the argument.
Definition: FlagSet.hh:167
T count(T... args)
constexpr bool operator[](const T &_val) const
Return whether the given flag is set.
Definition: FlagSet.hh:316
T size(T... args)
T set(T... args)
FlagSet & operator|=(const T &_val) noexcept
Set the given flag to true in this FlagSet.
Definition: FlagSet.hh:111
FlagSet & Reset(const T &_val)
Set the given flag to false.
Definition: FlagSet.hh:264
std::size_t Count() const
Return the number of flags set to true.
Definition: FlagSet.hh:222
FlagSet & Flip(const T &_val)
Negate the given flag.
Definition: FlagSet.hh:273
FlagSet operator &(const T &_val) const
Return a FlagSet with only the given flag set (or even this one unset if it wasn't set in this FlagSe...
Definition: FlagSet.hh:131
std::size_t Size() const
Return the total number of flags represented by this FlagSet.
Definition: FlagSet.hh:214
std::size_t operator()(const FlagSet< T, LastElement, ExcludeLast > &_s) const noexcept
Definition: FlagSet.hh:391
FlagSet operator|(const T &_val) const
Return a FlagSet with the given flag set to true.
Definition: FlagSet.hh:155
Forward declarations for the common classes.
std::string String() const
Return a string describing this FlagSet.
Definition: FlagSet.hh:323
STL class.
Definition: Base64.hh:25
bool All() const
Test whether all flags are set.
Definition: FlagSet.hh:288