TBinaryObjectReader¶
Driver class descendant which reads component data stored in binary format.
Declaration¶
Source position: classesh.inc line 1891
type
TBinaryObjectReader = class(TAbstractObjectReader)
public
TBOVersion = (boVersion0,boVersion1);
public
const
UnitnameSeparator = '/';
DelphiDoubleValue = 21;
constructor Create;
destructor Destroy;
function NextValue : TValueType;
function ReadValue : TValueType;
procedure ReadPrefix;
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 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;
property Version: TBOVersion; {r}
property DelphiCompatible: Boolean; {rw}
end;
Inheritance¶
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.
Properties¶
| Member | Visibility | Description |
|---|---|---|
| DelphiCompatible | public | |
| Version read only | public |
Methods¶
| Member | Visibility | Description |
|---|---|---|
| BeginComponent | public | Start reading a component. |
| BeginProperty | public | Start reading a property. |
| BeginRootComponent | public | Start reading the root component. |
| Create | public | Creates a new binary data reader instance. |
| Destroy | public | Destroys the binary data reader. |
| NextValue | public | Return the type of the next value. |
| Read | public | Read raw data from stream. |
| ReadBinary | public | Start reading a binary value. |
| ReadCurrency | public | Read a currency value from the stream. |
| ReadDate | public | Read a date. |
| ReadDouble | public | |
| ReadFloat | public | Read a float value. |
| ReadIdent | public | Read an identifier. |
| ReadInt16 | public | Read a 16-bits integer. |
| ReadInt32 | public | Read a 32-bits integer. |
| ReadInt64 | public | Read a 64-bits integer. |
| ReadInt8 | public | Read an 8-bits integer. |
| ReadPrefix | public | |
| ReadSet | public | Read a set. |
| ReadSignature | public | Reads the filer signature. |
| ReadSingle | public | Read a single-size float value. |
| ReadStr | public | Read a short string. |
| ReadString | public | Read a string. |
| ReadUnicodeString | public | Read a Unicode string value. |
| ReadValue | public | Read the next value in the stream. |
| ReadWideString | public | Read a widestring value from the stream. |
| SkipComponent | public | Skip a component's data. |
| SkipValue | public | Skip a value's data. |
See also¶
| Name | Description |
|---|---|
| TAbstractObjectReader | Abstract driver class to read stored component data. |
| TBinaryObjectWriter | Driver class which stores component data in binary form. |