17 constexpr Flag() =
default;
20 constexpr Flag(
const std::uint64_t f)
51 constexpr operator bool()
const
69 constexpr void setFlag(
const std::uint64_t f)
92 constexpr std::uint64_t flags()
const
The Flag class encapsulates flags which represents simple information. Used e.g. while mesh traversal...
Definition: Flag.hpp:14
constexpr Flag & operator|=(Flag const &f)
Sets flags_ to flags_ & f.flags_.
Definition: Flag.hpp:140
std::uint64_t flags_
Internal flag representation.
Definition: Flag.hpp:175
constexpr bool isUnset(Flag const &f) const
Returns !isSet(f)
Definition: Flag.hpp:162
constexpr bool isAnySet() const
Returns true if flags_ != 0.
Definition: Flag.hpp:168
constexpr Flag()=default
Constructs a unset Flag.
constexpr void setFlag(const std::uint64_t f)
Sets flags_ to flags_ | f.
Definition: Flag.hpp:69
friend Flag operator&(Flag r, Flag const &f)
Returns flags_ & f.flags_.
Definition: Flag.hpp:119
constexpr Flag & operator=(Flag const &f)
Assignment operator.
Definition: Flag.hpp:43
constexpr Flag operator~() const
Returns ~flags_.
Definition: Flag.hpp:148
constexpr void unsetFlag(Flag const &f)
Sets flags_ to flags_ & ~f.flags_.
Definition: Flag.hpp:87
constexpr Flag operator&=(Flag const &f)
Sets flags_ to flags_ &= f.flags_.
Definition: Flag.hpp:126
friend Flag operator+(Flag r, Flag const &f)
Returns flags_ | f.flags_.
Definition: Flag.hpp:98
constexpr bool operator!=(Flag const &f) const
Compares two Flags.
Definition: Flag.hpp:37
constexpr void setFlags(Flag const &f)
Set flags_.
Definition: Flag.hpp:63
constexpr Flag(const std::uint64_t f)
Constructs a Flag initialized by f.
Definition: Flag.hpp:20
friend Flag operator|(Flag r, Flag const &f)
Returns flags_ | f.flags_.
Definition: Flag.hpp:112
constexpr Flag(Flag &&)=default
Move constructor.
constexpr bool operator==(Flag const &f) const
Compares two Flags.
Definition: Flag.hpp:31
constexpr void unsetFlag(const std::uint64_t f)
Sets flags_ to flags_ & ~f.
Definition: Flag.hpp:81
friend Flag operator^(Flag r, Flag const &f)
Returns flags_ ^ f.flags_.
Definition: Flag.hpp:133
constexpr void setFlag(Flag const &f)
Sets flags_ to flags_ | f.flags_.
Definition: Flag.hpp:75
constexpr bool isSet(Flag const &f) const
Checks whether all set bits of f.flags_ are set in flags_ too.
Definition: Flag.hpp:156
constexpr void setFlags(const std::uint64_t f)
Set flags_.
Definition: Flag.hpp:57
constexpr Flag(Flag const &)=default
Copy constructor.
friend Flag operator-(Flag r, Flag const &f)
Returns flags_ & ~f.flags_.
Definition: Flag.hpp:105