TROSerializer

Overview

The TROSerializer is the base abstract class for all message serializers i.e. classes responsible for encoding and decoding data of various types to the form that is necessary to create a message of a particular type. The class declares a number of methods to read and write data.
This class and its descendants are for internal use only, users do not benefit from using it.

Location


 

constructor Create

Creates a new instance.

constructor Create

BeginReadObject  protected virtual

Deserializes data of any object type.

procedure BeginReadObject(const aName: string; aCustom: IROCustomStreamableType; var aLevelRef: IUnknown; var aIsValidType: Boolean; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • aCustom: Output parameter, should point to the deserialized instance.
  • aLevelRef: specified what string should be read (AnsiString or UTF8String)
  • aIsValidType: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.
  • ArrayElementId: Specifies the maximum string length to read, is set to -1 when no restriction is required.

BeginWriteObject  protected virtual

Serializes data of any object type.

procedure BeginWriteObject(const aName: string; aCustom: IROCustomStreamableType; var aLevelRef: IUnknown; var aIsValidType: Boolean; out aIsAssigned: Boolean; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • aCustom: Object
  • aLevelRef: Reference to owner object.
  • aIsValidType: Output parameter, setting this to false indicates that the object cannot be written because the object type is unknown. Should return true.
  • aIsAssigned: Output parameter, indicates that the object about to be written is considered assigned.
  • ArrayElementId: If the object being written is an array element, its index is contained in this parameter, otherwise it is -1.

CleanupClassName  protected

function CleanupClassName(aClassName: string): string

Parameters:

  • aClassName:

DefaultNamespaces

Default namespace

property DefaultNamespaces: TStrings read write

EndReadObject  protected virtual

Deserializes data of any object type.

procedure EndReadObject(const aName: string; aCustom: IROCustomStreamableType; const aLevelRef: IUnknown)

Parameters:

  • aName: Name of the object that has been written.
  • aCustom: Object
  • aLevelRef: Reference to owner object.

EndWriteObject  protected virtual

Serializes data of any object type.

procedure EndWriteObject(const aName: string; aCustom: IROCustomStreamableType; const aLevelRef: IUnknown)

Parameters:

  • aName: Name of the object that has been written.
  • aCustom: Object
  • aLevelRef: Reference to owner object.

GetArrayElementName (PTypeInfo, Pointer): string  overload virtual

Returns the name that is used for the array element instance when (de)serializing. Used for message formats where entities are named, such as SOAP.

function GetArrayElementName(anItemType: PTypeInfo; anItemReference: Pointer): string

Parameters:

  • anItemType: Runtime type information for the element type.
  • anItemReference: Points to the array element.

GetArrayElementName (string): string  overload virtual

Returns the name that is used for the array element instance when (de)serializing

function GetArrayElementName(anItemType: string): string

Parameters:

  • anItemType: Runtime type information for the element type.

IsROCustomStreamable  protected

Determines if the instance is custom streamable by testing for the IROCustomStreamableType interface implementation.

function IsROCustomStreamable(aClass: TClass): Boolean

Parameters:

  • aClass: Class to test.

MaxStringSize

property MaxStringSize: Integer read write

Read

The general method to read any data.

procedure Read(const aName: string; aTypeInfo: PTypeInfo; var Ptr: ; ArrayElementId: Integer; Attributes: TParamAttributes)

Parameters:

  • aName: Name of the object to read.
  • aTypeInfo: Runtime type information for the data to read.
  • Ptr: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.
  • Attributes: Attributes

ReadArray  virtual abstract

Reads an array value.

function ReadArray(const aName: string; aClass: TClass; var Ref: ; ArrayElementId: Integer): Boolean

Parameters:

  • aName: Name of the object to read.
  • aClass: Class of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadArrayWithErrorHandling

Reads an array value.

function ReadArrayWithErrorHandling(const aName: string; aClass: TClass; out Value: ; ArrayElementId: Integer): Boolean

Parameters:

  • aName: Name of the object to read.
  • aClass: Class of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadBinary  virtual abstract

Reads a Binary value.

procedure ReadBinary(const aName: string; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadBinaryWithErrorHandling

Reads a Binary value.

procedure ReadBinaryWithErrorHandling(const aName: string; out Value: Binary; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadBoolean  virtual

Reads a Boolean value.

procedure ReadBoolean(const aName: string; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadBooleanWithErrorHandling

Reads a Boolean value.

procedure ReadBooleanWithErrorHandling(const aName: string; out Value: Boolean; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadCurrency  virtual

Reads a Currency value.

procedure ReadCurrency(const aName: string; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadCurrencyWithErrorHandling

Reads a Currency value.

procedure ReadCurrencyWithErrorHandling(const aName: string; out Value: Currency; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDateTime  virtual abstract

Reads a TDateTime value.

procedure ReadDateTime(const aName: string; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDateTimeWithErrorHandling

Reads a TDateTime value.

procedure ReadDateTimeWithErrorHandling(const aName: string; out Value: TDateTime; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDecimal  virtual abstract

Reads a Decimal value.

procedure ReadDecimal(const aName: string; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDecimalWithErrorHandling

Reads a Decimal value.

procedure ReadDecimalWithErrorHandling(const aName: string; out Value: Decimal; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDecimalWithErrorHandling_cpp

Reads a Decimal value.

procedure ReadDecimalWithErrorHandling_cpp(const aName: string; var Value: Variant; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDouble  virtual abstract

Reads a Double value.

procedure ReadDouble(const aName: string; aFloatType: TFloatType; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • aFloatType: Specifies the exact floating point type to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDouble_  virtual

Reads a Double value.

procedure ReadDouble_(const aName: string; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDoubleWithErrorHandling (string, TFloatType, , Integer)  overload

Reads a Double value.

procedure ReadDoubleWithErrorHandling(const aName: string; aFloatType: TFloatType; out Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • aFloatType: Specifies the exact floating point type to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDoubleWithErrorHandling (string, Double, Integer)  overload

Reads a Double value.

procedure ReadDoubleWithErrorHandling(const aName: string; out Value: Double; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadEnumerated  virtual abstract

Reads an enumerated value.

procedure ReadEnumerated(const aName: string; anEnumTypeInfo: PTypeInfo; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • anEnumTypeInfo: Runtime type information for the enuymerated type to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadEnumeratedWithErrorHandling

Reads an enumerated value.

procedure ReadEnumeratedWithErrorHandling(const aName: string; anEnumTypeInfo: PTypeInfo; out Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • anEnumTypeInfo: Runtime type information for the enuymerated type to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadException  virtual abstract

Reads an Exception value.

procedure ReadException(const aName: string; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadExceptionWithErrorHandling

Reads an Exception value.

procedure ReadExceptionWithErrorHandling(const aName: string; out Value: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadGuid  virtual abstract

Reads a GUID value.

procedure ReadGuid(const aName: string; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadGuidWithErrorHandling

Reads a GUID value.

procedure ReadGuidWithErrorHandling(const aName: string; out Value: TGuidString; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadInt32  virtual

Reads a Integer value.

procedure ReadInt32(const aName: string; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadInt32WithErrorHandling

Reads a Integer value.

procedure ReadInt32WithErrorHandling(const aName: string; out Value: Integer; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadInt64  virtual abstract

Reads a Int64 value.

procedure ReadInt64(const aName: string; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadInt64WithErrorHandling

Reads a Int64 value.

procedure ReadInt64WithErrorHandling(const aName: string; out Value: Int64; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadInteger  virtual abstract

Reads a Integer value (32 bits or less).

procedure ReadInteger(const aName: string; anOrdType: TOrdType; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • anOrdType: Specifies the exact integer point type to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadIntegerWithErrorHandling

Reads a Integer value (32 bits or less).

procedure ReadIntegerWithErrorHandling(const aName: string; anOrdType: TOrdType; out Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • anOrdType: Specifies the exact integer point type to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadLegacyString  virtual abstract

Reads an AnsiString / Utf8String value.

procedure ReadLegacyString(const aName: string; var Ref: ; ExtraAttributes: TParamAttributes; ArrayElementId: Integer; aMaxLength: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ExtraAttributes: specified what string should be read (AnsiString or UTF8String)
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.
  • aMaxLength: Specifies the maximum string length to read, is set to -1 when no restriction is required.

ReadLegacyStringWithErrorHandling

Reads an AnsiString / Utf8String value.

procedure ReadLegacyStringWithErrorHandling(const aName: string; out Value: string; ExtraAttributes: TParamAttributes; ArrayElementId: Integer; aMaxLength: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ExtraAttributes: specified what string should be read (AnsiString or UTF8String)
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.
  • aMaxLength: Specifies the maximum string length to read, is set to -1 when no restriction is required.

ReadNullableBoolean  virtual abstract

Reads a NullableBoolean value.

procedure ReadNullableBoolean(const aName: string; out aValue: NullableBoolean; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • aValue: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableBooleanWithErrorHandling

Reads a NullableBoolean value.

procedure ReadNullableBooleanWithErrorHandling(const aName: string; out Value: NullableBoolean; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableCurrency  virtual abstract

Reads a NullableCurrency value.

procedure ReadNullableCurrency(const aName: string; out aValue: NullableCurrency; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • aValue: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableCurrencyWithErrorHandling

Reads a NullableCurrency value.

procedure ReadNullableCurrencyWithErrorHandling(const aName: string; out Value: NullableCurrency; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableDateTime  virtual abstract

Reads a NullableDateTime value.

procedure ReadNullableDateTime(const aName: string; out aValue: NullableDateTime; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • aValue: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableDateTimeWithErrorHandling

Reads a NullableDateTime value.

procedure ReadNullableDateTimeWithErrorHandling(const aName: string; out Value: NullableDateTime; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableDecimal  virtual abstract

Reads a NullableDecimal value.

procedure ReadNullableDecimal(const aName: string; out aValue: NullableDecimal; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • aValue: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableDecimalWithErrorHandling

Reads a NullableDecimal value.

procedure ReadNullableDecimalWithErrorHandling(const aName: string; out Value: NullableDecimal; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableDouble  virtual abstract

Reads a NullableDouble value.

procedure ReadNullableDouble(const aName: string; out aValue: NullableDouble; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • aValue: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableDoubleWithErrorHandling

Reads a NullableDouble value.

procedure ReadNullableDoubleWithErrorHandling(const aName: string; out Value: NullableDouble; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableGuid  virtual abstract

Reads a NullableGuid value.

procedure ReadNullableGuid(const aName: string; out aValue: NullableGuid; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • aValue: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableGuidWithErrorHandling

Reads a NullableGuid value.

procedure ReadNullableGuidWithErrorHandling(const aName: string; out Value: NullableGuid; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableInt64  virtual abstract

Reads a NullableInt64 value.

procedure ReadNullableInt64(const aName: string; out aValue: NullableInt64; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • aValue: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableInt64WithErrorHandling

Reads a NullableInt64 value.

procedure ReadNullableInt64WithErrorHandling(const aName: string; out Value: NullableInt64; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableInteger  virtual abstract

Reads a NullableInteger value.

procedure ReadNullableInteger(const aName: string; out aValue: NullableInteger; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • aValue: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableIntegerWithErrorHandling

Reads a NullableInteger value.

procedure ReadNullableIntegerWithErrorHandling(const aName: string; out Value: NullableInteger; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadObject (TObject)  protected override

Deserializes data of any object type.

procedure ReadObject(aObject: TObject)

Parameters:

  • aObject: Object instance whose properties will be deserialized.

ReadObject (TObject)  protected virtual abstract    (declared in TROBaseSerializer)

Reads data of any object type.

procedure ReadObject(obj: TObject)

Parameters:

  • obj: given object

ReadROCustomStreamable  protected

Reads a custom streamable object.

procedure ReadROCustomStreamable(const aName: string; aCustom: TObject; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • aCustom: Object
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadStruct  virtual abstract

Reads a Struct value.

function ReadStruct(const aName: string; aClass: TClass; var Ref: ; ArrayElementId: Integer): Boolean

Parameters:

  • aName: Name of the object to read.
  • aClass: Class of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadStructWithErrorHandling

Reads a Struct value.

function ReadStructWithErrorHandling(const aName: string; aClass: TClass; out Value: ; ArrayElementId: Integer): Boolean

Parameters:

  • aName: Name of the object to read.
  • aClass: Class of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadUnicodeString  virtual abstract

Reads unicode string from stream

procedure ReadUnicodeString(const aName: string; var Ref: ; ArrayElementId: Integer; aMaxLength: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.
  • aMaxLength: Specifies the maximum string length to read, is set to -1 when no restriction is required.

ReadUnicodeStringWithErrorHandling

Reads unicode string from stream

procedure ReadUnicodeStringWithErrorHandling(const aName: string; out Value: UnicodeString; ArrayElementId: Integer; aMaxLength: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.
  • aMaxLength: Specifies the maximum string length to read, is set to -1 when no restriction is required.

ReadVariant  virtual abstract

Reads a Variant value.

procedure ReadVariant(const aName: string; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadVariantWithErrorHandling

Reads a Variant value.

procedure ReadVariantWithErrorHandling(const aName: string; out Value: Variant; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadXml  virtual abstract

Reads a XML value.

procedure ReadXml(const aName: string; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadXmlWithErrorHandling

Reads a XML value.

procedure ReadXmlWithErrorHandling(const aName: string; out Value: IXMLNode; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

RecordStrictOrder

Indicates whether the field order of the structures must be maintained the same order as in the RODL. If set to false, alphabetical order is used for the fields.

property RecordStrictOrder: Boolean read

Write

The general method to serialize any data.

procedure Write(const aName: string; aTypeInfo: PTypeInfo; const Ref: ; ArrayElementId: Integer; Attributes: TParamAttributes)

Parameters:

  • aName: Name of the object to write.
  • aTypeInfo: Runtime type information of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.
  • Attributes: Attributes

WriteArray  virtual abstract

Writes an array value.

procedure WriteArray(const aName: string; const Ref: ; aClass: TClass; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • aClass: Class of the object to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteBinary  virtual abstract

Writes a Binary value.

procedure WriteBinary(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteBoolean  virtual

Writes a Boolean value.

procedure WriteBoolean(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteCurrency  virtual

Writes a Currency value.

procedure WriteCurrency(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteDateTime  virtual abstract

Writes a TDateTime value.

procedure WriteDateTime(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteDecimal  virtual abstract

Writes a Decimal value.

procedure WriteDecimal(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteDouble  virtual abstract

Writes a Double value.

procedure WriteDouble(const aName: string; aFloatType: TFloatType; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • aFloatType: Specifies the exact floating point data type to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteDouble_  virtual

Writes a Double value.

procedure WriteDouble_(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteEnumerated  virtual abstract

Writes an enumerated value.

procedure WriteEnumerated(const aName: string; anEnumTypeInfo: PTypeInfo; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • anEnumTypeInfo: Runtime type information of the enumerated type.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteException  virtual abstract

Writes an Exception value.

procedure WriteException(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteGuid  virtual abstract

Writes a GUID value.

procedure WriteGuid(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteInt32  virtual

Writes a Integer value.

procedure WriteInt32(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteInt64  virtual abstract

Writes a Int64 value.

procedure WriteInt64(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteInteger  virtual abstract

Writes a Integer value (32 bits or less).

procedure WriteInteger(const aName: string; anOrdType: TOrdType; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • anOrdType: Specifies the exact integer data type to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteLegacyString  virtual abstract

Writes a legacy string (AnsiString or UTF8String) value.

procedure WriteLegacyString(const aName: string; const Ref: ; ExtraAttributes: TParamAttributes; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ExtraAttributes: specified what string should be written (AnsiString or UTF8String)
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteNullableBoolean  virtual abstract

Writes a NullableBoolean value.

procedure WriteNullableBoolean(const aName: string; aValue: NullableBoolean; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • aValue: Value to write.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteNullableCurrency  virtual abstract

Writes a NullableCurrency value.

procedure WriteNullableCurrency(const aName: string; aValue: NullableCurrency; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • aValue: Value to write.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteNullableDateTime  virtual abstract

Writes a NullableDateTime value.

procedure WriteNullableDateTime(const aName: string; aValue: NullableDateTime; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • aValue: Value to write.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteNullableDecimal  virtual abstract

Writes a NullableDecimal value.

procedure WriteNullableDecimal(const aName: string; aValue: NullableDecimal; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • aValue: Value to write.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteNullableDouble  virtual abstract

Writes a NullableDouble value.

procedure WriteNullableDouble(const aName: string; aValue: NullableDouble; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • aValue: Value to write.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteNullableGuid  virtual abstract

Writes a NullableGuid value.

procedure WriteNullableGuid(const aName: string; aValue: NullableGuid; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • aValue: Value to write.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteNullableInt64  virtual abstract

Writes a NullableInt64 value.

procedure WriteNullableInt64(const aName: string; aValue: NullableInt64; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • aValue: Value to write.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteNullableInteger  virtual abstract

Writes a NullableInteger value.

procedure WriteNullableInteger(const aName: string; aValue: NullableInteger; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • aValue: Value to write.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteObject (TObject)  protected override

Deserializes data of any object type.

procedure WriteObject(aObject: TObject)

Parameters:

  • aObject: Object instance whose properties will be deserialized.

WriteObject (TObject)  protected virtual abstract    (declared in TROBaseSerializer)

Writes data of any object type.

procedure WriteObject(obj: TObject)

Parameters:

  • obj: Object instance whose properties will be serialized.

WriteROCustomStreamable  protected

Writes a custom streamable object.

procedure WriteROCustomStreamable(const aName: string; aCustom: TObject; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • aCustom: Object
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteStruct  virtual abstract

Writes a Struct value.

procedure WriteStruct(const aName: string; const Ref: ; aClass: TClass; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • aClass: Class of the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteUnicodeString  virtual abstract

Writes a UnicodeString value.

procedure WriteUnicodeString(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteVariant  virtual abstract

Writes a Variant value.

procedure WriteVariant(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteXml  virtual abstract

Writes a XML value.

procedure WriteXml(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

 

DefaultNamespaces

Default namespace

property DefaultNamespaces: TStrings read write

MaxStringSize

property MaxStringSize: Integer read write

RecordStrictOrder

Indicates whether the field order of the structures must be maintained the same order as in the RODL. If set to false, alphabetical order is used for the fields.

property RecordStrictOrder: Boolean read

 

constructor Create

Creates a new instance.

constructor Create

BeginReadObject  protected virtual

Deserializes data of any object type.

procedure BeginReadObject(const aName: string; aCustom: IROCustomStreamableType; var aLevelRef: IUnknown; var aIsValidType: Boolean; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • aCustom: Output parameter, should point to the deserialized instance.
  • aLevelRef: specified what string should be read (AnsiString or UTF8String)
  • aIsValidType: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.
  • ArrayElementId: Specifies the maximum string length to read, is set to -1 when no restriction is required.

BeginWriteObject  protected virtual

Serializes data of any object type.

procedure BeginWriteObject(const aName: string; aCustom: IROCustomStreamableType; var aLevelRef: IUnknown; var aIsValidType: Boolean; out aIsAssigned: Boolean; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • aCustom: Object
  • aLevelRef: Reference to owner object.
  • aIsValidType: Output parameter, setting this to false indicates that the object cannot be written because the object type is unknown. Should return true.
  • aIsAssigned: Output parameter, indicates that the object about to be written is considered assigned.
  • ArrayElementId: If the object being written is an array element, its index is contained in this parameter, otherwise it is -1.

CleanupClassName  protected

function CleanupClassName(aClassName: string): string

Parameters:

  • aClassName:

EndReadObject  protected virtual

Deserializes data of any object type.

procedure EndReadObject(const aName: string; aCustom: IROCustomStreamableType; const aLevelRef: IUnknown)

Parameters:

  • aName: Name of the object that has been written.
  • aCustom: Object
  • aLevelRef: Reference to owner object.

EndWriteObject  protected virtual

Serializes data of any object type.

procedure EndWriteObject(const aName: string; aCustom: IROCustomStreamableType; const aLevelRef: IUnknown)

Parameters:

  • aName: Name of the object that has been written.
  • aCustom: Object
  • aLevelRef: Reference to owner object.

GetArrayElementName (PTypeInfo, Pointer): string  overload virtual

Returns the name that is used for the array element instance when (de)serializing. Used for message formats where entities are named, such as SOAP.

function GetArrayElementName(anItemType: PTypeInfo; anItemReference: Pointer): string

Parameters:

  • anItemType: Runtime type information for the element type.
  • anItemReference: Points to the array element.

GetArrayElementName (string): string  overload virtual

Returns the name that is used for the array element instance when (de)serializing

function GetArrayElementName(anItemType: string): string

Parameters:

  • anItemType: Runtime type information for the element type.

IsROCustomStreamable  protected

Determines if the instance is custom streamable by testing for the IROCustomStreamableType interface implementation.

function IsROCustomStreamable(aClass: TClass): Boolean

Parameters:

  • aClass: Class to test.

Read

The general method to read any data.

procedure Read(const aName: string; aTypeInfo: PTypeInfo; var Ptr: ; ArrayElementId: Integer; Attributes: TParamAttributes)

Parameters:

  • aName: Name of the object to read.
  • aTypeInfo: Runtime type information for the data to read.
  • Ptr: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.
  • Attributes: Attributes

ReadArray  virtual abstract

Reads an array value.

function ReadArray(const aName: string; aClass: TClass; var Ref: ; ArrayElementId: Integer): Boolean

Parameters:

  • aName: Name of the object to read.
  • aClass: Class of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadArrayWithErrorHandling

Reads an array value.

function ReadArrayWithErrorHandling(const aName: string; aClass: TClass; out Value: ; ArrayElementId: Integer): Boolean

Parameters:

  • aName: Name of the object to read.
  • aClass: Class of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadBinary  virtual abstract

Reads a Binary value.

procedure ReadBinary(const aName: string; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadBinaryWithErrorHandling

Reads a Binary value.

procedure ReadBinaryWithErrorHandling(const aName: string; out Value: Binary; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadBoolean  virtual

Reads a Boolean value.

procedure ReadBoolean(const aName: string; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadBooleanWithErrorHandling

Reads a Boolean value.

procedure ReadBooleanWithErrorHandling(const aName: string; out Value: Boolean; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadCurrency  virtual

Reads a Currency value.

procedure ReadCurrency(const aName: string; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadCurrencyWithErrorHandling

Reads a Currency value.

procedure ReadCurrencyWithErrorHandling(const aName: string; out Value: Currency; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDateTime  virtual abstract

Reads a TDateTime value.

procedure ReadDateTime(const aName: string; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDateTimeWithErrorHandling

Reads a TDateTime value.

procedure ReadDateTimeWithErrorHandling(const aName: string; out Value: TDateTime; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDecimal  virtual abstract

Reads a Decimal value.

procedure ReadDecimal(const aName: string; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDecimalWithErrorHandling

Reads a Decimal value.

procedure ReadDecimalWithErrorHandling(const aName: string; out Value: Decimal; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDecimalWithErrorHandling_cpp

Reads a Decimal value.

procedure ReadDecimalWithErrorHandling_cpp(const aName: string; var Value: Variant; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDouble  virtual abstract

Reads a Double value.

procedure ReadDouble(const aName: string; aFloatType: TFloatType; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • aFloatType: Specifies the exact floating point type to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDouble_  virtual

Reads a Double value.

procedure ReadDouble_(const aName: string; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDoubleWithErrorHandling (string, TFloatType, , Integer)  overload

Reads a Double value.

procedure ReadDoubleWithErrorHandling(const aName: string; aFloatType: TFloatType; out Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • aFloatType: Specifies the exact floating point type to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDoubleWithErrorHandling (string, Double, Integer)  overload

Reads a Double value.

procedure ReadDoubleWithErrorHandling(const aName: string; out Value: Double; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadEnumerated  virtual abstract

Reads an enumerated value.

procedure ReadEnumerated(const aName: string; anEnumTypeInfo: PTypeInfo; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • anEnumTypeInfo: Runtime type information for the enuymerated type to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadEnumeratedWithErrorHandling

Reads an enumerated value.

procedure ReadEnumeratedWithErrorHandling(const aName: string; anEnumTypeInfo: PTypeInfo; out Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • anEnumTypeInfo: Runtime type information for the enuymerated type to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadException  virtual abstract

Reads an Exception value.

procedure ReadException(const aName: string; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadExceptionWithErrorHandling

Reads an Exception value.

procedure ReadExceptionWithErrorHandling(const aName: string; out Value: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadGuid  virtual abstract

Reads a GUID value.

procedure ReadGuid(const aName: string; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadGuidWithErrorHandling

Reads a GUID value.

procedure ReadGuidWithErrorHandling(const aName: string; out Value: TGuidString; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadInt32  virtual

Reads a Integer value.

procedure ReadInt32(const aName: string; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadInt32WithErrorHandling

Reads a Integer value.

procedure ReadInt32WithErrorHandling(const aName: string; out Value: Integer; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadInt64  virtual abstract

Reads a Int64 value.

procedure ReadInt64(const aName: string; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadInt64WithErrorHandling

Reads a Int64 value.

procedure ReadInt64WithErrorHandling(const aName: string; out Value: Int64; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadInteger  virtual abstract

Reads a Integer value (32 bits or less).

procedure ReadInteger(const aName: string; anOrdType: TOrdType; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • anOrdType: Specifies the exact integer point type to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadIntegerWithErrorHandling

Reads a Integer value (32 bits or less).

procedure ReadIntegerWithErrorHandling(const aName: string; anOrdType: TOrdType; out Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • anOrdType: Specifies the exact integer point type to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadLegacyString  virtual abstract

Reads an AnsiString / Utf8String value.

procedure ReadLegacyString(const aName: string; var Ref: ; ExtraAttributes: TParamAttributes; ArrayElementId: Integer; aMaxLength: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ExtraAttributes: specified what string should be read (AnsiString or UTF8String)
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.
  • aMaxLength: Specifies the maximum string length to read, is set to -1 when no restriction is required.

ReadLegacyStringWithErrorHandling

Reads an AnsiString / Utf8String value.

procedure ReadLegacyStringWithErrorHandling(const aName: string; out Value: string; ExtraAttributes: TParamAttributes; ArrayElementId: Integer; aMaxLength: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ExtraAttributes: specified what string should be read (AnsiString or UTF8String)
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.
  • aMaxLength: Specifies the maximum string length to read, is set to -1 when no restriction is required.

ReadNullableBoolean  virtual abstract

Reads a NullableBoolean value.

procedure ReadNullableBoolean(const aName: string; out aValue: NullableBoolean; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • aValue: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableBooleanWithErrorHandling

Reads a NullableBoolean value.

procedure ReadNullableBooleanWithErrorHandling(const aName: string; out Value: NullableBoolean; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableCurrency  virtual abstract

Reads a NullableCurrency value.

procedure ReadNullableCurrency(const aName: string; out aValue: NullableCurrency; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • aValue: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableCurrencyWithErrorHandling

Reads a NullableCurrency value.

procedure ReadNullableCurrencyWithErrorHandling(const aName: string; out Value: NullableCurrency; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableDateTime  virtual abstract

Reads a NullableDateTime value.

procedure ReadNullableDateTime(const aName: string; out aValue: NullableDateTime; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • aValue: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableDateTimeWithErrorHandling

Reads a NullableDateTime value.

procedure ReadNullableDateTimeWithErrorHandling(const aName: string; out Value: NullableDateTime; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableDecimal  virtual abstract

Reads a NullableDecimal value.

procedure ReadNullableDecimal(const aName: string; out aValue: NullableDecimal; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • aValue: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableDecimalWithErrorHandling

Reads a NullableDecimal value.

procedure ReadNullableDecimalWithErrorHandling(const aName: string; out Value: NullableDecimal; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableDouble  virtual abstract

Reads a NullableDouble value.

procedure ReadNullableDouble(const aName: string; out aValue: NullableDouble; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • aValue: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableDoubleWithErrorHandling

Reads a NullableDouble value.

procedure ReadNullableDoubleWithErrorHandling(const aName: string; out Value: NullableDouble; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableGuid  virtual abstract

Reads a NullableGuid value.

procedure ReadNullableGuid(const aName: string; out aValue: NullableGuid; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • aValue: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableGuidWithErrorHandling

Reads a NullableGuid value.

procedure ReadNullableGuidWithErrorHandling(const aName: string; out Value: NullableGuid; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableInt64  virtual abstract

Reads a NullableInt64 value.

procedure ReadNullableInt64(const aName: string; out aValue: NullableInt64; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • aValue: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableInt64WithErrorHandling

Reads a NullableInt64 value.

procedure ReadNullableInt64WithErrorHandling(const aName: string; out Value: NullableInt64; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableInteger  virtual abstract

Reads a NullableInteger value.

procedure ReadNullableInteger(const aName: string; out aValue: NullableInteger; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • aValue: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadNullableIntegerWithErrorHandling

Reads a NullableInteger value.

procedure ReadNullableIntegerWithErrorHandling(const aName: string; out Value: NullableInteger; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadObject (TObject)  protected override

Deserializes data of any object type.

procedure ReadObject(aObject: TObject)

Parameters:

  • aObject: Object instance whose properties will be deserialized.

ReadObject (TObject)  protected virtual abstract    (declared in TROBaseSerializer)

Reads data of any object type.

procedure ReadObject(obj: TObject)

Parameters:

  • obj: given object

ReadROCustomStreamable  protected

Reads a custom streamable object.

procedure ReadROCustomStreamable(const aName: string; aCustom: TObject; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • aCustom: Object
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadStruct  virtual abstract

Reads a Struct value.

function ReadStruct(const aName: string; aClass: TClass; var Ref: ; ArrayElementId: Integer): Boolean

Parameters:

  • aName: Name of the object to read.
  • aClass: Class of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadStructWithErrorHandling

Reads a Struct value.

function ReadStructWithErrorHandling(const aName: string; aClass: TClass; out Value: ; ArrayElementId: Integer): Boolean

Parameters:

  • aName: Name of the object to read.
  • aClass: Class of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadUnicodeString  virtual abstract

Reads unicode string from stream

procedure ReadUnicodeString(const aName: string; var Ref: ; ArrayElementId: Integer; aMaxLength: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.
  • aMaxLength: Specifies the maximum string length to read, is set to -1 when no restriction is required.

ReadUnicodeStringWithErrorHandling

Reads unicode string from stream

procedure ReadUnicodeStringWithErrorHandling(const aName: string; out Value: UnicodeString; ArrayElementId: Integer; aMaxLength: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.
  • aMaxLength: Specifies the maximum string length to read, is set to -1 when no restriction is required.

ReadVariant  virtual abstract

Reads a Variant value.

procedure ReadVariant(const aName: string; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadVariantWithErrorHandling

Reads a Variant value.

procedure ReadVariantWithErrorHandling(const aName: string; out Value: Variant; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadXml  virtual abstract

Reads a XML value.

procedure ReadXml(const aName: string; var Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadXmlWithErrorHandling

Reads a XML value.

procedure ReadXmlWithErrorHandling(const aName: string; out Value: IXMLNode; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to read.
  • Value: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

Write

The general method to serialize any data.

procedure Write(const aName: string; aTypeInfo: PTypeInfo; const Ref: ; ArrayElementId: Integer; Attributes: TParamAttributes)

Parameters:

  • aName: Name of the object to write.
  • aTypeInfo: Runtime type information of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.
  • Attributes: Attributes

WriteArray  virtual abstract

Writes an array value.

procedure WriteArray(const aName: string; const Ref: ; aClass: TClass; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • aClass: Class of the object to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteBinary  virtual abstract

Writes a Binary value.

procedure WriteBinary(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteBoolean  virtual

Writes a Boolean value.

procedure WriteBoolean(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteCurrency  virtual

Writes a Currency value.

procedure WriteCurrency(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteDateTime  virtual abstract

Writes a TDateTime value.

procedure WriteDateTime(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteDecimal  virtual abstract

Writes a Decimal value.

procedure WriteDecimal(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteDouble  virtual abstract

Writes a Double value.

procedure WriteDouble(const aName: string; aFloatType: TFloatType; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • aFloatType: Specifies the exact floating point data type to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteDouble_  virtual

Writes a Double value.

procedure WriteDouble_(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteEnumerated  virtual abstract

Writes an enumerated value.

procedure WriteEnumerated(const aName: string; anEnumTypeInfo: PTypeInfo; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • anEnumTypeInfo: Runtime type information of the enumerated type.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteException  virtual abstract

Writes an Exception value.

procedure WriteException(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteGuid  virtual abstract

Writes a GUID value.

procedure WriteGuid(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteInt32  virtual

Writes a Integer value.

procedure WriteInt32(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteInt64  virtual abstract

Writes a Int64 value.

procedure WriteInt64(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteInteger  virtual abstract

Writes a Integer value (32 bits or less).

procedure WriteInteger(const aName: string; anOrdType: TOrdType; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • anOrdType: Specifies the exact integer data type to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteLegacyString  virtual abstract

Writes a legacy string (AnsiString or UTF8String) value.

procedure WriteLegacyString(const aName: string; const Ref: ; ExtraAttributes: TParamAttributes; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ExtraAttributes: specified what string should be written (AnsiString or UTF8String)
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteNullableBoolean  virtual abstract

Writes a NullableBoolean value.

procedure WriteNullableBoolean(const aName: string; aValue: NullableBoolean; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • aValue: Value to write.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteNullableCurrency  virtual abstract

Writes a NullableCurrency value.

procedure WriteNullableCurrency(const aName: string; aValue: NullableCurrency; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • aValue: Value to write.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteNullableDateTime  virtual abstract

Writes a NullableDateTime value.

procedure WriteNullableDateTime(const aName: string; aValue: NullableDateTime; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • aValue: Value to write.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteNullableDecimal  virtual abstract

Writes a NullableDecimal value.

procedure WriteNullableDecimal(const aName: string; aValue: NullableDecimal; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • aValue: Value to write.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteNullableDouble  virtual abstract

Writes a NullableDouble value.

procedure WriteNullableDouble(const aName: string; aValue: NullableDouble; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • aValue: Value to write.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteNullableGuid  virtual abstract

Writes a NullableGuid value.

procedure WriteNullableGuid(const aName: string; aValue: NullableGuid; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • aValue: Value to write.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteNullableInt64  virtual abstract

Writes a NullableInt64 value.

procedure WriteNullableInt64(const aName: string; aValue: NullableInt64; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • aValue: Value to write.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteNullableInteger  virtual abstract

Writes a NullableInteger value.

procedure WriteNullableInteger(const aName: string; aValue: NullableInteger; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • aValue: Value to write.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteObject (TObject)  protected override

Deserializes data of any object type.

procedure WriteObject(aObject: TObject)

Parameters:

  • aObject: Object instance whose properties will be deserialized.

WriteObject (TObject)  protected virtual abstract    (declared in TROBaseSerializer)

Writes data of any object type.

procedure WriteObject(obj: TObject)

Parameters:

  • obj: Object instance whose properties will be serialized.

WriteROCustomStreamable  protected

Writes a custom streamable object.

procedure WriteROCustomStreamable(const aName: string; aCustom: TObject; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • aCustom: Object
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteStruct  virtual abstract

Writes a Struct value.

procedure WriteStruct(const aName: string; const Ref: ; aClass: TClass; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • aClass: Class of the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteUnicodeString  virtual abstract

Writes a UnicodeString value.

procedure WriteUnicodeString(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteVariant  virtual abstract

Writes a Variant value.

procedure WriteVariant(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteXml  virtual abstract

Writes a XML value.

procedure WriteXml(const aName: string; const Ref: ; ArrayElementId: Integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.