Class TBrookStringMap
Unit
Declaration
type TBrookStringMap = class(TBrookHandledPersistent)
Description
String map class and its related methods.
Hierarchy
- TObject
- TPersistent
- TBrookHandledPersistent
- TBrookStringMap
Overview
Methods
constructor Create(AHandle: Pointer); virtual; |
|
destructor Destroy; override; |
|
procedure Assign(ASource: TPersistent); override; |
|
function IsEmpty: Boolean; virtual; |
|
function GetEnumerator: TBrookStringMapEnumerator; |
|
procedure Add(const AName, AValue: string); virtual; |
|
procedure AddOrSet(const AName, AValue: string); virtual; |
|
procedure Remove(const AName: string); virtual; |
|
procedure Clear; virtual; |
|
function Find(const AName: string; out APair: TBrookStringPair): Boolean; virtual; |
|
function Contains(const AName: string): Boolean; virtual; |
|
function Get(const AName: string): string; virtual; |
|
function TryValue(const AName: string; out AValue: string): Boolean; virtual; |
|
function First(out APair: TBrookStringPair): Boolean; virtual; |
|
function Next(out APair: TBrookStringPair): Boolean; virtual; |
|
procedure Iterate(AIterator: TBrookStringMapIterator; AData: Pointer); virtual; |
|
procedure Sort(AComparator: TBrookStringMapComparator; AData: Pointer); virtual; |
|
procedure Fetch(AObject: TObject; const AAllowed, AIgnored: array of string); overload; virtual; |
|
procedure Fetch(AObject: TObject); overload; virtual; |
|
function ToString: string; override; |
Properties
property Count: Integer read GetCount; |
|
property Values[constAName:string]: string read GetValue
write SetValue; |
|
property EOF: Boolean read IsEOF; |
|
property Empty: Boolean read IsEmpty; |
|
property ClearOnDestroy: Boolean read FClearOnDestroy write FClearOnDestroy; |
|
property OnChange: TBrookStringMapChangeEvent read FOnChange write FOnChange; |
Description
Methods
constructor Create(AHandle: Pointer); virtual; |
|
Creates an instance of Parameters
|
destructor Destroy; override; |
|
Frees an instance of |
procedure Assign(ASource: TPersistent); override; |
|
Copies the properties of the source string map. Parameters
|
function IsEmpty: Boolean; virtual; |
|
Checks if the map is empty. Returns
|
function GetEnumerator: TBrookStringMapEnumerator; |
|
Gets an instance of |
procedure Add(const AName, AValue: string); virtual; |
|
Adds a pair of strings to the map. Parameters
|
procedure AddOrSet(const AName, AValue: string); virtual; |
|
Adds or sets a pair of strings to the map. Parameters
|
procedure Remove(const AName: string); virtual; |
|
Removes a pair by its name. Parameters
|
procedure Clear; virtual; |
|
Clears the entire map. |
function Find(const AName: string; out APair: TBrookStringPair): Boolean; virtual; |
|
Finds a pair by its name. Parameters
Returns
|
function Contains(const AName: string): Boolean; virtual; |
|
Checks if map Parameters
Returns
|
function Get(const AName: string): string; virtual; |
|
Gets a pair by name and returns its value. Parameters
ReturnsPair value. |
function TryValue(const AName: string; out AValue: string): Boolean; virtual; |
|
Tries to find a pair value by its name. Parameters
Returns
|
function First(out APair: TBrookStringPair): Boolean; virtual; |
|
Retrieves the Parameters
Returns
|
function Next(out APair: TBrookStringPair): Boolean; virtual; |
|
Retrieves the Parameters
|
procedure Iterate(AIterator: TBrookStringMapIterator; AData: Pointer); virtual; |
|
Iterates over pairs map. Parameters
|
procedure Sort(AComparator: TBrookStringMapComparator; AData: Pointer); virtual; |
|
Sorts the pairs map. Parameters
|
procedure Fetch(AObject: TObject); overload; virtual; |
|
Fetches a string map as an object. |
function ToString: string; override; |
|
Gets the map as big string using equal sign to separate each pair and ending lines using line break. |
Properties
property Count: Integer read GetCount; |
|
Counts the total pairs present in the map. |
property Values[constAName:string]: string read GetValue
write SetValue; |
|
Adds or gets the pair value. |
property EOF: Boolean read IsEOF; |
|
Indicates the end of map. |
property Empty: Boolean read IsEmpty; |
|
Indicates if the map is |
property ClearOnDestroy: Boolean read FClearOnDestroy write FClearOnDestroy; |
|
Clears the list on destroy. |
property OnChange: TBrookStringMapChangeEvent read FOnChange write FOnChange; |
|
Notifies a change in the map. |
Generated by PasDoc 0.16.0.