TBinaryObjectReader

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

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

Declaration

Source position: classesh.inc line 1421

Type
  TBinaryObjectReader = class (TAbstractObjectReader)
  protected
    FStream : TStream;
    FBuffer : Pointer;
    FBufSize : Integer;
    FBufPos : Integer;
    FBufEnd : Integer;
    function ReadWord : Word;
    function ReadDWord : LongWord;
    function ReadQWord : QWord;
    function ReadExtended : extended;
    procedure SkipProperty;
    procedure SkipSetBody;
  public
    constructor Create(Stream: TStream; BufSize: Integer);
    destructor Destroy;  Override;
    function NextValue : TValueType;  Override;
    function ReadValue : TValueType;  Override;
    procedure BeginRootComponent;  Override;
    procedure BeginComponent(var Flags: TFilerFlags; 
                            var AChildPos: Integer; 
                            var CompClassName: string; var CompName: string)
                            ;  Override;
    function BeginProperty : string;  Override;
    procedure Read(var Buf; Count: LongInt);  Override;
    procedure ReadBinary(const DestData: TMemoryStream);  Override;
    function ReadFloat : Extended;  Override;
    function ReadSingle : Single;  Override;
    function ReadDate : TDateTime;  Override;
    function ReadCurrency : Currency;  Override;
    function ReadIdent(ValueType: TValueType) : string;  Override;
    function ReadInt8 : ShortInt;  Override;
    function ReadInt16 : SmallInt;  Override;
    function ReadInt32 : LongInt;  Override;
    function ReadInt64 : Int64;  Override;
    function ReadSet(EnumType: Pointer) : Integer;  Override;
    procedure ReadSignature;  Override;
    function ReadStr : string;  Override;
    function ReadString(StringType: TValueType) : string;  Override;
    function ReadWideString : WideString;  Override;
    function ReadUnicodeString : UnicodeString;  Override;
    procedure SkipComponent(SkipComponentInfos: Boolean);  Override;
    procedure SkipValue;  Override;
  end
  ;

Description

The TBinaryObjectReader class reads component data stored in binary form in a file. For this, it overrides or implements all abstract methods from TAbstractObjectReader . No new functionality is added by this class, it is a driver class for the streaming system.

It should never be necessary to create an instance of this class directly. Instead, the TStream.WriteComponent call should be used.

Members

Member Type Visibility Description
BeginComponent Method public Start reading a component.
BeginProperty Method public Start reading a property.
BeginRootComponent Method public Start reading the root component.
Create Method public Creates a new binary data reader instance.
Destroy Method public Destroys the binary data reader.
FBufEnd Field protected
FBuffer Field protected
FBufPos Field protected
FBufSize Field protected
FStream Field protected
NextValue Method public Return the type of the next value.
Read Method public Read raw data from stream
ReadBinary Method public Start reading a binary value.
ReadCurrency Method public Read a currency value from the stream.
ReadDate Method public Read a date.
ReadDWord Method protected
ReadExtended Method protected
ReadFloat Method public Read a float value
ReadIdent Method public Read an identifier
ReadInt16 Method public Read a 16-bits integer.
ReadInt32 Method public Read a 32-bits integer.
ReadInt64 Method public Read a 64-bits integer.
ReadInt8 Method public Read an 8-bits integer.
ReadQWord Method protected
ReadSet Method public Read a set
ReadSignature Method public Reads the filer signature
ReadSingle Method public Read a single-size float value
ReadStr Method public Read a short string
ReadString Method public Read a string
ReadUnicodeString Method public Read a Unicode string value
ReadValue Method public Read the next value in the stream
ReadWideString Method public Read a widestring value from the stream.
ReadWord Method protected
SkipComponent Method public Skip a component's data
SkipProperty Method protected
SkipSetBody Method protected
SkipValue Method public Skip a value's data

Inheritance

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

See also

Name Description
Integer A signed 16-bits integer
Integer A signed 16-bits integer
Integer A signed 16-bits integer
TAbstractObjectReader Abstract driver class to read stored component data.
TBinaryObjectWriter Driver class which stores component data in binary form.
TStream Base class for streams.