Sign in Join
FPDoc Onlineexperiment

TWriter class

In unit Classes

Object to write component data to an arbitrary format.

Declaration

pascal
TWriter = class(TFiler)

Inheritance

  1. TWriter
  2. TFiler
  3. TObject

Descends from it: TDelphiWriter

Description

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

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

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

See also

Properties

RootAncestorpublicAncestor of root component.
DriverpublicDriver used when writing to the stream.
PropertyPathpublicPath to the property that is currently being written.
DelphiCompatiblepublic

Methods

SetRootprotectedSets the root component.
WriteBinaryprotectedWrites binary data to the stream.
WritePropertyprotectedWrites one property to the stream.
WritePropertiesprotectedWrites the published properties to the stream.
WriteChildrenprotected
CreateDriverprotected
CreatepublicCreates a new Writer with a stream and bufsize.
DestroypublicDestroys the writer instance.
FlushBufferpublicFlush the buffer
DefinePropertypublicCallback used when defining and streaming custom properties.
DefineBinaryPropertypublicCallback used when defining and streaming custom properties.
WritepublicWrite raw data to stream.
WriteBooleanpublicWrite boolean value to the stream.
WriteCollectionpublicWrite a collection to the stream.
WriteComponentpublicStream a component to the stream.
WriteCharpublicWrite a character to the stream.
WriteWideCharpublicWrite widechar to stream.
WriteDescendentpublicWrite descendent to stream.
WriteFloatpublicWrite a float to the stream.
WriteSinglepublicWrite a single-type real to the stream.
WriteDoublepublic
WriteDatepublicWrite a date to the stream.
WriteCurrencypublicWrite a currency value to the stream.
WriteIdentpublicWrite an identifier to the stream.
WriteIntegerpublicWrite an integer to the stream.
WriteSetpublicWrite a set value to the stream.
WriteListBeginpublicWrite a start-of-list marker to the stream.
WriteListEndpublicWrite an end-of-list marker to the stream.
WriteSignaturepublicWrite a signature to the stream.
WriteRootComponentpublicWrite a root component to the stream.
WriteStringpublicWrite a string to the stream.
WriteWideStringpublicWrite a widestring value to the stream.
WriteUnicodeStringpublicWrite a Unicode string to the stream.
WriteVariantpublicWrite a variant to the stream.

Events

OnFindAncestorpublicEvent occurring when an ancestor component must be found.
OnWriteMethodPropertypublicHandler from writing method properties.
OnWriteStringPropertypublicEvent handler for translating strings written to stream.

Inherited

From TFiler (4)

Ancestor IgnoreChildren LookupRoot Root

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.