Public Types | |
using | UnderlyingType = typename std::underlying_type< E >::type |
Alias for the enum's underlying type. More... | |
Static Public Member Functions | |
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) |
static bool | TryParse (const String &str, bool ignoreCase, E &result) |
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) |
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.
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 |
using System::Enum< E, Guard >::UnderlyingType = typename std::underlying_type<E>::type |
Alias for the enum's underlying type.
|
inlinestatic |
Performs the arithmetic comparison of the values of the specified enumeration constants.
a | The first comparand |
b | The second comparand |
a
is less than b
; 0 if the values are equal; 1 if a
is greater than b
|
inlinestatic |
Returns the name of the enumeration constant that has the specified value.
value | The value of enum constant whose name is to be returned |
|
inlinestatic |
Returns the name of the enumeration constant that has the specified value.
value | The value of enum constant whose name is to be returned |
|
inlinestatic |
Returns an array containing names of all members of enumeration E
.
|
inlinestatic |
Returns the underlying type of the enumeration.
|
inlinestatic |
Returns an array containing all members of enumeration E
.
|
inlinestatic |
Determines if the specified bits are set in a bitary representation of the specified enum value.
value | The enum value to test |
mask | The mask to check value's bits against |
mask
are also set in value
, otherwise - false
|
inlinestatic |
Determines whether the specified value is a member of enumeration type E
.
value | The value to check |
value
is a member of enumeration E
, otherwise - false
|
inlinestatic |
Determines whether the specified value is a member of enumeration type T
.
value | The value to check |
value
is a member of enumeration T
, otherwise - false
|
inlinestatic |
Determines if the value with the specified name is among members of enum E
.
name | The name to check |
E
with the specified name exists.
|
inlinestatic |
Converts the specfied string into equivalent enum constant.
str | String that is interpreted as containing the name of enum constant |
ignoreCase | Specifies if the case should be ignored when interpreting the string |
str
ArgumentException | If the enum constant with name specifed in str was not found aboung the members of enum E . |
|
inlinestatic |
Tries to convert the specified string into equivalent enum constant.
str | String that is interpreted as containing the name of enum constant |
result | The output parameter that if conversion succeeds contains the result of conversion on function |
|
inlinestatic |
Tries to convert the specified string into equivalent enum constant.
str | String that is interpreted as containing the name of enum constant |
ignoreCase | Specifies if the case should be ignored when interpreting the string |
result | The output parameter that if conversion succeeds contains the result of conversion on function return |