Character data converter do direct marshalling/unmarshalling of
character data (char or wchar - depending of Converter
)
into/from PolyORB's buffer. This allows to minimize speed penalty on
character data marshalling.
Character data Converter for char data have the following API (from PolyORB.GIOP_P.Code_Sets.Converers package:
type Converter is abstract tagged private; procedure Marshall (C : Converter; Buffer : access Buffers.Buffer_Type; Data : Types.Char; Error : in out Errors.Error_Container) is abstract; procedure Marshall (C : Converter; Buffer : access Buffers.Buffer_Type; Data : Types.String; Error : in out Errors.Error_Container) is abstract; procedure Unmarshall (C : Converter; Buffer : access Buffers.Buffer_Type; Data : out Types.Char; Error : in out Errors.Error_Container) is abstract; procedure Unmarshall (C : Converter; Buffer : access Buffers.Buffer_Type; Data : out Types.String; Error : in out Errors.Error_Container) is abstract;
Marshall subprograms do marshalling of one character or string of character into the buffer. Unmarshall subprograms do unmarshalling of one character or string of characters from the buffer.
Note: Depending on item size of character data (char/wchar) and GIOP version marshalling/unmarshalling algorithms may vary. For several situations marshalling of string is not equivalent to marshalling its length and marshalling one by one each string's character. Please refere to GIOP specifications for more details.
If marshalling/unmarshalling fails, subprograms must set Error
parameter to corresponding error, usually Data_Conversion_E
.
Note: We recommend to always use Data_Conversion_E error code with Minor status 1.
All Converters
(native, fallback and conversion) have similar
API. Wchar data converters differ only in parameter type.