[Overview][Types][Classes][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Defines a container used to Save and Restore property values.
Source position: propertystorage.pas line 114
type TCustomPropertyStorage = class(TComponent) |
||
protected |
||
function GetRoot; virtual; |
|
Gets the value for the Root property. |
function RootSection; virtual; |
|
Gets the path needed to represent the section for the Root (Owner) component. |
procedure SaveProperties; virtual; |
|
Saves property values to the storage mechanism for the container. |
procedure RestoreProperties; virtual; |
|
Restores property values from the storage mechanism for the container. |
procedure GetPropertyList(); virtual; abstract; |
|
Builds a list with the object(s) and properties stored in the container. |
procedure FinishPropertyList(); virtual; |
|
Updates the specified list to include a reference to the object instance for each of the properties in the storage container. |
function DoReadInteger(); virtual; |
|
Reads an integer value stored as a string. |
function DoReadString(); virtual; abstract; |
|
Default OnReadString handler; must be overridden. |
procedure DoWriteString(); virtual; abstract; |
|
Default OnWriteString handler; must be overridden. |
procedure DoWriteInteger(); virtual; |
|
Writes an Integer value as a String. |
procedure DoEraseSections(); virtual; abstract; |
|
Remove identifiers and values stored below in the specified root section. |
public |
||
constructor Create(); override; |
|
Constructor for the class instance. |
destructor Destroy; override; |
|
Destructor for the class instance. |
procedure Save; virtual; |
|
Saves all linked property collections. |
procedure Restore; virtual; |
|
Restores all linked property collections. |
procedure StorageNeeded(); virtual; |
|
Ensures that the storage mechanism for the container is available. |
procedure FreeStorage; virtual; |
|
Frees resources allocated for the underlying storage mechanism. |
function ReadBoolean(); |
|
Reads a Boolean value stored as a string. |
function ReadString(); |
|
Reads a String value from the RootSection. |
function ReadInteger(); |
|
Reads an integer value, stored as a string, from the RootSection. |
procedure ReadRect(); |
|
Reads a TRect instance stored as a String value. |
procedure ReadStrings(); |
|
Reads a list of strings stored with a Count value. |
procedure WriteString(); |
|
Writes a String to the RootSection. |
procedure WriteInteger(); |
|
Writes an integer into the RootSection. |
procedure WriteBoolean(); |
|
Writes a Boolean value to the RootSection. |
procedure WriteRect(); |
|
Writes an TRect instance to the RootSection. |
procedure WriteStrings(); |
|
Writes a list of strings into the RootSection. |
procedure EraseSections; |
|
Removes all sections that are descendants of the specified root section. |
property StoredValue []: TStoredType; [rw] |
|
Provides indexed access to the value for a collection item by its name. |
property Root: TComponent; [r] |
|
Path where values in the storage container are rooted. |
property Active: Boolean; [rw] |
|
Indicates whether the container is Active and allows access to its storage. |
property StoredValues: TStoredValues; [rw] |
|
Collection with the names and values for properties handled for the container. |
property OnSavingProperties: TNotifyEvent; [rw] |
|
Event handler signalled when the Save method is started. |
property OnSaveProperties: TNotifyEvent; [rw] |
|
Event handler signalled when the Save method is completed. |
property OnRestoringProperties: TNotifyEvent; [rw] |
|
Event handler signalled when the Restore method is started. |
property OnRestoreProperties: TNotifyEvent; [rw] |
|
Event handler signalled when the Restore method is completed. |
property OnSaveException: TPropertyStorageSaveExceptionEvent; [rw] |
||
end; |
|
Defines a container used to Save and Restore property values. |
|
| | ||
| | ||
| | ||
TCustomPropertyStorage is a TComponent descendant which defines a storage container used to save and restore property values. It has a StoredValues property that is a collection with items containing the Names and Values read and written using the storage container.
TCustomPropertyStorage is a base class; it includes abstract virtual methods which must be implemented in a descendant to use a particular storage medium or format. For example: TControlPropertyStorage, TFormPropertyStorage, TIniPropStorage, TJSONPropStorage, and TXMLPropStorage.
Version 3.2 | Generated 2024-02-25 | Home |