[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Classes' (#rtl)


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

Generic reader object which reads component data from any given source.


Source position: classesh.inc line 1344

type TReader = class(TFiler)


  constructor Create();


Creates a new reader class

  destructor Destroy; override;


Destroys a reader class.

  procedure FlushBuffer; override;


Flush the buffer

  procedure BeginReferences;


Initializes the component referencing mechanism.

  procedure CheckValue();


Raises an exception if the next value in the stream is not of type Value

  procedure DefineProperty(); override;


Reads a user-defined property from the stream.

  procedure DefineBinaryProperty(); override;


Reads a user-defined binary property from the stream.

  function EndOfList;


Returns true if the stream contains an end-of-list marker.

  procedure EndReferences;


Finalizes the component referencing mechanism.

  procedure FixupReferences;


Tries to resolve all unresolved component references.

  function NextValue;


Returns the type of the next value.

  procedure Read(); virtual;


Read raw data from stream

  function ReadBoolean;


Reads a boolean from the stream.

  function ReadChar;


Reads a character from the stream.

  function ReadWideChar;


Read widechar from the stream

  function ReadUnicodeChar;


Read Unicode character

  procedure ReadCollection();


Reads a collection from the stream.

  function ReadComponent();


Starts reading a component from the stream.

  procedure ReadComponents();


Starts reading child components from the stream.

  function ReadFloat;


Reads a float from the stream.

  function ReadSingle;


Reads a single-type real from the stream.

  function ReadDate;


Reads a date from the stream

  function ReadCurrency;


Read a currency value from the stream.

  function ReadIdent;


Reads an identifier from the stream.

  function ReadInteger;


Reads an integer from the stream

  function ReadInt64;


Reads a 64-bit integer from the stream.

  function ReadSet();


Read a set value from the stream

  procedure ReadListBegin;


Checks for the beginning of a list.

  procedure ReadListEnd;


Checks for the end of a list.

  function ReadRootComponent();


Starts reading a root component.

  function ReadVariant;


Read a variant from the stream

  procedure ReadSignature;


Read stream signature from the stream

  function ReadString;


Reads a string from the stream.

  function ReadWideString;


Read a WideString value from the stream.

  function ReadUnicodeString;


Read a UnicodeString value from the stream

  function ReadValue;


Reads the next value type from the stream.

  procedure CopyValue();


Copy a value to a writer.

  property Driver: TAbstractObjectReader; [r]


The driver in use for streaming the data.

  property Owner: TComponent; [rw]


Owner of the component being read

  property Parent: TComponent; [rw]


Parent of the component being read.

  property OnError: TReaderError; [rw]


Handler called when an error occurs.

  property OnPropertyNotFound: TPropertyNotFoundEvent; [rw]


Handler for treating missing properties.

  property OnFindMethod: TFindMethodEvent; [rw]


Handler to find or change a method address.

  property OnSetMethodProperty: TSetMethodPropertyEvent; [rw]


Handler for setting method properties.

  property OnSetName: TSetNameEvent; [rw]


Handler called when setting a component name.

  property OnReferenceName: TReferenceNameEvent; [rw]


Handler called when another component is referenced.

  property OnAncestorNotFound: TAncestorNotFoundEvent; [rw]


Handler called when the ancestor component cannot be found.

  property OnCreateComponent: TCreateComponentEvent; [rw]


Handler called when a component needs to be created.

  property OnFindComponentClass: TFindComponentClassEvent; [rw]


Handler called when a component class reference needs to be found.

  property OnReadStringProperty: TReadWriteStringPropertyEvent; [rw]


Handler for translating strings when read from the stream.





Generic reader object which reads component data from any given source.




Class responsible for streaming of components.




The TReader class is a reader class that implements generic component streaming capabilities, independent of the format of the data in the stream. It uses a driver class TAbstractObjectReader to do the actual reading of data. The interface of the TReader class should be identical to the interface in Delphi.

Note that the TReader design is such that it can read a single component from a stream. It will read all children of this component, but it is not designed to read multiple components in succession from one stream.

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

See also



Class responsible for streaming of components.



Object to write component data to an arbitrary format.



Abstract driver class to read stored component data.

Documentation generated on: Jun 22 2020