|
CppCommon 1.0.6.0
C++ Common Library
|
Enum-based flags. More...
#include <flags.h>
Public Member Functions | |
| Flags () noexcept | |
| Flags (type value) noexcept | |
| Flags (TEnum value) noexcept | |
| Flags (const Flags &) noexcept=default | |
| Flags (Flags &&) noexcept=default | |
| ~Flags () noexcept=default | |
| Flags & | operator= (type value) noexcept |
| Flags & | operator= (TEnum value) noexcept |
| Flags & | operator= (const Flags &) noexcept=default |
| Flags & | operator= (Flags &&) noexcept=default |
| operator bool () const noexcept | |
| Is any flag set? | |
| bool | operator! () const noexcept |
| Is no flag set? | |
| Flags | operator~ () const noexcept |
| Reverse all flags. | |
| Flags & | operator&= (const Flags &flags) noexcept |
| Flags logical assign operators. | |
| Flags & | operator|= (const Flags &flags) noexcept |
| Flags & | operator^= (const Flags &flags) noexcept |
| operator TEnum () const noexcept | |
| Convert to the enum value. | |
| bool | isset () const noexcept |
| Is any flag set? | |
| bool | isset (type value) const noexcept |
| Is the given flag set? | |
| bool | isset (TEnum value) const noexcept |
| Is the given flag set? | |
| TEnum | value () const noexcept |
| Get the enum value. | |
| type | underlying () const noexcept |
| Get the underlying enum value. | |
| std::bitset< sizeof(type) *8 > | bitset () const noexcept |
| Get the bitset value. | |
| void | swap (Flags &flags) noexcept |
| Swap two instances. | |
Friends | |
| Flags | operator& (const Flags &flags1, const Flags &flags2) noexcept |
| Flags logical friend operators. | |
| Flags | operator| (const Flags &flags1, const Flags &flags2) noexcept |
| Flags | operator^ (const Flags &flags1, const Flags &flags2) noexcept |
| bool | operator== (const Flags &flags1, const Flags &flags2) noexcept |
| bool | operator!= (const Flags &flags1, const Flags &flags2) noexcept |
| template<typename UEnum> | |
| void | swap (Flags< UEnum > &flags1, Flags< UEnum > &flags2) noexcept |
Enum-based flags.
Helper class for enum based flags which wraps particular enum as a template parameter and provides flags manipulation operators and methods.
Not thread-safe.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
defaultnoexcept |
|
defaultnoexcept |
|
defaultnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineexplicitnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
defaultnoexcept |
|
defaultnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
friend |