TPersistent.DefineProperties procedure
Declare non-published properties that need to be streamed.
Declaration
procedure DefineProperties(Filer: TFiler); virtualDescription
DefineProperties must be overridden by descendant classes to
indicate to the streaming system which non-published properties must
also be streamed.
The streaming systems stores only published properties in the stream.
Sometimes it is necessary to store additional data in the stream, data
which is not published. This can be done by overriding the
DefineProperties method. The Filer object is the
class that is responsible for writing all properties to the stream.
To define new properties, two methods of the TFiler class should be used:
- DefineProperty, to define a property which can be represented as text.
- DefineProperty, to define a property which contains binary data.
On order for the streaming to work correctly, a call to the inherited
DefineProperties is also needed, so ancestor objects also
get the possibility to read or write their private data to the stream.
Failure to call the inherited method will result in component properties not
being streamed correctly.
See also
- DefineProperties
- TFiler
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
