Unbox()

ObjectExt::Unbox(const SmartPtr<Object>&) method

Unboxes value types after converting to Object. Implementation for enum types.

template<typename T> static std::enable_if<std::is_enum<T>::value, T>::type System::ObjectExt::Unbox(const SmartPtr<Object> &obj)

Template parameters

ParameterDescription
TEnum type.

Arguments

ParameterTypeDescription
objconst SmartPtr<Object>&Object to unbox.

Return Value

Enum value.

ObjectExt::Unbox(const SmartPtr<Object>&) method

Unboxes value types after converting to Object. Implementation for non-enum & non-nullable types.

template<class T> static std::enable_if<!std::is_enum<T>::value &&detail::has_operator_equal<T>::value, T>::type System::ObjectExt::Unbox(const SmartPtr<Object> &obj)

Template parameters

ParameterDescription
TValue type.

Arguments

ParameterTypeDescription
objconst SmartPtr<Object>&Object to unbox.

Return Value

Unboxed value.

ObjectExt::Unbox(const SmartPtr<Object>&) method

Unboxes value types after converting to Object. Implementation for non-enum & non-nullable types.

template<class T> static std::enable_if<!std::is_enum<T>::value &&!detail::has_operator_equal<T>::value, T>::type System::ObjectExt::Unbox(const SmartPtr<Object> &obj)

Template parameters

ParameterDescription
TValue type.

Arguments

ParameterTypeDescription
objconst SmartPtr<Object>&Object to unbox.

Return Value

Unboxed value.

ObjectExt::Unbox(E) method

Unboxes enum types to integer.

template<class T,class E> static std::enable_if<std::is_enum<E>::value &&std::numeric_limits<T>::is_integer, T>::type System::ObjectExt::Unbox(E e)

Template parameters

ParameterDescription
TDestination integer type.
ESource enum type.

Arguments

ParameterTypeDescription
eEValue to unbox.

Return Value

Integer representation of enum.

ObjectExt::Unbox(E) method

Converts enum types.

template<class T,class E> static std::enable_if<std::is_enum<E>::value &&std::is_enum<T>::value, T>::type System::ObjectExt::Unbox(E e)

Template parameters

ParameterDescription
TDestination enum type.
ESource enum type.

Arguments

ParameterTypeDescription
eEValue to unbox.

Return Value

Converted enum value.

ObjectExt::Unbox(const SmartPtr<Object>&) method

Unboxes string values.

String System::ObjectExt::Unbox(const SmartPtr<Object> &obj)

Arguments

ParameterTypeDescription
objconst SmartPtr<Object>&Object to unbox

Return Value

String representation of boxed string, can be null if boxed string was null.

See Also