Sign in Join
FPDoc Onlineexperiment

TReader class

In unit Classes

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

Declaration

pascal
TReader = class(TFiler)

Inheritance

  1. TReader
  2. TFiler
  3. TObject

Descends from it: TDelphiReader

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.

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 ReadComponent call should be used.

See also

Properties

PropNameprotectedName of the property being read at this moment.
CanHandleExceptionsprotectedIndicates whether the reader is handling exceptions at this stage.
DriverpublicThe driver in use for streaming the data.
OwnerpublicOwner of the component being read.
ParentpublicParent of the component being read.
RawModepublic
DelphiCompatiblepublic

Methods

ErrorprotectedCalls an installed error handler and passes it Message.
FindMethodprotectedReturn the address of a published method.
ReadPropertyprotectedRead and process a property name.
ReadPropValueprotectedReads a property value for PropInfo.
PropertyErrorprotectedSkips a property value and raises an exception.
ReadDataprotectedReads the components data after it has been created.
DoReadStringprotected
SetNameprotected
CreateDriverprotected
CreatepublicCreates a new reader class.
DestroypublicDestroys a reader class.
FlushBufferpublicFlush the buffer.
BeginReferencespublicInitializes the component referencing mechanism.
CheckValuepublicRaises an exception if the next value in the stream is not of type Value.
DefinePropertypublicReads a user-defined property from the stream.
DefineBinaryPropertypublicReads a user-defined binary property from the stream.
EndOfListpublicReturns true if the stream contains an end-of-list marker.
EndReferencespublicFinalizes the component referencing mechanism.
FixupReferencespublicTries to resolve all unresolved component references.
SkipValuepublic
NextValuepublicReturns the type of the next value.
ReadpublicRead raw data from stream.
ReadPrefixpublic
ReadBooleanpublicReads a boolean from the stream.
ReadCharpublicReads a character from the stream.
ReadWideCharpublicRead widechar from the stream.
ReadUnicodeCharpublicRead Unicode character.
ReadCollectionpublicReads a collection from the stream.
ReadComponentpublicStarts reading a component from the stream.
ReadComponentspublicStarts reading child components from the stream.
ReadFloatpublicReads a float from the stream.
ReadSinglepublicReads a single-type real from the stream.
ReadDoublepublic
ReadDatepublicReads a date from the stream.
ReadCurrencypublicRead a currency value from the stream.
ReadIdentpublicReads an identifier from the stream.
ReadIntegerpublicReads an integer from the stream.
ReadInt64publicReads a 64-bit integer from the stream.
ReadSetpublicRead a set value from the stream.
ReadListBeginpublicChecks for the beginning of a list.
ReadListEndpublicChecks for the end of a list.
ReadRootComponentpublicStarts reading a root component.
ReadComponentDeltaRespublic
ReadVariantpublicRead a variant from the stream.
ReadSignaturepublicRead stream signature from the stream.
ReadStrpublic
ReadStringpublicReads a string from the stream.
ReadWideStringpublicRead a WideString value from the stream.
ReadUnicodeStringpublicRead a UnicodeString value from the stream.
ReadValuepublicReads the next value type from the stream.
CopyValuepublicCopy a value to a writer.

Events

OnErrorpublicHandler called when an error occurs.
OnPropertyNotFoundpublicHandler for treating missing properties.
OnFindMethodpublicHandler to find or change a method address.
OnSetMethodPropertypublicHandler for setting method properties.
OnSetNamepublicHandler called when setting a component name.
OnReferenceNamepublicHandler called when another component is referenced.
OnAncestorNotFoundpublicHandler called when the ancestor component cannot be found.
OnCreateComponentpublicHandler called when a component needs to be created.
OnFindComponentClasspublicHandler called when a component class reference needs to be found.
OnFindComponentClassExpublic
OnReadStringPropertypublicHandler for translating strings when read from the stream.

Inherited

From TFiler (5)

Ancestor IgnoreChildren LookupRoot Root SetRoot

From TObject (40)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.