IROCustomStreamableArray
Overview
The IROCustomStreamableArray interface is used as part of the custom array. The IROCustomStreamableArray interface has the property Count, which contains the count of elements in the custom array. Count is used in the serialization (TROSerializer class) to get the count of elements in the custom array which came from the input stream and set the count of elements in the custom array to the output stream.
You can use this interface if you want adjust custom arrays as they are read from the input stream and written to the output stream.
For example:
fStream.Write(CustomArray.Count,SizeOf(ArraySize));
for i:=1 to CustomArray.Count do
begin
fStream.Write(CustomArray[i], SizeOf(CustomArray[i]));
end;
First, this code writes the count of elements in the custom array to the output stream fStream and then writes the elements of the custom array.
Location
- Unit: uROSerializer.pas
- Ancestry: IROCustomStreamableClass | IROCustomStreamableArray
Attributes (declared in IROCustomStreamableClass)
property Attributes: TStrings read
CanImplementType (declared in IROCustomStreamableType)
function CanImplementType(const aName: string): Boolean
Parameters:
- aName:
Count
Contains the count of elements in the array.
property Count: Integer read write
ElementType
property ElementType: string read
GetElementType
function GetElementType: string
IsNull (declared in IROCustomStreamableClass)
Identifies if this instance is a null.
function IsNull: Boolean
Read (declared in IROCustomStreamableType)
Retrieves an object state named aName
from aSerializer
into this instance.
procedure Read(aSerializer: TROSerializer; const aName: string; ArrayElementId: Integer)
Parameters:
- aSerializer: Serializer used to restore an object state.
- aName: Object state identifier.
- ArrayElementId:
SetNull (declared in IROCustomStreamableClass)
Marks this instance as a null.
procedure SetNull(aIsNull: Boolean)
Parameters:
- aIsNull: value
TypeName (declared in IROCustomStreamableType)
property TypeName: string read write
Write (declared in IROCustomStreamableType)
Stores a state of this instance designated as aName
into aSerializer
.
procedure Write(aSerializer: TROSerializer; const aName: string; ArrayElementId: Integer)
Parameters:
- aSerializer: Serializer used to store an object state.
- aName: Object state identifier.
- ArrayElementId:
Attributes (declared in IROCustomStreamableClass)
property Attributes: TStrings read
Count
Contains the count of elements in the array.
property Count: Integer read write
ElementType
property ElementType: string read
TypeName (declared in IROCustomStreamableType)
property TypeName: string read write
CanImplementType (declared in IROCustomStreamableType)
function CanImplementType(const aName: string): Boolean
Parameters:
- aName:
GetElementType
function GetElementType: string
IsNull (declared in IROCustomStreamableClass)
Identifies if this instance is a null.
function IsNull: Boolean
Read (declared in IROCustomStreamableType)
Retrieves an object state named aName
from aSerializer
into this instance.
procedure Read(aSerializer: TROSerializer; const aName: string; ArrayElementId: Integer)
Parameters:
- aSerializer: Serializer used to restore an object state.
- aName: Object state identifier.
- ArrayElementId:
SetNull (declared in IROCustomStreamableClass)
Marks this instance as a null.
procedure SetNull(aIsNull: Boolean)
Parameters:
- aIsNull: value
Write (declared in IROCustomStreamableType)
Stores a state of this instance designated as aName
into aSerializer
.
procedure Write(aSerializer: TROSerializer; const aName: string; ArrayElementId: Integer)
Parameters:
- aSerializer: Serializer used to store an object state.
- aName: Object state identifier.
- ArrayElementId: