JVCL Help:TJvCustomAppStorage
JVCL Help: TJvCustomAppStorage Class
Search in JVCL Help
Search in all projectsClass Hierarchy
TJvComponent
TJvCustomAppStorage
TJvAppRegistryStorage
TJvAppStorage
TJvCustomAppMemoryFileStorage
run\JvAppStorage.pas
Summary
Abstract base class for application data storage.
Pascal
run\JvAppStorage.pas
TJvCustomAppStorage = class(TJvComponent);
Description
TJvCustomAppStorage is the abstract base class for application storage. The base class provides the abstract interface to read and write data in addition to some generic methods to manipulate or retrieve data.
The application storage components are used with various components in the JEDI-VCL library to provide a means to store their data to a user specified destination. Because all storages use this component interface, other components don't need to worry about how their information is stored or where it is stored.
Data is referenced much like a file on an Operating System. The storage system uses paths and uses the concept of folders and values (much like folders and files on an OS). The storage component can specify a root path that is to serve as the absolute root of the storage (i.e. the storage can not reference anything that is not a child of this root path). Components and user code can specify paths that are either relative to a previously set path or relative to the root folder.
Folder names consisting solely of '.' (dot) characters are used to reference folders above the current one. Using one dot refers to the current folder. Every additional dot goes up one level in the storage tree. Example: if the current path is set to 'MyFolder1MyFolder1.1MyFolder1.1.1', a path specified as '..MyFolder1.1.2' would translate into 'MyFolder1MyFolder1.1MyFolder1.1.2' and a path specified as '...MyFolder1.2MyFolder1.2.1' or '....MyFolder1.2MyFolder1.2.1' would translate into 'MyFolder1MyFolder1.2MyFolder1.2.1'.
In addition you can link other storages into the storage tree, where each sub storage would be accessible through a specific path. This allows one to use a single storage to access both generic settings (common for the machine the application runs on, e.g. a registry backend pointing to HKEY_LOCAL_MACHINE) and user settings (unique for each user, e.g. an INI file backend pointing to an INI file in the current users home directory), making the access to the settings easier to use. Not all storages may surface this linking mechanism, but most do.
You should not instantiate a TJvCustomAppStorage but rather one of its descendants.
About
Contribute to this help topic
This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page