|
SPH
|
Wrapper of an integral value providing functions for reading and modifying individual bits. More...
#include <Flags.h>
Public Member Functions | |
| constexpr | Flags ()=default |
| Constructs empty flags. More... | |
| constexpr | Flags (const Flags &other) |
| Constucts flags by copying other object. More... | |
| template<typename... TArgs> | |
| constexpr | Flags (const TEnum flag, const TArgs... others) |
| Constructs object given a list of flags. More... | |
| constexpr | Flags (const EmptyFlags) |
| Constructs empty flags. More... | |
| Flags & | operator= (const Flags &other) |
| Copies other Flags object. More... | |
| Flags & | operator= (const TEnum flag) |
| Assigns a single flag, all previous flags are deleted. More... | |
| Flags & | operator= (const EmptyFlags) |
| Deletes all flags. More... | |
| constexpr INLINE bool | has (const TEnum flag) const |
| Checks if the object has a given flag. More... | |
| template<typename... TArgs> | |
| constexpr INLINE bool | hasAny (const TEnum flag, const TArgs... others) const |
| Checks if the object has any of given flags. More... | |
| template<typename... TArgs> | |
| constexpr INLINE bool | hasAll (const TEnum flag, const TArgs... others) const |
| Checks if the object has all of given flags. More... | |
| INLINE void | set (const TEnum flag) |
| Adds a single flag into the object. All previously stored flags are kept unchanged. More... | |
| INLINE void | unset (const TEnum flag) |
| Removed a single flag. More... | |
| INLINE void | setIf (const TEnum flag, const bool use) |
| Sets or removes given flag based given boolean value. More... | |
| INLINE TValue | value () const |
| Returns the underlying value. More... | |
| constexpr INLINE Flags | operator| (const TEnum flag) const |
| Returns a Flags object by adding a single flag to currently stored values. More... | |
| INLINE bool | operator== (const Flags &other) const |
| Checks for equality with other Flags object. More... | |
| INLINE bool | operator!= (const Flags &other) const |
| Checks for inequality with other Flags object. More... | |
Static Public Member Functions | |
| constexpr static Flags | fromValue (const TValue value) |
| Constructs object from underlying value. More... | |
Wrapper of an integral value providing functions for reading and modifying individual bits.
Constructs empty flags.