gz/common/FlagSet.hh
size_t Hash() const
Compute hash of the FlagSet.
Definition: gz/common/FlagSet.hh:342
FlagSet & Flip()
Set all flags to their negation.
Definition: gz/common/FlagSet.hh:247
Forward declarations for the common classes.
STL class.
T any(T... args)
Set of flags defined by a C++11 enum class.
Definition: gz/common/FlagSet.hh:61
std::enable_if_t< ignition::common::IsEnumThatContainsSentinel< T >::value, ignition::common::FlagSet< T >> operator|(const T &_lhs, const T &_rhs)
Definition: gz/common/FlagSet.hh:379
bool Any() const
Test whether any flag is set.
Definition: gz/common/FlagSet.hh:283
bool operator!=(const FlagSet &_o) const
Test FlagSet inequality.
Definition: gz/common/FlagSet.hh:207
FlagSet operator&(const FlagSet &_val) const
Return a bit AND of this FlagSet and the argument.
Definition: gz/common/FlagSet.hh:145
T size(T... args)
static FlagSet AllSet()
Retrurn a FlagSet with all flags set to true.
Definition: gz/common/FlagSet.hh:303
FlagSet & Set(const T &_val, bool _value=true)
Set the given flag to the specified value.
Definition: gz/common/FlagSet.hh:257
FlagSet & Set()
Set all flags to true.
Definition: gz/common/FlagSet.hh:231
T reset(T... args)
friend std::ostream & operator<<(std::ostream &_stream, const FlagSet &_self)
Operator for outputting to std::ostream.
Definition: gz/common/FlagSet.hh:334
FlagSet & operator&=(const FlagSet &_o) noexcept
Return a bit AND of this FlagSet and the argument.
Definition: gz/common/FlagSet.hh:104
bool None() const
Test whether no flag is set.
Definition: gz/common/FlagSet.hh:297
static FlagSet NoneSet()
Retrurn a FlagSet with all flags set to false.
Definition: gz/common/FlagSet.hh:309
static constexpr size_t numElements
Number of elements of the bitset.
Definition: gz/common/FlagSet.hh:351
STL class.
bool operator==(const FlagSet &_o) const
Test FlagSet equality.
Definition: gz/common/FlagSet.hh:199
FlagSet(const T &_val)
Construct a FlagSet with the given flag set and all other unset.
Definition: gz/common/FlagSet.hh:72
T to_string(T... args)
FlagSet operator|(const FlagSet &_val) const
Return a bit OR of this FlagSet and the argument.
Definition: gz/common/FlagSet.hh:169
FlagSet operator~() const
Return a negation of this FlagSet.
Definition: gz/common/FlagSet.hh:179
constexpr bool operator[](const T &_val) const
Return whether the given flag is set.
Definition: gz/common/FlagSet.hh:318
FlagSet & operator|=(const FlagSet &_o) noexcept
Return a bit OR of this FlagSet and the argument.
Definition: gz/common/FlagSet.hh:122
FlagSet & operator|=(const T &_val) noexcept
Set the given flag to true in this FlagSet.
Definition: gz/common/FlagSet.hh:113
FlagSet(const std::initializer_list< T > &_list)
Construct a FlagSet with the given flags set and all other unset.
Definition: gz/common/FlagSet.hh:79
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: gz/common/FlagSet.hh:93
FlagSet & Reset()
Set all flags to false.
Definition: gz/common/FlagSet.hh:239
std::size_t Count() const
Return the number of flags set to true.
Definition: gz/common/FlagSet.hh:224
Definition: gz/common/Base64.hh:27
STL namespace.
FlagSet & Reset(const T &_val)
Set the given flag to false.
Definition: gz/common/FlagSet.hh:266
T count(T... args)
FlagSet & Flip(const T &_val)
Negate the given flag.
Definition: gz/common/FlagSet.hh:275
FlagSet operator|(const T &_val) const
Return a FlagSet with the given flag set to true.
Definition: gz/common/FlagSet.hh:157
T flip(T... args)
std::size_t operator()(const ignition::common::FlagSet< T, LastElement, ExcludeLast > &_s) const noexcept
Definition: gz/common/FlagSet.hh:393
std::string String() const
Return a string describing this FlagSet.
Definition: gz/common/FlagSet.hh:325
std::size_t Size() const
Return the total number of flags represented by this FlagSet.
Definition: gz/common/FlagSet.hh:216
Definition: gz/common/FlagSet.hh:360
T test(T... args)
T set(T... args)
bool All() const
Test whether all flags are set.
Definition: gz/common/FlagSet.hh:290
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: gz/common/FlagSet.hh:133