xtd 0.2.0
xtd::enum_object< std::nullptr_t > Class Template Reference

Definition

template<>
class xtd::enum_object< std::nullptr_t >

Provides the base class for enumerations.

Header
#include <xtd/enum_object>
Namespace
xtd
Library
xtd.core

Static Public Member Functions

template<typename enum_t >
static const xtd::enum_collection< enum_t > & get_entries () noexcept
 Retrieves an array of the std::pair<enum_t, xtd::ustring> of the constants in a specified enumeration. More...
 
template<typename enum_t >
static xtd::enum_collection< xtd::byteget_entries_as_byte () noexcept
 Retrieves an array of the std::pair<xtd::byte, xtd::ustring> of the constants in a specified enumeration. More...
 
template<typename enum_t >
static xtd::enum_collection< int16get_entries_as_int16 () noexcept
 Retrieves an array of the std::pair<int16, xtd::ustring> of the constants in a specified enumeration. More...
 
template<typename enum_t >
static xtd::enum_collection< int32get_entries_as_int32 () noexcept
 Retrieves an array of the std::pair<int32, xtd::ustring> of the constants in a specified enumeration. More...
 
template<typename enum_t >
static xtd::enum_collection< int64get_entries_as_int64 () noexcept
 Retrieves an array of the std::pair<int64, xtd::ustring> of the constants in a specified enumeration. More...
 
template<typename enum_t >
static xtd::enum_collection< sbyteget_entries_as_sbyte () noexcept
 Retrieves an array of the std::pair<sbyte, xtd::ustring> of the constants in a specified enumeration. More...
 
template<typename enum_t >
static xtd::enum_collection< uint16get_entries_as_uint16 () noexcept
 Retrieves an array of the std::pair<uint16, xtd::ustring> of the constants in a specified enumeration. More...
 
template<typename enum_t >
static xtd::enum_collection< uint32get_entries_as_uint32 () noexcept
 Retrieves an array of the std::pair<uint32, xtd::ustring> of the constants in a specified enumeration. More...
 
template<typename enum_t >
static xtd::enum_collection< uint64get_entries_as_uint64 () noexcept
 Retrieves an array of the std::pair<uint64, xtd::ustring> of the constants in a specified enumeration. More...
 
template<typename enum_t >
static xtd::ustring get_name (enum_t value) noexcept
 Retrieves the name of the constant in the specified enumeration that has the specified value. More...
 
template<typename enum_t >
static xtd::ustring get_name (enum_object< enum_t > value) noexcept
 Retrieves the name of the constant in the specified enumeration that has the specified value. More...
 
template<typename enum_t >
static xtd::ustring get_name (int32 value) noexcept
 Retrieves the name of the constant in the specified enumeration that has the specified value. More...
 
template<typename enum_t >
static xtd::ustring get_name (int64 value) noexcept
 Retrieves the name of the constant in the specified enumeration that has the specified value. More...
 
template<typename enum_t >
static std::vector< xtd::ustringget_names () noexcept
 Retrieves an array of the names of the constants in a specified enumeration. More...
 
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. More...
 
template<typename enum_t >
static std::vector< xtd::byteget_values_as_byte () noexcept
 Retrieves an array of the values of the constants in a specified enumeration. More...
 
template<typename enum_t >
static std::vector< int16get_values_as_int16 () noexcept
 Retrieves an array of the values of the constants in a specified enumeration. More...
 
template<typename enum_t >
static std::vector< int32get_values_as_int32 () noexcept
 Retrieves an array of the values of the constants in a specified enumeration. More...
 
template<typename enum_t >
static std::vector< int64get_values_as_int64 () noexcept
 Retrieves an array of the values of the constants in a specified enumeration. More...
 
template<typename enum_t >
static std::vector< sbyteget_values_as_sbyte () noexcept
 Retrieves an array of the values of the constants in a specified enumeration. More...
 
template<typename enum_t >
static std::vector< uint16get_values_as_uint16 () noexcept
 Retrieves an array of the values of the constants in a specified enumeration. More...
 
template<typename enum_t >
static std::vector< uint32get_values_as_uint32 () noexcept
 Retrieves an array of the values of the constants in a specified enumeration. More...
 
