[Overview][Constants][Types][Classes][Procedures and functions][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Defines the base class for a configuration storage mechanism.
Source position: lazconfigstorage.pas line 28
type TConfigStorage = class |
||
protected |
||
function GetFullPathValue(); |
|
Specifies a method used to get a value or its default from the specified fully-qualified path. |
procedure SetFullPathValue(); |
|
Defines the method used to resolve the specified node path prior to storing the specified value. |
procedure SetDeleteFullPathValue(); |
|
Defines the method used to delete the specified node path or to reset it to a default value. |
procedure DeleteFullPath(); virtual; abstract; |
|
Defines the method used to remove the node at the specified path from the configuration storage. |
procedure DeleteFullPathValue(); virtual; abstract; |
|
Defines the method used to delete the node with the specified full path name from the configuration storage. |
procedure WriteProperty(); |
|
Stores one or more property values from an RTTI-enabled persistent object to the specified path in the configuration storage. |
procedure ReadProperty(); |
|
Reads value(s) from a path in the configuration storage into the specified persistent object. |
public |
||
constructor Create(); virtual; |
|
Constructor for the class instance. |
destructor Destroy; override; |
|
Destructor for the class instance. |
procedure Clear; virtual; abstract; |
|
Clears the content in the configuration storage. |
function GetValue(); |
|
Gets the value stored at the specified path relative to the base path in the configuration storage. |
procedure SetValue(); |
|
Stores a value at the specified path in the configuration storage. |
procedure SetDeleteValue(); |
|
Updates the value for the specified node path, or deletes it when it contains a default value. |
procedure DeletePath(); |
|
Removes the configuration storage node with the specified path. |
procedure DeleteValue(); |
|
Deletes the value stored for the specified path. |
property CurrentBasePath: string; [r] |
|
Contains the base node path where values are read or written in the storage mechanism. |
function ExtendPath(); |
|
Resolves a relative node path to the current base path for the storage mechanism. |
procedure AppendBasePath(); |
|
Appends the specified relative path to the existing value in CurrentBasePath. |
procedure UndoAppendBasePath; |
|
Removes the last node path from the value in CurrentBasePath. |
procedure WriteToDisk; virtual; abstract; |
|
Defines the method used to flush the values in the configuration storage to the underlying storage mechanism. |
function GetFilename; virtual; abstract; |
|
Defines the method used to get the file name where configuration data is stored. |
procedure WriteObject(); |
|
Stores property names and values in the specified object to the configuration storage. |
procedure ReadObject(); |
|
Reads names and values from the configuration storage into properties for the specified object instance. |
end; |
|
Defines the base class for a configuration storage mechanism. |
|
| | ||
TObject |
TConfigStorage is a class used to create and maintain configuration information using an XML-based storage format. TConfigStorage is a base class; it contains abstract virtual methods which must be implemented in descendent class to provide memory- or file-based storage for its values.
TConfigStorage and descendent classes have a base path where its data is stored, and sub-paths and values for the data items in the storage. Path information uses an XPath-like notation which indicates where a given value is stored, and the name associated with the stored value.
For example:
'path/to/loginform' 'path/to/loginform/top' 'path/to/loginform/left' 'path/to/loginform/width' 'path/to/loginform/height'
Values can be specified using one of the native Pascal data types supported in the class, like:
Methods are provided to get, set, or delete stored items using their path notation. Methods are also provided to read or write published property values to or from persistent objects using RTTI.
Do not create instances of TConfigStorage. Use of the descendent classes like TConfigMemStorage or TXMLConfigStorage.
|
Implement a configuration storage class using in-memory storage for values in the class instance. |
|
Version 4.0 | Generated 2025-05-03 | Home |