Unbox()
Contents
[
Hide
]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
Parameter | Description |
---|---|
T | Enum type. |
Arguments
Parameter | Type | Description |
---|---|---|
obj | const 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
Parameter | Description |
---|---|
T | Value type. |
Arguments
Parameter | Type | Description |
---|---|---|
obj | const 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
Parameter | Description |
---|---|
T | Value type. |
Arguments
Parameter | Type | Description |
---|---|---|
obj | const 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
Parameter | Description |
---|---|
T | Destination integer type. |
E | Source enum type. |
Arguments
Parameter | Type | Description |
---|---|---|
e | E | Value 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
Parameter | Description |
---|---|
T | Destination enum type. |
E | Source enum type. |
Arguments
Parameter | Type | Description |
---|---|---|
e | E | Value 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
Parameter | Type | Description |
---|---|---|
obj | const SmartPtr<Object>& | Object to unbox |
Return Value
String representation of boxed string, can be null if boxed string was null.