ExplicitCast()
System::ExplicitCast(const Source&) function
Casts the source type to the result type using explicit cast. Used when the source and the result types are the same.
template<typename Result,typename Source> std::enable_if_t<Details::CastType<Source, Result>::None, Result> System::ExplicitCast(const Source &value)
Template parameters
Parameter | Description |
---|---|
Source | The source type. |
Result | The result type. |
Arguments
Parameter | Type | Description |
---|---|---|
value | const Source& | Object to cast. |
Return Value
The cast result.
System::ExplicitCast(const Source&) function
Casts the source type to the result type using explicit cast. Used when simple constructor-like cast is needed.
template<typename Result,typename Source> std::enable_if_t<Details::CastType<Source, Result>::Static, Result> System::ExplicitCast(const Source &value)
Template parameters
Parameter | Description |
---|---|
Source | The source type. |
Result | The result type. |
Arguments
Parameter | Type | Description |
---|---|---|
value | const Source& | Object to cast. |
Return Value
The cast result.
System::ExplicitCast(const Source&) function
Casts the source type to the result type using explicit cast. Used for exception wrappers.
template<typename Result,typename Source> std::enable_if_t<Details::CastType<Source, Result>::Exception, Result> System::ExplicitCast(const Source &value)
Template parameters
Parameter | Description |
---|---|
Source | The source type. |
Result | The result type. |
Arguments
Parameter | Type | Description |
---|---|---|
value | const Source& | Object to cast. |
Return Value
The cast result.
System::ExplicitCast(const Source&) function
Casts the source type to the result type using explicit cast. Used for casting object to exception.
template<typename Result,typename Source> std::enable_if_t<Details::CastType<Source, Result>::ObjectToException, Result> System::ExplicitCast(const Source &value)
Template parameters
Parameter | Description |
---|---|
Source | The source type. |
Result | The result type. |
Arguments
Parameter | Type | Description |
---|---|---|
value | const Source& | Object to cast. |
Return Value
The cast result.
System::ExplicitCast(const Source&) function
Casts the source type to the result type using explicit cast. Used when the source and result both are smart pointers (without expicit SmartPtr<…> in result type).
template<typename Result,typename Source> std::enable_if_t<Details::CastType<Source, Result>::Pointer, typename CastResult<Result>::type> System::ExplicitCast(const Source &value)
Template parameters
Parameter | Description |
---|---|
Source | The source type. |
Result | The result type. |
Arguments
Parameter | Type | Description |
---|---|---|
value | const Source& | Object to cast. |
Return Value
The cast result.
System::ExplicitCast(Source) function
Casts the source type to the result type using explicit cast. Used when the casting raw pointer to smart pointer.
template<typename Result,typename Source> std::enable_if_t<Details::CastType<Source, Result>::RawPointer, typename CastResult<std::remove_pointer_t<Result>>::type> System::ExplicitCast(Source value)
Template parameters
Parameter | Description |
---|---|
Source | The source type. |
Result | The result type. |
Arguments
Parameter | Type | Description |
---|---|---|
value | Source | Object to cast. |
Return Value
The cast result.
System::ExplicitCast(const Source&) function
Casts the source type to the result type using explicit cast. Used when the source and result both are smart pointers (with expicit SmartPtr<…> in result type).
template<typename Result,typename Source> std::enable_if_t<Details::CastType<Source, Result>::PointerToPointer, Result> System::ExplicitCast(const Source &value)
Template parameters
Parameter | Description |
---|---|
Source | The source type. |
Result | The result type. |
Arguments
Parameter | Type | Description |
---|---|---|
value | const Source& | Object to cast. |
Return Value
The cast result.
System::ExplicitCast(const Source&) function
Casts the source type to the result type using explicit cast. Used for unboxing object to nullable.
template<typename Result,typename Source> std::enable_if_t<Details::CastType<Source, Result>::UnboxingToNullable, Result> System::ExplicitCast(const Source &value)
Template parameters
Parameter | Description |
---|---|
Source | The source type. |
Result | The result type. |
Arguments
Parameter | Type | Description |
---|---|---|
value | const Source& | Object to cast. |
Return Value
The cast result.
System::ExplicitCast(const Source&) function
Casts the source type to the result type using explicit cast. Used to box nullable.
template<typename Result,typename Source> std::enable_if_t<Details::CastType<Source, Result>::NullableBoxing, Result> System::ExplicitCast(const Source &value)
Template parameters
Parameter | Description |
---|---|
Source | The source type. |
Result | The result type. |
Arguments
Parameter | Type | Description |
---|---|---|
value | const Source& | Object to cast. |
Return Value
The cast result.
System::ExplicitCast(const Source&) function
Casts the source type to the result type using explicit cast. Used for unboxing nullable object.
template<typename Result,typename Source> std::enable_if_t<Details::CastType<Source, Result>::NullableUnboxing, Result> System::ExplicitCast(const Source &value)
Template parameters
Parameter | Description |
---|---|
Source | The source type. |
Result | The result type. |
Arguments
Parameter | Type | Description |
---|---|---|
value | const Source& | Object to cast. |
Return Value
The cast result.
System::ExplicitCast(const Source&) function
Casts the source type to the result type using explicit cast. Used for enum boxing.
template<typename Result,typename Source> std::enable_if_t<Details::CastType<Source, Result>::EnumBoxing, SmartPtr<BoxedValueBase>> System::ExplicitCast(const Source &value)
Template parameters
Parameter | Description |
---|---|
Source | The source type. |
Result | The result type. |
Arguments
Parameter | Type | Description |
---|---|---|
value | const Source& | Object to cast. |
Return Value
The cast result.
System::ExplicitCast(const Source&) function
Casts the source type to the result type using explicit cast. Used for common boxing.
template<typename Result,typename Source> std::enable_if_t<Details::CastType<Source, Result>::Boxing, typename CastResult<Result>::type> System::ExplicitCast(const Source &value)
Template parameters
Parameter | Description |
---|---|
Source | The source type. |
Result | The result type. |
Arguments
Parameter | Type | Description |
---|---|---|
value | const Source& | Object to cast. |
Return Value
The cast result.
System::ExplicitCast(const Source&) function
Casts the source type to the result type using explicit cast. Used for System::String boxing.
template<typename Result,typename Source> std::enable_if_t<Details::CastType<Source, Result>::StringBoxing, typename CastResult<Result>::type> System::ExplicitCast(const Source &value)
Template parameters
Parameter | Description |
---|---|
Source | The source type. |
Result | The result type. |
Arguments
Parameter | Type | Description |
---|---|---|
value | const Source& | Object to cast. |
Return Value
The cast result.
System::ExplicitCast(const Source&) function
Casts the source type to the result type using explicit cast. Used for common unboxing.
template<typename Result,typename Source> std::enable_if_t<Details::CastType<Source, Result>::Unboxing, Result> System::ExplicitCast(const Source &value)
Template parameters
Parameter | Description |
---|---|
Source | The source type. |
Result | The result type. |
Arguments
Parameter | Type | Description |
---|---|---|
value | const Source& | Object to cast. |
Return Value
The cast result.
System::ExplicitCast(const Source&) function
Casts the source type to the result type using explicit cast. Used for nullptr casting.
template<typename Result,typename Source> std::enable_if_t<Details::CastType<Source, Result>::Null, typename CastResult<Result>::type> System::ExplicitCast(const Source &value)
Template parameters
Parameter | Description |
---|---|
Source | The source type. |
Result | The result type. |
Arguments
Parameter | Type | Description |
---|---|---|
value | const Source& | Object to cast. |
Return Value
The cast result.
System::ExplicitCast(const Source&) function
Casts the source type to the result type using explicit cast. Used for casting between arrays.
template<typename Result,typename Source> std::enable_if_t<Details::CastType<Source, Result>::Array, typename CastResult<Result>::type> System::ExplicitCast(const Source &value)
Template parameters
Parameter | Description |
---|---|
Source | The source type. |
Result | The result type. |
Arguments
Parameter | Type | Description |
---|---|---|
value | const Source& | Object to cast. |
Return Value
The cast result.
See Also
- Typedef Exception
- Class SmartPtr
- Class BoxedValueBase
- Struct CastResult
- Namespace System
- Library Aspose.Slides