Class TIniPropStorageHelper
Unit
INIUnit
Declaration
type TIniPropStorageHelper = class helper(TObject) for TIniPropStorage
Description
Tools for handling INI files.
Hierarchy
- TObject
- TIniPropStorageHelper
Overview
Methods
 |
function ReadIntSect(const ASection, AKey: string; ADefault: Integer): Integer; |
 |
function ReadStringSect(const ASection, AKey: string; const ADefault: string): string; |
 |
function ReadBoolSect(const ASection, AKey: string; ADefault: Boolean): Boolean; |
 |
function ReadDoubleSect(const ASection, AKey: string; ADefault: Double): Double; |
 |
function ReadDateTimeSect(const ASection, AKey: string; ADefault: TDateTime): TDateTime; |
 |
procedure ReadKeysSect(const ASection: string; AList: TStrings); |
 |
procedure WriteIntSect(const ASection, AKey: string; AValue: Integer); |
 |
procedure WriteStringSect(const ASection, AKey: string; const AValue: string); |
 |
procedure WriteBoolSect(const ASection, AKey: string; AValue: Boolean); |
 |
procedure WriteDoubleSect(const ASection, AKey: string; AValue: Double); |
 |
procedure WriteDateTimeSect(const ASection, AKey: string; AValue: TDateTime); |
 |
procedure EraseSect(const ASection: string); |
Description
Methods
 |
function ReadIntSect(const ASection, AKey: string; ADefault: Integer): Integer; |
|
Reads an integer value from a specific section.
Parameters
- ASection
- The name of the section [SectionName].
- AKey
- The key to read.
- ADefault
- Value returned if the key is missing or an error occurs.
Returns
The integer value or ADefault. |
 |
function ReadStringSect(const ASection, AKey: string; const ADefault: string): string; |
|
Reads a String value from a specific section.
Parameters
- ASection
- The name of the section.
- AKey
- The key to read.
- ADefault
- Value returned if the key is missing.
Returns
The String value or ADefault. |
 |
function ReadBoolSect(const ASection, AKey: string; ADefault: Boolean): Boolean; |
|
Reads a boolean value from a specific section.
Parameters
- ASection
- The name of the section.
- AKey
- The key to read.
- ADefault
- Value returned if the key is missing.
Returns
The boolean value or ADefault. |
 |
function ReadDoubleSect(const ASection, AKey: string; ADefault: Double): Double; |
|
Reads a double precision floating point value from a specific section.
Parameters
- ASection
- The name of the section.
- AKey
- The key to read.
- ADefault
- Value returned if the key is missing or invalid.
Returns
The double value or ADefault. |
 |
function ReadDateTimeSect(const ASection, AKey: string; ADefault: TDateTime): TDateTime; |
|
Reads a TDateTime value from a specific section.
Parameters
- ASection
- The name of the section.
- AKey
- The key to read.
- ADefault
- Value returned if the key is missing or invalid.
Returns
The TDateTime value or ADefault. |
 |
procedure ReadKeysSect(const ASection: string; AList: TStrings); |
|
Retrieves all key names within a specific section.
Parameters
- ASection
- The name of the section to scan.
- AList
- A TStrings object to be populated with key names.
|
 |
procedure WriteIntSect(const ASection, AKey: string; AValue: Integer); |
|
Writes an integer value to a specific section.
Parameters
- ASection
- The name of the section.
- AKey
- The key to write.
- AValue
- The integer value to store.
|
 |
procedure WriteStringSect(const ASection, AKey: string; const AValue: string); |
|
Writes a String value to a specific section.
Parameters
- ASection
- The name of the section.
- AKey
- The key to write.
- AValue
- The String value to store.
|
 |
procedure WriteBoolSect(const ASection, AKey: string; AValue: Boolean); |
|
Writes a boolean value to a specific section.
Parameters
- ASection
- The name of the section.
- AKey
- The key to write.
- AValue
- The boolean value to store.
|
 |
procedure WriteDoubleSect(const ASection, AKey: string; AValue: Double); |
|
Writes a double precision floating point value to a specific section. Note: Uses FloatToStr to ensure DecimalSeparator consistency.
Parameters
- ASection
- The name of the section.
- AKey
- The key to write.
- AValue
- The double value to store.
|
 |
procedure WriteDateTimeSect(const ASection, AKey: string; AValue: TDateTime); |
|
Writes a TDateTime value to a specific section.
Parameters
- ASection
- The name of the section.
- AKey
- The key to write.
- AValue
- The TDateTime value to store.
|
 |
procedure EraseSect(const ASection: string); |
|
Erases an entire section and all its keys from the storage.
Parameters
- ASection
- The name of the section to remove.
|