template<typename enum_t >
static std::vector< uint64get_values_as_uint64 () noexcept
 Retrieves an array of the values of the constants in a specified enumeration. More...
 
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. More...
 
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. More...
 
template<typename enum_t >
static enum_t parse (const xtd::ustring &value)
 Converts the xtd::ustring representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object. More...
 
template<typename enum_t >
static enum_t parse (const xtd::ustring &str, bool ignore_case)
 Converts the xtd::ustring representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object. More...
 
template<typename enum_t >
static xtd::byte to_byte (enum_t value) noexcept
 Converts this instance to byte. More...
 
template<typename enum_t >
static int16 to_int16 (enum_t value) noexcept
 Converts this instance to int16. More...
 
template<typename enum_t >
static int32 to_int32 (enum_t value) noexcept
 Converts this instance to int32. More...
 
template<typename enum_t >
static int64 to_int64 (enum_t value) noexcept
 Converts this instance to int64. More...
 
template<typename enum_t >
static sbyte to_sbyte (enum_t value) noexcept
 Converts this instance to signed byte. More...
 
template<typename enum_t >
static xtd::ustring to_string (enum_t value) noexcept
 Converts this instance to string. More...
 
template<typename enum_t >
static uint16 to_uint16 (enum_t value) noexcept
 Converts this instance to unsigned int16. More...
 
template<typename enum_t >
static uint32 to_uint32 (enum_t value) noexcept
 Converts this instance to unsigned int32. More...
 
template<typename enum_t >
static uint64 to_uint64 (enum_t value) noexcept
 Converts this instance to unsigned int64. More...
 
template<typename enum_t >
static bool try_parse (const xtd::ustring &value, enum_t &result) noexcept
 Converts the xtd::ustring 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. More...
 
template<typename enum_t >
static bool try_parse (const xtd::ustring &value, bool ignore_case, enum_t &result) noexcept
 Converts the xtd::ustring 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. More...
 

Member Function Documentation

◆ get_entries()

template<typename enum_t >
static const xtd::enum_collection<enum_t>& xtd::enum_object< std::nullptr_t >::get_entries ( )
inlinestaticnoexcept

Retrieves an array of the std::pair<enum_t, xtd::ustring> of the constants in a specified enumeration.

Returns
A xtd::ustring array of the values and names of the constants in enumType.

◆ get_entries_as_byte()

template<typename enum_t >
static xtd::enum_collection<xtd::byte> xtd::enum_object< std::nullptr_t >::get_entries_as_byte ( )
inlinestaticnoexcept

Retrieves an array of the std::pair<xtd::byte, xtd::ustring> of the constants in a specified enumeration.

Returns
A xtd::ustring array of the values and names of the constants in enumType.

◆ get_entries_as_int16()

template<typename enum_t >
static xtd::enum_collection<int16> xtd::enum_object< std::nullptr_t >::get_entries_as_int16 ( )
inlinestaticnoexcept

Retrieves an array of the std::pair<int16, xtd::ustring> of the constants in a specified enumeration.

Returns
A xtd::ustring array of the values and names of the constants in enumType.

◆ get_entries_as_int32()

template<typename enum_t >
static xtd::enum_collection<int32> xtd::enum_object< std::nullptr_t >::get_entries_as_int32 ( )
inlinestaticnoexcept

Retrieves an array of the std::pair<int32, xtd::ustring> of the constants in a specified enumeration.

Returns
A xtd::ustring array of the values and names of the constants in enumType.

◆ get_entries_as_int64()

template<typename enum_t >
static xtd::enum_collection<int64> xtd::enum_object< std::nullptr_t >::get_entries_as_int64 ( )
inlinestaticnoexcept

Retrieves an array of the std::pair<int64, xtd::ustring> of the constants in a specified enumeration.

Returns
A xtd::ustring array of the values and names of the constants in enumType.

◆ get_entries_as_sbyte()

template<typename enum_t >
static xtd::enum_collection<sbyte> xtd::enum_object< std::nullptr_t >::get_entries_as_sbyte ( )
inlinestaticnoexcept

Retrieves an array of the std::pair<sbyte, xtd::ustring> of the constants in a specified enumeration.

Returns
A xtd::ustring array of the values and names of the constants in enumType.

◆ get_entries_as_uint16()

