Unit 'RttiUtils' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#fcl]

TPropsStorage

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

Property storage mechanism.

Declaration

Source position: rttiutils.pp line 75

type TPropsStorage = class(TObject)

public

  procedure StoreAnyProperty();

  

Store a property value.

  procedure LoadAnyProperty();

  

Load a property value.

  procedure StoreProperties();

  

Store a list of properties.

  procedure LoadProperties();

  

Load a list of properties.

  procedure LoadObjectsProps();

  

Load a list of component properties.

  procedure StoreObjectsProps();

  

Store a list of component properties.

  property Options: TPropStorageOptions; [rw]

  

Options to take into account when saving or loading properties from the storage.

  property AObject: TObject; [rw]

  

Object to load or store properties from.

  property Prefix: string; [rw]

  

Prefix to use in storage.

  property Section: string; [rw]

  

Section name for storage.

  property OnReadString: TReadStrEvent; [rw]

  

Read a string value from storage.

  property OnWriteString: TWriteStrEvent; [rw]

  

Write a string value to storage.

  property OnEraseSection: TEraseSectEvent; [rw]

  

Erase a section in storage.

end;

Inheritance

TPropsStorage

  

Property storage mechanism.

|

TObject

Description

TPropsStorage provides a mechanism to store properties from any class which has published properties (usually a TPersistent descendent) in a storage mechanism.

TPropsStorage does not handle the storage by itself, instead, the storage is handled through a series of callbacks to read and/or write strings. Conversion of property types to string is handled by TPropsStorage itself: all that needs to be done is set the 3 handlers. The storage mechanism is assumed to have the structure of an .ini file : sections with key/value pairs. The three callbacks should take this into account, but they do not need to create an actual .ini file.

See also

TPropInfoList

  

Class for keeping property information.


Documentation generated on: Dec 22 2024