help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



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

TReader

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

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

Declaration

Source position: classesh.inc line 927

type TReader = class(TFiler)

public

  constructor Create();

  

Creates a new reader class

  destructor Destroy; override;

  

Destroys a reader class.

  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

  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 ReadCurrency;

  

Read a currency value from the stream.

  function ReadDate;

  

Reads a date 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.

  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 ReadString;

  

Reads a string from the stream.

  function ReadWideString;

  

Read a WideString 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.

end;

Inheritance

TReader

  

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

|

TFiler

  

Class responsible for streaming of components.

|

TObject

Description

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.

See also

TFiler

  

Class responsible for streaming of components.

TWriter

  

Object to write component data to an arbitrary format.

TAbstractObjectReader

  

Abstract driver class to read stored component data.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505