template<typename enum_t >
static xtd::enum_collection<uint16> xtd::enum_object< std::nullptr_t >::get_entries_as_uint16 ( )
inlinestaticnoexcept

Retrieves an array of the std::pair<uint16, xtd::ustring> of the constants in a specified enumeration.

Returns
A xtd::ustring array of the values and names of the constants in enumType.

◆ get_entries_as_uint32()

template<typename enum_t >
static xtd::enum_collection<uint32> xtd::enum_object< std::nullptr_t >::get_entries_as_uint32 ( )
inlinestaticnoexcept

Retrieves an array of the std::pair<uint32, xtd::ustring> of the constants in a specified enumeration.

Returns
A xtd::ustring array of the values and names of the constants in enumType.

◆ get_entries_as_uint64()

template<typename enum_t >
static xtd::enum_collection<uint64> xtd::enum_object< std::nullptr_t >::get_entries_as_uint64 ( )
inlinestaticnoexcept

Retrieves an array of the std::pair<uint64, xtd::ustring> of the constants in a specified enumeration.

Returns
A xtd::ustring array of the values and names of the constants in enumType.

◆ get_name() [1/4]

template<typename enum_t >
static xtd::ustring xtd::enum_object< std::nullptr_t >::get_name ( enum_t  value)
inlinestaticnoexcept

Retrieves the name of the constant in the specified enumeration that has the specified value.

Parameters
valueThe value of a particular enumerated constant in terms of its underlying type.
Returns
A xtd::ustring containing the name of the enumerated constant in enumType whose value is value; or the value int32 to xtd::ustring if no such constant is found.
Exceptions
xtd::argument_exceptionThe value is ! a value of enumType.

◆ get_name() [2/4]

template<typename enum_t >
static xtd::ustring xtd::enum_object< std::nullptr_t >::get_name ( enum_object< enum_t >  value)
inlinestaticnoexcept

Retrieves the name of the constant in the specified enumeration that has the specified value.

Parameters
valueThe value of a particular enumerated constant in terms of its underlying type.
Returns
xtd::ustring A xtd::ustring containing the name of the enumerated constant in enumType whose value is value; or the value int32 to xtd::ustring if no such constant is found.
Exceptions
xtd::argument_exceptionThe value is ! a value of enumType.

◆ get_name() [3/4]

template<typename enum_t >
static xtd::ustring xtd::enum_object< std::nullptr_t >::get_name ( int32  value)
inlinestaticnoexcept

Retrieves the name of the constant in the specified enumeration that has the specified value.

Parameters
valueThe value of a particular enumerated constant in terms of its underlying type.
Returns
xtd::ustring A xtd::ustring containing the name of the enumerated constant in enumType whose value is value; or the value int32 to xtd::ustring if no such constant is found.
Exceptions
xtd::argument_exceptionThe value is ! a value of enumType.

◆ get_name() [4/4]

template<typename enum_t >
static xtd::ustring xtd::enum_object< std::nullptr_t >::get_name ( int64  value)
inlinestaticnoexcept

Retrieves the name of the constant in the specified enumeration that has the specified value.

Parameters
valueThe value of a particular enumerated constant in terms of its underlying type.
Returns
A xtd::ustring containing the name of the enumerated constant in enumType whose value is value; or the value int32 to xtd::ustring if no such constant is found.
Exceptions
xtd::argument_exceptionThe value is ! a value of enumType.

◆ get_names()

template<typename enum_t >
static std::vector<xtd::ustring> xtd::enum_object< std::nullptr_t >::get_names ( )
inlinestaticnoexcept

Retrieves an array of the names of the constants in a specified enumeration.

Returns
std::vector<xtd::ustring> A xtd::ustring array of the names of the constants in enumType.
Exceptions
xtd::argument_exceptionThe value is ! a value of enumType.

◆ get_values()

template<typename enum_t >
static std::vector<enum_t> xtd::enum_object< std::nullptr_t >::get_values ( )
inlinestaticnoexcept

Retrieves an array of the values of the constants in a specified enumeration.

Returns
Array<enum_t> An array that contains the values of the constants in enumType.
Exceptions
xtd::argument_exceptionThe value is ! a value of enumType.

◆ get_values_as_byte()

template<typename enum_t >
static std::vector<xtd::byte> xtd::enum_object< std::nullptr_t >::get_values_as_byte ( )
inlinestaticnoexcept

