Sign in Join
FPDoc Onlineexperiment

TPropsStorage class

In unit RttiUtils

Property storage mechanism.

Declaration

pascal
TPropsStorage = class(TObject)

Inheritance

  1. TPropsStorage
  2. 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

Properties

OptionspublicOptions to take into account when saving or loading properties from the storage.
AObjectpublicObject to load or store properties from.
PrefixpublicPrefix to use in storage.
SectionpublicSection name for storage.

Methods

ReadStringprotected
WriteStringprotected
EraseSectionprotected
GetItemNameprotected
CreateStorageprotected
StoreAnyPropertypublicStore a property value.
LoadAnyPropertypublicLoad a property value.
StorePropertiespublicStore a list of properties.
LoadPropertiespublicLoad a list of properties.
LoadObjectsPropspublicLoad a list of component properties.
StoreObjectsPropspublicStore a list of component properties.

Events

OnReadStringpublicRead a string value from storage.
OnWriteStringpublicWrite a string value to storage.
OnEraseSectionpublicErase a section in storage.

Inherited

From TObject (42)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance Create DefaultHandler DefaultHandlerStr Destroy 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.