Provides the base class for enumerations.
Public Static Methods | |
template<typename enum_t > | |
static const xtd::enum_collection< enum_t > & | get_entries () noexcept |
Retrieves an array of the xtd::collections::generic::key_value_pair<enum_t, xtd::string> of the constants in a specified enumeration. | |
template<typename enum_t > | |
static xtd::enum_collection< xtd::byte > | get_entries_as_byte () noexcept |
Retrieves an array of the xtd::collections::generic::key_value_pair<xtd::byte, xtd::string> of the constants in a specified enumeration. | |
template<typename enum_t > | |
static xtd::enum_collection< int16 > | get_entries_as_int16 () noexcept |
Retrieves an array of the xtd::collections::generic::key_value_pair<int16, xtd::string> of the constants in a specified enumeration. | |
template<typename enum_t > | |
static xtd::enum_collection< int32 > | get_entries_as_int32 () noexcept |
Retrieves an array of the xtd::collections::generic::key_value_pair<int32, xtd::string> of the constants in a specified enumeration. | |
template<typename enum_t > | |
static xtd::enum_collection< int64 > | get_entries_as_int64 () noexcept |
Retrieves an array of the xtd::collections::generic::key_value_pair<int64, xtd::string> of the constants in a specified enumeration. | |
template<typename enum_t > | |
static xtd::enum_collection< sbyte > | get_entries_as_sbyte () noexcept |
Retrieves an array of the xtd::collections::generic::key_value_pair<sbyte, xtd::string> of the constants in a specified enumeration. | |
template<typename enum_t > | |
static xtd::enum_collection< uint16 > | get_entries_as_uint16 () noexcept |
Retrieves an array of the xtd::collections::generic::key_value_pair<uint16, xtd::string> of the constants in a specified enumeration. | |
template<typename enum_t > | |
static xtd::enum_collection< uint32 > | get_entries_as_uint32 () noexcept |
Retrieves an array of the xtd::collections::generic::key_value_pair<uint32, xtd::string> of the constants in a specified enumeration. | |
template<typename enum_t > | |
static xtd::enum_collection< uint64 > | get_entries_as_uint64 () noexcept |
Retrieves an array of the xtd::collections::generic::key_value_pair<uint64, xtd::string> of the constants in a specified enumeration. | |
template<typename enum_t > | |
static xtd::string | get_name (enum_t value) noexcept |
Retrieves the name of the constant in the specified enumeration that has the specified value. | |
template<typename enum_t > | |
static xtd::string | get_name (enum_object< enum_t > value) noexcept |
Retrieves the name of the constant in the specified enumeration that has the specified value. | |
template<typename enum_t > | |
static xtd::string | get_name (int32 value) noexcept |
Retrieves the name of the constant in the specified enumeration that has the specified value. | |
template<typename enum_t > | |
static xtd::string | get_name (int64 value) noexcept |
Retrieves the name of the constant in the specified enumeration that has the specified value. | |
template<typename enum_t > | |
static std::vector< xtd::string > | get_names () noexcept |
Retrieves an array of the names of the constants in a specified enumeration. | |
template<typename enum_t > | |
static std::vector< enum_t > | get_values () noexcept |
Retrieves an array of the values of the constants in a specified enumeration. | |
template<typename enum_t > | |
static std::vector< xtd::byte > | get_values_as_byte () noexcept |
Retrieves an array of the values of the constants in a specified enumeration. | |
template<typename enum_t > | |
static std::vector< int16 > | get_values_as_int16 () noexcept |
Retrieves an array of the values of the constants in a specified enumeration. | |
template<typename enum_t > | |
static std::vector< int32 > | get_values_as_int32 () noexcept |
Retrieves an array of the values of the constants in a specified enumeration. | |
template<typename enum_t > | |
static std::vector< int64 > | get_values_as_int64 () noexcept |
Retrieves an array of the values of the constants in a specified enumeration. | |
template<typename enum_t > | |
static std::vector< sbyte > | get_values_as_sbyte () noexcept |
Retrieves an array of the values of the constants in a specified enumeration. | |
template<typename enum_t > | |
static std::vector< uint16 > | get_values_as_uint16 () noexcept |
Retrieves an array of the values of the constants in a specified enumeration. | |
template<typename enum_t > | |
static std::vector< uint32 > | get_values_as_uint32 () noexcept |
Retrieves an array of the values of the constants in a specified enumeration. | |
template<typename enum_t > | |
static std::vector< uint64 > | get_values_as_uint64 () noexcept |
Retrieves an array of the values of the constants in a specified enumeration. | |
template<typename enum_t > | |
static bool | is_defined (enum_t value) noexcept |
Returns an indication whether a constant with a specified value exists in a specified enumeration. | |
template<typename enum_t > | |
static bool | is_defined (enum_object< enum_t > value) noexcept |
Returns an indication whether a constant with a specified value exists in a specified enumeration. | |
template<typename enum_t > | |
static enum_t | parse (const xtd::string &value) |
Converts the xtd::string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object. | |
template<typename enum_t > | |
static enum_t | parse (const xtd::string &str, bool ignore_case) |
Converts the xtd::string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object. | |
template<typename enum_t > | |
static xtd::byte | to_byte (enum_t value) noexcept |
Converts this instance to byte. | |
template<typename enum_t > | |
static int16 | to_int16 (enum_t value) noexcept |
Converts this instance to int16. | |
template<typename enum_t > | |
static int32 | to_int32 (enum_t value) noexcept |
Converts this instance to int32. | |
template<typename enum_t > | |
static int64 | to_int64 (enum_t value) noexcept |
Converts this instance to int64. | |
template<typename enum_t > | |
static sbyte | to_sbyte (enum_t value) noexcept |
Converts this instance to signed byte. | |
template<typename enum_t > | |
static xtd::string | to_string (enum_t value) noexcept |
Converts this instance to string. | |
template<typename enum_t > | |
static uint16 | to_uint16 (enum_t value) noexcept |
Converts this instance to unsigned int16. | |
template<typename enum_t > | |
static uint32 | to_uint32 (enum_t value) noexcept |
Converts this instance to unsigned int32. | |
template<typename enum_t > | |
static uint64 | to_uint64 (enum_t value) noexcept |
Converts this instance to unsigned int64. | |
template<typename enum_t > | |
static bool | try_parse (const xtd::string &value, enum_t &result) noexcept |
Converts the xtd::string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object. The return value indicates whether the conversion succeeded. | |
template<typename enum_t > | |
static bool | try_parse (const xtd::string &value, bool ignore_case, enum_t &result) noexcept |
Converts the xtd::string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object. A parameter specifies whether the operation is case-sensitive. The return value indicates whether the conversion succeeded. | |
|
inlinestaticnoexcept |
Retrieves an array of the xtd::collections::generic::key_value_pair<enum_t, xtd::string> of the constants in a specified enumeration.
|
inlinestaticnoexcept |
Retrieves an array of the xtd::collections::generic::key_value_pair<xtd::byte, xtd::string> of the constants in a specified enumeration.
|
inlinestaticnoexcept |
Retrieves an array of the xtd::collections::generic::key_value_pair<int16, xtd::string> of the constants in a specified enumeration.
|
inlinestaticnoexcept |
Retrieves an array of the xtd::collections::generic::key_value_pair<int32, xtd::string> of the constants in a specified enumeration.
|
inlinestaticnoexcept |
Retrieves an array of the xtd::collections::generic::key_value_pair<int64, xtd::string> of the constants in a specified enumeration.
|
inlinestaticnoexcept |
Retrieves an array of the xtd::collections::generic::key_value_pair<sbyte, xtd::string> of the constants in a specified enumeration.
|
inlinestaticnoexcept |
Retrieves an array of the xtd::collections::generic::key_value_pair<uint16, xtd::string> of the constants in a specified enumeration.
|
inlinestaticnoexcept |
Retrieves an array of the xtd::collections::generic::key_value_pair<uint32, xtd::string> of the constants in a specified enumeration.
|
inlinestaticnoexcept |
Retrieves an array of the xtd::collections::generic::key_value_pair<uint64, xtd::string> of the constants in a specified enumeration.
|
inlinestaticnoexcept |
Retrieves the name of the constant in the specified enumeration that has the specified value.
value | The value of a particular enumerated constant in terms of its underlying type. |
xtd::argument_exception | The value is ! a value of enumType. |
|
inlinestaticnoexcept |
Retrieves the name of the constant in the specified enumeration that has the specified value.
value | The value of a particular enumerated constant in terms of its underlying type. |
xtd::argument_exception | The value is ! a value of enumType. |
|
inlinestaticnoexcept |
Retrieves the name of the constant in the specified enumeration that has the specified value.
value | The value of a particular enumerated constant in terms of its underlying type. |
xtd::argument_exception | The value is ! a value of enumType. |
|
inlinestaticnoexcept |
Retrieves the name of the constant in the specified enumeration that has the specified value.
value | The value of a particular enumerated constant in terms of its underlying type. |
xtd::argument_exception | The value is ! a value of enumType. |
|
inlinestaticnoexcept |
Retrieves an array of the names of the constants in a specified enumeration.
xtd::argument_exception | The value is ! a value of enumType. |
|
inlinestaticnoexcept |
Retrieves an array of the values of the constants in a specified enumeration.
xtd::argument_exception | The value is ! a value of enumType. |
|
inlinestaticnoexcept |
Retrieves an array of the values of the constants in a specified enumeration.
xtd::argument_exception | The value is ! a value of enumType. |
|
inlinestaticnoexcept |
Retrieves an array of the values of the constants in a specified enumeration.
xtd::argument_exception | The value is ! a value of enumType. |
|
inlinestaticnoexcept |
Retrieves an array of the values of the constants in a specified enumeration.
xtd::argument_exception | The value is ! a value of enumType. |
|
inlinestaticnoexcept |
Retrieves an array of the values of the constants in a specified enumeration.
xtd::argument_exception | The value is ! a value of enumType. |
|
inlinestaticnoexcept |
Retrieves an array of the values of the constants in a specified enumeration.
xtd::argument_exception | The value is ! a value of enumType. |
|
inlinestaticnoexcept |
Retrieves an array of the values of the constants in a specified enumeration.
xtd::argument_exception | The value is ! a value of enumType. |
|
inlinestaticnoexcept |
Retrieves an array of the values of the constants in a specified enumeration.
xtd::argument_exception | The value is ! a value of enumType. |
|
inlinestaticnoexcept |
Retrieves an array of the values of the constants in a specified enumeration.
xtd::argument_exception | The value is ! a value of enumType. |
|
inlinestaticnoexcept |
Returns an indication whether a constant with a specified value exists in a specified enumeration.
fromValue | An enumeration value. |
xtd::argument_exception | The value is ! a value of enumType. |
|
inlinestaticnoexcept |
Returns an indication whether a constant with a specified value exists in a specified enumeration.
fromValue | An enumeration value. |
xtd::argument_exception | The value is ! a value of enumType. |
|
inlinestatic |
Converts the xtd::string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object.
value | An A xtd::string containing the name or value to convert. |
xtd::argument_exception | The value is ! a value of enumType. |
|
inlinestatic |
Converts the xtd::string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object.
str | An A xtd::string containing the name or value to convert. |
ignore_case | true to Ignore case; false to regard case. |
xtd::argument_exception | The value is ! a value of enumType. |
|
inlinestaticnoexcept |
Converts this instance to byte.
value | The value to convert. |
|
inlinestaticnoexcept |
Converts this instance to int16.
value | The value to convert. |
|
inlinestaticnoexcept |
Converts this instance to int32.
value | The value to convert. |
|
inlinestaticnoexcept |
Converts this instance to int64.
value | The value to convert. |
|
inlinestaticnoexcept |
Converts this instance to signed byte.
value | The value to convert. |
|
inlinestaticnoexcept |
Converts this instance to string.
value | The value to convert. |
|
inlinestaticnoexcept |
Converts this instance to unsigned int16.
value | The value to convert. |
|
inlinestaticnoexcept |
Converts this instance to unsigned int32.
value | The value to convert. |
|
inlinestaticnoexcept |
Converts this instance to unsigned int64.
value | The value to convert. |
|
inlinestaticnoexcept |
Converts the xtd::string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object. The return value indicates whether the conversion succeeded.
vaue | The xtd::string representation of the enumeration name or underlying value to convert. |
reslt | When this method returns, result contains an object of type TEnum whose value is represented by value if the parse operation succeeds. If the parse operation fails, result contains the default value of the underlying type of TEnum. Note that this value need ! be a member of the TEnum enumeration. This parameter is passed uninitialized. |
|
inlinestaticnoexcept |
Converts the xtd::string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object. A parameter specifies whether the operation is case-sensitive. The return value indicates whether the conversion succeeded.
vaue | The xtd::string representation of the enumeration name or underlying value to convert. |
ignore_case | true to Ignore case; false to regard case. |
reslt | When this method returns, result contains an object of type TEnum whose value is represented by value if the parse operation succeeds. If the parse operation fails, result contains the default value of the underlying type of TEnum. Note that this value need ! be a member of the TEnum enumeration. This parameter is passed uninitialized. |