DK for Delphi | GisIniFiles.TGIS_IniFile | Classes | Constructors | Methods | Properties
INI file configuration reader with dictionary-based section caching for optimized repeated access.
// Delphi type TGIS_IniFile = class( TCustomIniFile ) end;
// C++ Builder class PASCALIMPLEMENTATION TGIS_IniFile : public TCustomIniFile { };
→ TCustomIniFile
| Name | Visibility | Description | |
|---|---|---|---|
| Create | public | Creates an INI file handler and loads configuration from disk. | |
| Destroy | public | ||
| Name | Visibility | Description | |
|---|---|---|---|
| Clear | public | Clears all cached sections and key/value pairs from memory. | |
| DeleteKey | public | ||
| EraseSection | public | ||
| GetStrings | public | ||
| ReadSection | public | ||
| ReadSections | public | ||
| ReadSectionValues | public | ||
| ReadString | public | ||
| SetStrings | public | ||
| TestSection | public | ||
| UpdateFile | public | ||
| WriteString | public | ||
| Name | Visibility | Description | |
|---|---|---|---|
| LastSec | public | Key/value dictionary for the most recently accessed INI section, retained as a read-through cache to accelerate consecutive reads within the same section. | |
PURPOSE: Provides cached access to INI configuration files for repeated section and key lookups. It is intended for application settings, driver parameters, and user preference storage.
BEHAVIOR: The class derives from TCustomIniFile and stores sections and key/value pairs in nested dictionaries after loading the file. Reads are served from the in-memory cache, while write and delete operations update the cached state and can be persisted by calling UpdateFile.
USAGE: Use this class when the same INI file is queried multiple times during application execution.
iniFile = TGIS_IniFile(configPath) value = iniFile.ReadString(section, key, defaultValue) iniFile.UpdateFile()
CONSTRAINTS: The entire INI file is loaded into memory, so it is intended for small-to-medium INI files. The file must follow standard INI section and key=value conventions.