System::ObjectExt::UnknownToObject method

ObjectExt::UnknownToObject(T) method

Converts unknown type to Object, handling both smart pointer type and value type situations.

template<typename T> static std::enable_if<IsSmartPtr<T>::value, System::SmartPtr<Object>>::type System::ObjectExt::UnknownToObject(T obj)
ParameterDescription
TType to convert to Object.
ParameterTypeDescription
objTObject to convert.

ReturnValue

Smart pointer to Object being either converted pointer or boxed value.

See Also

ObjectExt::UnknownToObject(const T&) method

Converts unknown type to Object, handling both smart pointer type and value type situations.

template<typename T> static std::enable_if<!IsSmartPtr<T>::value, System::SmartPtr<Object>>::type System::ObjectExt::UnknownToObject(const T &obj)
ParameterDescription
TType to convert to Object.
ParameterTypeDescription
objconst T&Object to convert.

ReturnValue

Smart pointer to Object being either converted pointer or boxed value.

See Also