Skip to content

TAbstractObjectReader

Abstract driver class to read stored component data.

Declaration

Source position: classesh.inc line 1850

type

  TAbstractObjectReader = class
  public
    procedure FlushBuffer;
    function NextValue : TValueType;
    function ReadValue : TValueType;
    function CurrentValue : TValueType;
    procedure BeginRootComponent;
    procedure BeginComponent(var Flags: TFilerFlags; 
                        var AChildPos: Integer; 
                        var CompClassName: string; var CompName: string); overload;
    procedure BeginComponent(var Flags: TFilerFlags; 
                        var AChildPos: Integer; 
                        var CompUnitName: string; 
                        var CompClassName: string; var CompName: string); overload;
    function BeginProperty : string;
    procedure ReadPrefix;
    procedure Read;
    procedure ReadBinary;
    function ReadFloat : Extended;
    function ReadSingle : Single;
    function ReadDouble : Double;
    function ReadDate : TDateTime;
    function ReadCurrency : Currency;
    function ReadIdent : RawByteString;
    function ReadInt8 : ShortInt;
    function ReadInt16 : SmallInt;
    function ReadInt32 : LongInt;
    function ReadInt64 : Int64;
    function ReadSet : Integer;
    procedure ReadSignature;
    function ReadStr : RawByteString;
    function ReadString : RawByteString;
    function ReadWideString : WideString;
    function ReadUnicodeString : UnicodeString;
    procedure SkipComponent;
    procedure SkipValue;
  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.

Methods

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

See also

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