|
static const System::TypeInfo & | GetUnderlyingType () |
| Returns the underlying type of the enumeration. More...
|
|
static bool | HasFlag (E value, E mask) |
|
static bool | IsDefined (E value) |
|
template<class T > |
static std::enable_if< std::is_convertible< T, UnderlyingType >::value, bool >::type | IsDefined (T value) |
|
static bool | IsDefined (const String &name) |
|
template<class T > |
static std::enable_if< std::is_same< T, E >::value||std::is_convertible< T, UnderlyingType >::value, String >::type | GetName (T value) |
|
template<class T > |
static std::enable_if< std::is_same< T, E >::value||std::is_convertible< T, UnderlyingType >::value, String >::type | GetDescription (T value) |
|
static E | Parse (const String &str, bool ignoreCase=false) |
|
static bool | TryParse (const String &str, E &result, bool ignoreCase=false) |
|
static ArrayPtr< E > | GetValues () |
| Returns an array containing all members of enumeration E . More...
|
|
static ArrayPtr< String > | GetNames () |
| Returns an array containing names of all members of enumeration E . More...
|
|
template<typename T , typename _ = typename std::enable_if<std::is_arithmetic<T>::value || std::is_enum<T>::value>::type> |
static int | Compare (E a, T b) |
|
template<class E, class Guard = typename std::enable_if<std::is_enum<E>::value>::type>
struct System::Enum< E, Guard >
Provides methods that perform some operations on values of enum type. This is a static type with no instance services. You should never create instances of it by any means.
- Template Parameters
-
E | The type of enum on values of which the class handles |
Guard | Service type argument whose purpose is to ensure that E is enumerable type |
template<class E , class Guard = typename std::enable_if<std::is_enum<E>::value>::type>
template<typename T , typename _ = typename std::enable_if<std::is_arithmetic<T>::value || std::is_enum<T>::value>::type>
Performs the arithmetic comparison of the values of the specified enumeration constants.
- Parameters
-
a | The first comparand |
b | The second comparand |
- Returns
- -1 if
a
is less than b
; 0 if the values are equal; 1 if a
is greater than b