[Overview][Types][Classes][Index] Reference for unit 'PropertyStorage' (#lcl)

TCustomPropertyStorage.SaveProperties

Saves property values to the storage mechanism for the container.

Declaration

Source position: propertystorage.pas line 134

protected procedure TCustomPropertyStorage.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.

Remark: 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

TCustomPropertyStorage.GetPropertyList

  

Builds a list with the object(s) and properties stored in the container.

TCustomPropertyStorage.FinishPropertyList

  

Updates the specified list to include a reference to the object instance for each of the properties in the storage container.

TCustomPropertyStorage.StorageNeeded

  

Ensures that the storage mechanism for the container is available.

TCustomPropertyStorage.FreeStorage

  

Frees resources allocated for the underlying storage mechanism.

TCustomPropertyStorage.RestoreProperties

  

Restores property values from the storage mechanism for the container.

TPropsStorage


Version 4.0 Generated 2025-05-03 Home