|
uvw
1.3.0
|
Utility class to handle flags. More...
#include <util.hpp>
Public Member Functions | |
| constexpr | Flags (E flag) noexcept |
Constructs a Flags object from a value of the enum E. More... | |
| constexpr | Flags (Type f) |
Constructs a Flags object from an instance of the underlying type of the enum E. More... | |
| constexpr | Flags () |
| Constructs an uninitialized Flags object. | |
| constexpr Flags | operator| (const Flags &f) const noexcept |
| Or operator. More... | |
| constexpr Flags | operator| (E flag) const noexcept |
| Or operator. More... | |
| constexpr Flags | operator & (const Flags &f) const noexcept |
| And operator. More... | |
| constexpr Flags | operator & (E flag) const noexcept |
| And operator. More... | |
| constexpr | operator bool () const noexcept |
| Checks if this instance is initialized. More... | |
| constexpr | operator Type () const noexcept |
Casts the instance to the underlying type of E. More... | |
Static Public Member Functions | |
| template<E... V> | |
| static CONSTEXPR_SPECIFIER Flags< E > | from () |
| Utility factory method to pack a set of values all at once. More... | |
Utility class to handle flags.
This class can be used to handle flags of a same enumeration type.
It is meant to be used as an argument for functions and member methods and as part of events.
Flags<E> objects can be easily or-ed and and-ed with other instances of the same type or with instances of the type E (that is, the actual flag type), thus converted to the underlying type when needed.
|
inlinenoexcept |
|
inline |
|
inlinestatic |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineexplicitnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
1.8.13