TaggedConvertor.convert

Convert from component to component.

Convert from component to component. In case when functional convertor's from argument is rooted in Object class, the convertor will attempt to downcast passed component to it's rightfull type. If not, the convertor will attempt to downcast from component to placeholding object of value that is accepted by functional convertor. For converted to component, in case when it is rooted in Object class nothing special is performed, while otherwise it will be wrapped into placeholding object allocated by allocator that will be returned to callee.

class TaggedConvertor(Tagged : TaggedAlgebraic!Union, Union)
const
Object
convert
(
in Object from
,
const TypeInfo to
,
RCIAllocator allocator = theAllocator
)

Parameters

from Object

original component that is to be converted.

to TypeInfo

destination object that will be constructed out for original one.

allocator RCIAllocator

optional allocator that could be used to construct to component.

Return Value

Type: Object

Resulting converted component.

Throws

ConvertorException when convertor is not able to convert from, or to component.

Meta