Retrieves an array of the values of the constants in a specified enumeration.

Returns
Array<xtd::byte> An array that contains the values of the constants in enumType.
Exceptions
xtd::argument_exceptionThe value is ! a value of enumType.

◆ get_values_as_int16()

template<typename enum_t >
static std::vector<int16> xtd::enum_object< std::nullptr_t >::get_values_as_int16 ( )
inlinestaticnoexcept

Retrieves an array of the values of the constants in a specified enumeration.

Returns
Array<int16> An array that contains the values of the constants in enumType.
Exceptions
xtd::argument_exceptionThe value is ! a value of enumType.

◆ get_values_as_int32()

template<typename enum_t >
static std::vector<int32> xtd::enum_object< std::nullptr_t >::get_values_as_int32 ( )
inlinestaticnoexcept

Retrieves an array of the values of the constants in a specified enumeration.

Returns
Array<int32> An array that contains the values of the constants in enumType.
Exceptions
xtd::argument_exceptionThe value is ! a value of enumType.

◆ get_values_as_int64()

template<typename enum_t >
static std::vector<int64> xtd::enum_object< std::nullptr_t >::get_values_as_int64 ( )
inlinestaticnoexcept

Retrieves an array of the values of the constants in a specified enumeration.

Returns
Array<int64> An array that contains the values of the constants in enumType.
Exceptions
xtd::argument_exceptionThe value is ! a value of enumType.

◆ get_values_as_sbyte()

template<typename enum_t >
static std::vector<sbyte> xtd::enum_object< std::nullptr_t >::get_values_as_sbyte ( )
inlinestaticnoexcept

Retrieves an array of the values of the constants in a specified enumeration.

Returns
Array<sbyte> An array that contains the values of the constants in enumType.
Exceptions
xtd::argument_exceptionThe value is ! a value of enumType.

◆ get_values_as_uint16()

template<typename enum_t >
static std::vector<uint16> xtd::enum_object< std::nullptr_t >::get_values_as_uint16 ( )
inlinestaticnoexcept

Retrieves an array of the values of the constants in a specified enumeration.

Returns
Array<uint16> An array that contains the values of the constants in enumType.
Exceptions
xtd::argument_exceptionThe value is ! a value of enumType.

◆ get_values_as_uint32()

template<typename enum_t >
static std::vector<uint32> xtd::enum_object< std::nullptr_t >::get_values_as_uint32 ( )
inlinestaticnoexcept

Retrieves an array of the values of the constants in a specified enumeration.

Returns
Array<uint32> An array that contains the values of the constants in enumType.
Exceptions
xtd::argument_exceptionThe value is ! a value of enumType.

◆ get_values_as_uint64()

template<typename enum_t >
static std::vector<uint64> xtd::enum_object< std::nullptr_t >::get_values_as_uint64 ( )
inlinestaticnoexcept

Retrieves an array of the values of the constants in a specified enumeration.

Returns
Array<uint64> An array that contains the values of the constants in enumType.
Exceptions
xtd::argument_exceptionThe value is ! a value of enumType.

◆ is_defined() [1/2]

template<typename enum_t >
static bool xtd::enum_object< std::nullptr_t >::is_defined ( enum_t  value)
inlinestaticnoexcept

Returns an indication whether a constant with a specified value exists in a specified enumeration.

Parameters
fromValueAn enumeration value.
Returns
true if a constant in enumType has a value equal to value; otherwise, false.
Exceptions
xtd::argument_exceptionThe value is ! a value of enumType.

◆ is_defined() [2/2]

template<typename enum_t >
static bool xtd::enum_object< std::nullptr_t >::is_defined ( enum_object< enum_t >  value)
inlinestaticnoexcept

Returns an indication whether a constant with a specified value exists in a specified enumeration.

Parameters
fromValueAn enumeration value.
Returns
true if a constant in enumType has a value equal to value; otherwise, false.
Exceptions
xtd::argument_exceptionThe value is ! a value of enumType.

◆ parse() [1/2]

template<typename enum_t >
static enum_t xtd::enum_object< std::nullptr_t >::parse ( const xtd::ustring value)
inlinestatic

Converts the xtd::ustring representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object.

