Sign in Join
FPDoc Onlineexperiment

TCustomPropertyStorage.SaveProperties procedure

Member of TCustomPropertyStorageprotectedIn unit PropertyStorage

Saves property values to the storage mechanism for the container.

Declaration

pascal
procedure SaveProperties; virtual

Description

SaveProperties is a method used to save property values from components and persistent objects to the storage mechanism for the container.

Existing values in the container are loaded on entry using the GetPropertyList and FinishPropertyList methods. A temporary TPropsStorage instance is created and configured to use the RootSection, Root, and Owner for the component instance. Its OnWriteString and OnEraseSection event handlers are set to the DoWriteString and DoEraseSections methods (respectively).

SaveProperties calls the StoreObjectsProps method in TPropsStorage to store the component and property names and values using the storage format for the container.

Some of the methods called in SaveProperties are declared as abstract virtual methods in TCustomPropertyStorage, like: GetPropertyList, FinishPropertyList, DoWriteString, and DoEraseSections. They must be implemented in a descendent class to use a specific storage format in its container.

See also

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