SPH
|
Helper type allowing to "derive" from enum class. More...
#include <ExtendedEnum.h>
Public Types | |
using | BaseType = TBase |
Public Member Functions | |
ExtendedEnum ()=default | |
ExtendedEnum (const TBase value) | |
Implicit constructor from base. More... | |
template<typename TDerived , typename = std::enable_if_t<IsExtended<TDerived, TBase>::value>> | |
ExtendedEnum (const TDerived value) | |
Implicit constructor from derived. More... | |
operator TBase () const | |
Implicit conversion to base. More... | |
template<typename TDerived , typename = std::enable_if_t<IsExtended<TDerived, TBase>::value>> | |
operator TDerived () const | |
Explicit conversion to derived. More... | |
bool | operator< (const ExtendedEnum &other) const |
bool | operator== (const ExtendedEnum &other) const |
bool | operator== (const TBase &other) const |
template<typename TDerived , typename = std::enable_if_t<IsExtended<TDerived, TBase>::value>> | |
bool | operator== (const TDerived &other) const |
bool | operator!= (const ExtendedEnum &other) const |
Helper type allowing to "derive" from enum class.
To derive an enum, it is necessary to specialize IsExtended trait. Consider using SPH_EXTEND_ENUM macro.
Definition at line 24 of file ExtendedEnum.h.
using ExtendedEnum< TBase >::BaseType = TBase |
Definition at line 30 of file ExtendedEnum.h.
|
default |
|
inline |
Implicit constructor from base.
Definition at line 35 of file ExtendedEnum.h.
|
inline |
Implicit constructor from derived.
Definition at line 40 of file ExtendedEnum.h.
|
inline |
Implicit conversion to base.
Definition at line 44 of file ExtendedEnum.h.
|
inlineexplicit |
Explicit conversion to derived.
Definition at line 50 of file ExtendedEnum.h.
|
inline |
Definition at line 71 of file ExtendedEnum.h.
|
inline |
Definition at line 54 of file ExtendedEnum.h.
|
inline |
Definition at line 58 of file ExtendedEnum.h.
|
inline |
Definition at line 62 of file ExtendedEnum.h.
|
inline |
Definition at line 67 of file ExtendedEnum.h.