Parameters
valueAn A xtd::ustring containing the name or value to convert.
Returns
enum_object An enum whose value is represented by value.
Exceptions
xtd::argument_exceptionThe value is ! a value of enumType.

◆ parse() [2/2]

template<typename enum_t >
static enum_t xtd::enum_object< std::nullptr_t >::parse ( const xtd::ustring str,
bool  ignore_case 
)
inlinestatic

Converts the xtd::ustring representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object.

Parameters
strAn A xtd::ustring containing the name or value to convert.
ignore_casetrue to Ignore case; false to regard case.
Returns
enum_object An enum whose value is represented by value.
Exceptions
xtd::argument_exceptionThe value is ! a value of enumType.

◆ to_byte()

template<typename enum_t >
static xtd::byte xtd::enum_object< std::nullptr_t >::to_byte ( enum_t  value)
inlinestaticnoexcept

Converts this instance to byte.

Returns
A new xtd::byte object converted from this instance.
Parameters
valueThe value to convert.

◆ to_int16()

template<typename enum_t >
static int16 xtd::enum_object< std::nullptr_t >::to_int16 ( enum_t  value)
inlinestaticnoexcept

Converts this instance to int16.

Parameters
valueThe value to convert.
Returns
A new to_int16 object converted from this instance.

◆ to_int32()

template<typename enum_t >
static int32 xtd::enum_object< std::nullptr_t >::to_int32 ( enum_t  value)
inlinestaticnoexcept

Converts this instance to int32.

Parameters
valueThe value to convert.
Returns
A new to_int32 object converted from this instance.

◆ to_int64()

template<typename enum_t >
static int64 xtd::enum_object< std::nullptr_t >::to_int64 ( enum_t  value)
inlinestaticnoexcept

Converts this instance to int64.

Parameters
valueThe value to convert.
Returns
A new to_int64 object converted from this instance.

◆ to_sbyte()

template<typename enum_t >
static sbyte xtd::enum_object< std::nullptr_t >::to_sbyte ( enum_t  value)
inlinestaticnoexcept

Converts this instance to signed byte.

Parameters
valueThe value to convert.
Returns
A new sbyte object converted from this instance.

◆ to_string()

template<typename enum_t >
static xtd::ustring xtd::enum_object< std::nullptr_t >::to_string ( enum_t  value)
inlinestaticnoexcept

Converts this instance to string.

Parameters
valueThe value to convert.
Returns
A new xtd::ustring converted from this instance.

◆ to_uint16()

template<typename enum_t >
static uint16 xtd::enum_object< std::nullptr_t >::to_uint16 ( enum_t  value)
inlinestaticnoexcept

Converts this instance to unsigned int16.

Parameters
valueThe value to convert.
Returns
A new to_uint16 object converted from this instance.

◆ to_uint32()

template<typename enum_t >
static uint32 xtd::enum_object< std::nullptr_t >::to_uint32 ( enum_t  value)
inlinestaticnoexcept

Converts this instance to unsigned int32.

Parameters
valueThe value to convert.
Returns
A new to_uint32 object converted from this instance.

◆ to_uint64()

template<typename enum_t >
static uint64 xtd::enum_object< std::nullptr_t >::to_uint64 ( enum_t  value)
inlinestaticnoexcept

Converts this instance to unsigned int64.

Parameters
valueThe value to convert.
Returns
A new to_uint64 object converted from this instance.

◆ try_parse() [1/2]

template<typename enum_t >
static bool xtd::enum_object< std::nullptr_t >::try_parse ( const xtd::ustring value,
enum_t &  result 
)
inlinestaticnoexcept

Converts the xtd::ustring 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.

Parameters
vaueThe xtd::ustring representation of the enumeration name or underlying value to convert.
resltWhen 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.
Returns
true if the value parameter was converted successfully; otherwise, false.

◆ try_parse() [2/2]

template<typename enum_t >
static bool xtd::enum_object< std::nullptr_t >::try_parse ( const xtd::ustring value,
bool  ignore_case,
enum_t &  result 
)
inlinestaticnoexcept

Converts the xtd::ustring 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.

Parameters
vaueThe xtd::ustring representation of the enumeration name or underlying value to convert.
ignore_casetrue to Ignore case; false to regard case.
resltWhen 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.
Returns
true if the value parameter was converted successfully; otherwise, false.

The documentation for this class was generated from the following file: