Description | Hierarchy | Fields | Methods | Properties |
type unaIniAbstractStorage = class(unaObject)
Manages values stored in "INI" format.
NOTE: This class is abstract, do not create instances of it.
constructor create(const section: string = 'settings'; lockTimeout: tTimeout = 1000); |
|
function enter(const section: string; out sectionSave: string; timeout: tTimeout = 0): bool; overload; |
|
function enter(const section: string = ''; timeout: tTimeout = 0): bool; overload; |
|
function get(const section, key: string; defValue: int): int; overload; |
|
function get(const key: string; defValue: boolean = false): bool; overload; |
|
function get(const key: string; const defValue: string = ''): string; overload; |
|
function get(const section, key: string; defValue: boolean): bool; overload; |
|
function get(const section, key: string; const defValue: string): string; overload; |
|
function get(const section, key: string; defValue: int64): int64; overload; |
|
function get(const section, key: string; defValue: unsigned): unsigned; overload; |
|
function get(const key: string; defValue: int = 0): int; overload; |
|
function get(const key: string; defValue: int64 = 0): int64; overload; |
|
function get(const key: string; defValue: unsigned = 0): unsigned; overload; |
|
function getSectionAsText(const sectionName: string = ''): string; |
|
function get_bool (const key: string; defValue: bool = false): bool; |
|
function get_int (const key: string; defValue: int = 0): int; |
|
function get_int64 (const key: string; defValue: int64 = 0): int64; |
|
function get_string (const key: string; const defValue: string = ''): string; |
|
function get_unsigned(const key: string; defValue: unsigned = 0): unsigned; |
|
function setSectionAsText(const sectionName: string; const value: string): bool; overload; |
|
function setSectionAsText(const value: string): bool; overload; |
|
function waitForValue(const key, value: string; timeout: tTimeout): bool; |
|
function doGetSectionAsText(const sectionName: string): string; virtual; abstract; |
|
function doSetSectionAsText(const sectionName, value: string): bool; virtual; abstract; |
|
function getAsString(): string; virtual; abstract; |
|
function getStringValue(const key: string; const defValue: string = ''): string; virtual; abstract; |
|
procedure leave(const sectionSave: string = ''); |
|
procedure setValue(const section, key: string; value: int64); overload; |
|
procedure setValue(const section, key: string; value: int); overload; |
|
procedure setValue(const section, key: string; value: unsigned); overload; |
|
procedure setValue(const section, key: string; const value: string); overload; |
|
procedure setValue(const section, key: string; value: boolean); overload; |
|
procedure setValue(const key: string; value: boolean); overload; |
|
procedure setValue(const key: string; const value: string); overload; |
|
procedure setValue(const key: string; value: unsigned); overload; |
|
procedure setValue(const key: string; value: int); overload; |
|
procedure setValue(const key: string; value: int64); overload; |
|
procedure set_bool (const key: string; value: bool); |
|
procedure set_int (const key: string; value: int); |
|
procedure set_int64 (const key: string; value: int64); |
|
procedure set_string (const key: string; const value: string); |
|
procedure set_unsigned(const key: string; value: unsigned); |
|
procedure setAsString(const value: string); virtual; abstract; |
|
procedure setStringValue(const key: string; const value: string); virtual; abstract; |
property asString: string read getAsString write setAsString; |
|
property lockTimeout: tTimeout read f_lockTimeout write f_lockTimeout; |
|
property section: string read getSection write setSection; |
constructor create(const section: string = 'settings'; lockTimeout: tTimeout = 1000); |
|
function enter(const section: string; out sectionSave: string; timeout: tTimeout = 0): bool; overload; |
|
function enter(const section: string = ''; timeout: tTimeout = 0): bool; overload; |
|
function get(const section, key: string; defValue: int): int; overload; |
|
– |
function get(const key: string; defValue: boolean = false): bool; overload; |
|
function get(const key: string; const defValue: string = ''): string; overload; |
|
function get(const section, key: string; defValue: boolean): bool; overload; |
|
function get(const section, key: string; const defValue: string): string; overload; |
|
function get(const section, key: string; defValue: int64): int64; overload; |
|
function get(const section, key: string; defValue: unsigned): unsigned; overload; |
|
function get(const key: string; defValue: int = 0): int; overload; |
|
function get(const key: string; defValue: int64 = 0): int64; overload; |
|
function get(const key: string; defValue: unsigned = 0): unsigned; overload; |
|
function getSectionAsText(const sectionName: string = ''): string; |
|
function get_bool (const key: string; defValue: bool = false): bool; |
|
function get_int (const key: string; defValue: int = 0): int; |
|
– routines for C++Builder |
function get_int64 (const key: string; defValue: int64 = 0): int64; |
|
function get_string (const key: string; const defValue: string = ''): string; |
|
function get_unsigned(const key: string; defValue: unsigned = 0): unsigned; |
|
function setSectionAsText(const sectionName: string; const value: string): bool; overload; |
|
function setSectionAsText(const value: string): bool; overload; |
|
function waitForValue(const key, value: string; timeout: tTimeout): bool; |
|
Timeout is in milliseconds. |
function doGetSectionAsText(const sectionName: string): string; virtual; abstract; |
|
function doSetSectionAsText(const sectionName, value: string): bool; virtual; abstract; |
|
function getAsString(): string; virtual; abstract; |
|
function getStringValue(const key: string; const defValue: string = ''): string; virtual; abstract; |
|
procedure leave(const sectionSave: string = ''); |
|
procedure setValue(const section, key: string; value: int64); overload; |
|
procedure setValue(const section, key: string; value: int); overload; |
|
– |
procedure setValue(const section, key: string; value: unsigned); overload; |
|
procedure setValue(const section, key: string; const value: string); overload; |
|
procedure setValue(const section, key: string; value: boolean); overload; |
|
procedure setValue(const key: string; value: boolean); overload; |
|
procedure setValue(const key: string; const value: string); overload; |
|
procedure setValue(const key: string; value: unsigned); overload; |
|
procedure setValue(const key: string; value: int); overload; |
|
procedure setValue(const key: string; value: int64); overload; |
|
procedure set_bool (const key: string; value: bool); |
|
procedure set_int (const key: string; value: int); |
|
– routines for C++Builder |
procedure set_int64 (const key: string; value: int64); |
|
procedure set_string (const key: string; const value: string); |
|
procedure set_unsigned(const key: string; value: unsigned); |
|
procedure setAsString(const value: string); virtual; abstract; |
|
procedure setStringValue(const key: string; const value: string); virtual; abstract; |
|
property asString: string read getAsString write setAsString; |
|
Use carefully, string is created every time this property is touched. |
property lockTimeout: tTimeout read f_lockTimeout write f_lockTimeout; |
|
property section: string read getSection write setSection; |
|
(c) 2012 Lake of Soft