Box()
Contents
[
Hide
]ObjectExt::Box(const T&) method
Boxes value types for converting to Object. Implementation for enum types.
template<typename T> static std::enable_if<std::is_enum<T>::value, System::SmartPtr<System::Object>>::type System::ObjectExt::Box(const T &value)
Template parameters
Parameter | Description |
---|---|
T | Enum type. |
Arguments
Parameter | Type | Description |
---|---|---|
value | const T& | Enum value to box. |
Return Value
Smart pointer to object keeping boxed value.
ObjectExt::Box(const T&) method
Boxes value types for converting to Object. Implementation for non-enum types.
template<typename T> static std::enable_if<!std::is_enum<T>::value &&!IsNullable<T>::value, System::SmartPtr<System::Object>>::type System::ObjectExt::Box(const T &value)
Template parameters
Parameter | Description |
---|---|
T | Value type. |
Arguments
Parameter | Type | Description |
---|---|---|
value | const T& | Value to box. |
Return Value
Smart pointer to object keeping boxed value.
ObjectExt::Box(const T&) method
Boxes Nullable types for converting to Object.
template<typename T> static std::enable_if<IsNullable<T>::value, System::SmartPtr<System::Object>>::type System::ObjectExt::Box(const T &value)
Template parameters
Parameter | Description |
---|---|
T | Value type. |
Arguments
Parameter | Type | Description |
---|---|---|
value | const T& | Value to box. |
Return Value
Smart pointer to object keeping boxed value.
ObjectExt::Box(const String&) method
Boxes string values.
SmartPtr<Object> System::ObjectExt::Box(const String &value)
Arguments
Parameter | Type | Description |
---|---|---|
value | const String& | Value to box. |
Return Value
Boxed value or null, if source string is null.
See Also
- Class SmartPtr
- Class Object
- Class ObjectExt
- Class String
- Struct IsNullable
- Namespace System
- Library Aspose.Slides