Home Units Hierarchy Routines All identifiers

Class unaIniAbstractStorage

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type unaIniAbstractStorage = class(unaObject)

Description

Manages values stored in "INI" format.

NOTE: This class is abstract, do not create instances of it.

Hierarchy

Overview

Methods

Public constructor create(const section: string = 'settings'; lockTimeout: tTimeout = 1000);
Public function enter(const section: string; out sectionSave: string; timeout: tTimeout = 0): bool; overload;
Public function enter(const section: string = ''; timeout: tTimeout = 0): bool; overload;
Public function get(const section, key: string; defValue: int): int; overload;
Public function get(const key: string; defValue: boolean = false): bool; overload;
Public function get(const key: string; const defValue: string = ''): string; overload;
Public function get(const section, key: string; defValue: boolean): bool; overload;
Public function get(const section, key: string; const defValue: string): string; overload;
Public function get(const section, key: string; defValue: int64): int64; overload;
Public function get(const section, key: string; defValue: unsigned): unsigned; overload;
Public function get(const key: string; defValue: int = 0): int; overload;
Public function get(const key: string; defValue: int64 = 0): int64; overload;
Public function get(const key: string; defValue: unsigned = 0): unsigned; overload;
Public function getSectionAsText(const sectionName: string = ''): string;
Public function get_bool (const key: string; defValue: bool = false): bool;
Public function get_int (const key: string; defValue: int = 0): int;
Public function get_int64 (const key: string; defValue: int64 = 0): int64;
Public function get_string (const key: string; const defValue: string = ''): string;
Public function get_unsigned(const key: string; defValue: unsigned = 0): unsigned;
Public function setSectionAsText(const sectionName: string; const value: string): bool; overload;
Public function setSectionAsText(const value: string): bool; overload;
Public function waitForValue(const key, value: string; timeout: tTimeout): bool;
Protected function doGetSectionAsText(const sectionName: string): string; virtual; abstract;
Protected function doSetSectionAsText(const sectionName, value: string): bool; virtual; abstract;
Protected function getAsString(): string; virtual; abstract;
Protected function getStringValue(const key: string; const defValue: string = ''): string; virtual; abstract;
Public procedure leave(const sectionSave: string = '');
Public procedure setValue(const section, key: string; value: int64); overload;
Public procedure setValue(const section, key: string; value: int); overload;
Public procedure setValue(const section, key: string; value: unsigned); overload;
Public procedure setValue(const section, key: string; const value: string); overload;
Public procedure setValue(const section, key: string; value: boolean); overload;
Public procedure setValue(const key: string; value: boolean); overload;
Public procedure setValue(const key: string; const value: string); overload;
Public procedure setValue(const key: string; value: unsigned); overload;
Public procedure setValue(const key: string; value: int); overload;
Public procedure setValue(const key: string; value: int64); overload;
Public procedure set_bool (const key: string; value: bool);
Public procedure set_int (const key: string; value: int);
Public procedure set_int64 (const key: string; value: int64);
Public procedure set_string (const key: string; const value: string);
Public procedure set_unsigned(const key: string; value: unsigned);
Protected procedure setAsString(const value: string); virtual; abstract;
Protected procedure setStringValue(const key: string; const value: string); virtual; abstract;

Properties

Public property asString: string read getAsString write setAsString;
Public property lockTimeout: tTimeout read f_lockTimeout write f_lockTimeout;
Public property section: string read getSection write setSection;

Description

Methods

Public constructor create(const section: string = 'settings'; lockTimeout: tTimeout = 1000);
 
Public function enter(const section: string; out sectionSave: string; timeout: tTimeout = 0): bool; overload;
 
Public function enter(const section: string = ''; timeout: tTimeout = 0): bool; overload;
 
Public function get(const section, key: string; defValue: int): int; overload;

Public function get(const key: string; defValue: boolean = false): bool; overload;
 
Public function get(const key: string; const defValue: string = ''): string; overload;
 
Public function get(const section, key: string; defValue: boolean): bool; overload;
 
Public function get(const section, key: string; const defValue: string): string; overload;
 
Public function get(const section, key: string; defValue: int64): int64; overload;
 
Public function get(const section, key: string; defValue: unsigned): unsigned; overload;
 
Public function get(const key: string; defValue: int = 0): int; overload;
 
Public function get(const key: string; defValue: int64 = 0): int64; overload;
 
Public function get(const key: string; defValue: unsigned = 0): unsigned; overload;
 
Public function getSectionAsText(const sectionName: string = ''): string;
 
Public function get_bool (const key: string; defValue: bool = false): bool;
 
Public function get_int (const key: string; defValue: int = 0): int;

– routines for C++Builder

Public function get_int64 (const key: string; defValue: int64 = 0): int64;
 
Public function get_string (const key: string; const defValue: string = ''): string;
 
Public function get_unsigned(const key: string; defValue: unsigned = 0): unsigned;
 
Public function setSectionAsText(const sectionName: string; const value: string): bool; overload;
 
Public function setSectionAsText(const value: string): bool; overload;
 
Public function waitForValue(const key, value: string; timeout: tTimeout): bool;

Timeout is in milliseconds.

Protected function doGetSectionAsText(const sectionName: string): string; virtual; abstract;
 
Protected function doSetSectionAsText(const sectionName, value: string): bool; virtual; abstract;
 
Protected function getAsString(): string; virtual; abstract;
 
Protected function getStringValue(const key: string; const defValue: string = ''): string; virtual; abstract;
 
Public procedure leave(const sectionSave: string = '');
 
Public procedure setValue(const section, key: string; value: int64); overload;
 
Public procedure setValue(const section, key: string; value: int); overload;

Public procedure setValue(const section, key: string; value: unsigned); overload;
 
Public procedure setValue(const section, key: string; const value: string); overload;
 
Public procedure setValue(const section, key: string; value: boolean); overload;
 
Public procedure setValue(const key: string; value: boolean); overload;
 
Public procedure setValue(const key: string; const value: string); overload;
 
Public procedure setValue(const key: string; value: unsigned); overload;
 
Public procedure setValue(const key: string; value: int); overload;
 
Public procedure setValue(const key: string; value: int64); overload;
 
Public procedure set_bool (const key: string; value: bool);
 
Public procedure set_int (const key: string; value: int);

– routines for C++Builder

Public procedure set_int64 (const key: string; value: int64);
 
Public procedure set_string (const key: string; const value: string);
 
Public procedure set_unsigned(const key: string; value: unsigned);
 
Protected procedure setAsString(const value: string); virtual; abstract;
 
Protected procedure setStringValue(const key: string; const value: string); virtual; abstract;
 

Properties

Public property asString: string read getAsString write setAsString;

Use carefully, string is created every time this property is touched.

Public property lockTimeout: tTimeout read f_lockTimeout write f_lockTimeout;
 
Public property section: string read getSection write setSection;
 

(c) 2012 Lake of Soft


Generated by PasDoc 0.12.1 on 2012-10-09