DynamicCast()
Contents
[
Hide
]System::DynamicCast(const TFrom&) function
Performs dynamic cast on Exception objects.
template<typename TTo,typename TFrom> std::enable_if<IsExceptionWrapper<TFrom>::value &&IsExceptionWrapper<TTo>::value &&(std::is_convertible<TTo, TFrom>::value||std::is_base_of<TTo, TFrom>::value), TTo>::type System::DynamicCast(const TFrom &obj)
Template parameters
Parameter | Description |
---|---|
TTo | Target Exception type. |
TFrom | Source Exception type. |
Arguments
Parameter | Type | Description |
---|---|---|
obj | const TFrom& | Source pointer. |
Return Value
Cast result if cast is allowed.
- Deprecated
- Left for backwards compatibility. Use ExplicitCast instead.
System::DynamicCast(SmartPtr<TFrom> const&) function
Performs dynamic cast on SmartPtr objects.
template<typename TTo,typename TFrom> std::enable_if<!std::is_enum<TTo>::value &&!IsExceptionWrapper<TTo>::value, typenameCastResult<TTo>::type>::type System::DynamicCast(SmartPtr<TFrom> const &obj)
Template parameters
Parameter | Description |
---|---|
TTo | Target pointee type. |
TFrom | Source pointee type. |
Arguments
Parameter | Type | Description |
---|---|---|
obj | SmartPtr<TFrom> const& | Source pointer. |
Return Value
Cast result if cast is allowed.
- Deprecated
- Left for backwards compatibility. Use ExplicitCast instead.
System::DynamicCast(SmartPtr<TFrom>) function
Unboxes boxed enum via cast.
template<typename TTo,typename TFrom> std::enable_if<std::is_enum<TTo>::value, TTo>::type System::DynamicCast(SmartPtr<TFrom> obj)
Template parameters
Parameter | Description |
---|---|
TTo | Target enum type. |
TFrom | Source pointee type. |
Arguments
Parameter | Type | Description |
---|---|---|
obj | SmartPtr<TFrom> | Pointer to the object to unbox data from. |
Return Value
Unboxed enum value.
- Deprecated
- Left for backwards compatibility. Use ExplicitCast instead.
System::DynamicCast(std::nullptr_t) function
Performs dynamic cast of null objects.
template<typename TTo> CastResult<TTo>::type System::DynamicCast(std::nullptr_t) noexcept
Template parameters
Parameter | Description |
---|---|
TTo | Target pointee type. |
Return Value
nullptr.
- Deprecated
- Left for backwards compatibility. Use ExplicitCast instead.
System::DynamicCast(TFrom&) function
Performs dynamic cast on non-pointer objects.
template<typename TTo,typename TFrom> std::enable_if<!IsExceptionWrapper<TFrom>::value &&!IsSmartPtr<TFrom>::value &&std::is_convertible<TTo, TFrom>::value, TTo>::type System::DynamicCast(TFrom &obj)
Template parameters
Parameter | Description |
---|---|
TTo | Target type. |
TFrom | Source type. |
Arguments
Parameter | Type | Description |
---|---|---|
obj | TFrom& | Source object. |
Return Value
Cast result.
- Deprecated
- Left for backwards compatibility. Use ExplicitCast instead.
System::DynamicCast(SmartPtr<TFrom>) function
Performs dynamic cast on Objects to Exception objects.
template<typename TTo,typename TFrom> std::enable_if<std::is_same<System::Object, TFrom>::value &&IsExceptionWrapper<TTo>::value, TTo>::type System::DynamicCast(SmartPtr<TFrom> obj)
Template parameters
Parameter | Description |
---|---|
TTo | Target Exception type. |
TFrom | Object type. |
Arguments
Parameter | Type | Description |
---|---|---|
obj | SmartPtr<TFrom> | Source pointer. |
Return Value
Cast result if cast is allowed.
- Deprecated
- Left for backwards compatibility. Use ExplicitCast instead.
System::DynamicCast(TFrom) function
Performs dynamic cast from IntPtr to pointer.
template<typename TTo,typename TFrom> std::enable_if<std::is_pointer<TTo>::value &&std::is_same<IntPtr, TFrom>::value, TTo>::type System::DynamicCast(TFrom value) noexcept
Template parameters
Parameter | Description |
---|---|
TTo | Target type. |
TFrom | Source type. |
Arguments
Parameter | Type | Description |
---|---|---|
value | TFrom | Source IntPtr value. |
Return Value
Cast result.
- Deprecated
- Left for backwards compatibility. Use ExplicitCast instead.
See Also
- Class SmartPtr
- Class Object
- Struct IsExceptionWrapper
- Struct CastResult
- Struct IsSmartPtr
- Namespace System
- Library Aspose.Slides