TAbstractObjectReader

[Properties (by Name)][Methods (by Name)][Events (by Name)]

Abstract driver class to read stored component data.

Declaration

Source position: classesh.inc line 1384

Type
  TAbstractObjectReader = class
  public
    procedure FlushBuffer;  Virtual;
    function NextValue : TValueType;  Virtual;  Abstract;
    function ReadValue : TValueType;  Virtual;  Abstract;
    procedure BeginRootComponent;  Virtual;  Abstract;
    procedure BeginComponent(var Flags: TFilerFlags; 
                            var AChildPos: Integer; 
                            var CompClassName: string; var CompName: string)
                            ;  Virtual;  Abstract;
    function BeginProperty : string;  Virtual;  Abstract;
    procedure Read(var Buf; Count: LongInt);  Virtual;  Abstract;
    procedure ReadBinary(const DestData: TMemoryStream);  Virtual;  Abstract;
    function ReadFloat : Extended;  Virtual;  Abstract;
    function ReadSingle : Single;  Virtual;  Abstract;
    function ReadDate : TDateTime;  Virtual;  Abstract;
    function ReadCurrency : Currency;  Virtual;  Abstract;
    function ReadIdent(ValueType: TValueType) : string;  Virtual;  Abstract;
    function ReadInt8 : ShortInt;  Virtual;  Abstract;
    function ReadInt16 : SmallInt;  Virtual;  Abstract;
    function ReadInt32 : LongInt;  Virtual;  Abstract;
    function ReadInt64 : Int64;  Virtual;  Abstract;
    function ReadSet(EnumType: Pointer) : Integer;  Virtual;  Abstract;
    procedure ReadSignature;  Virtual;  Abstract;
    function ReadStr : string;  Virtual;  Abstract;
    function ReadString(StringType: TValueType) : string;  Virtual
                       ;  Abstract;
    function ReadWideString : WideString;  Virtual;  Abstract;
    function ReadUnicodeString : UnicodeString;  Virtual;  Abstract;
    procedure SkipComponent(SkipComponentInfos: Boolean);  Virtual
                           ;  Abstract;
    procedure SkipValue;  Virtual;  Abstract;
  end
  ;

Description

The Free Pascal streaming mechanism, while compatible with Delphi's mechanism, differs from it in the sense that the streaming mechanism uses a driver class when streaming components. The TAbstractObjectReader class is the base driver class for reading property values from streams. It consists entirely of abstract methods, which must be implemented by descendant classes.

Different streaming mechanisms can be implemented by making a descendant from TAbstractObjectReader. The TBinaryObjectReader class is such a descendant class, which streams data in binary (Delphi compatible) format.

All methods described in this class, must be implemented by descendant classes.

Members

Member Type Visibility Description
BeginComponent Method public Marks the reading of a new component.
BeginProperty Method public Marks the reading of a property value.
BeginRootComponent Method public Starts the reading of the root component.
FlushBuffer Method public Flush the buffer
NextValue Method public Returns the type of the next value in the stream.
Read Method public Read raw data from stream
ReadBinary Method public Read binary data from the stream.
ReadCurrency Method public Read a currency value from the stream.
ReadDate Method public Read a date value from the stream.
ReadFloat Method public Read a float value from the stream.
ReadIdent Method public Read an identifier from the stream.
ReadInt16 Method public Read a 16-bit integer from the stream.
ReadInt32 Method public Read a 32-bit integer from the stream.
ReadInt64 Method public Read a 64-bit integer from the stream.
ReadInt8 Method public Read an 8-bit integer from the stream.
ReadSet Method public Reads a set from the stream.
ReadSignature Method public Read resource signature
ReadSingle Method public Read a single (real-type) value from the stream.
ReadStr Method public Read a shortstring from the stream
ReadString Method public Read a string of type StringType from the stream.
ReadUnicodeString Method public Read a Unicode string value
ReadValue Method public Reads the type of the next value.
ReadWideString Method public Read a widestring value from the stream.
SkipComponent Method public Skip till the end of the component.
SkipValue Method public Skip the current value.

Inheritance

Class Description
TAbstractObjectReader Abstract driver class to read stored component data.

See also

Name Description
TBinaryObjectReader Driver class descendant which reads component data stored in binary format.