[Overview][Constants][Types][Classes][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Implements set/associative array
Source position: dynhasharray.pp line 73
type TDynHashArray = class |
||
protected |
||
procedure RebuildItems; |
|
Rebuilds the internal datastructures. |
procedure SaveCacheItem(); |
|
Sets the cache. |
public |
||
procedure Create(); |
|
|
destructor Destroy; override; |
|
|
procedure Add(); |
|
Adds an item to the set/array. |
function Contains(); |
|
Returns true if the item is in the set. |
function ContainsKey(); |
|
Returns true if the item is in the set.(through OnGetKeyForHashItem) |
procedure Remove(); |
|
Removes an element from the set/hash array |
procedure Clear; |
|
Removes all elements from the set/hash array |
procedure ClearCache; |
|
Clears the FContainsCache cache |
function First; |
|
Returns the first item or nil |
|
Number of elements stored in the set/array. |
|
function IndexOf(); |
|
Returns calculated index from Item through OnGetKeyForHashItem |
function IndexOfKey(); |
|
Returns calculated index from Item |
function FindHashItem(); |
|
Finds an item as PDynHashArrayItem among all items |
function FindHashItemWithKey(); |
|
Finds an item as PDynHashArrayItem among all items (through OnGetKeyForHashItem) |
function FindItemWithKey(); |
|
Finds an item among all items (through OnGetKeyForHashItem) |
function GetHashItem(); |
|
Gets a link list from the "main" array FItems by index |
procedure Delete(); |
|
Deletes a PDynHashArrayItem from link list |
procedure AssignTo(); |
|
Copies all items into a given TList |
procedure ForEach(); |
||
function SlowAlternativeHashMethod(); |
|
Another hash function that can be used. |
function ConsistencyCheck; |
|
Check if data in TDynHashArray are ok |
procedure WriteDebugReport; |
|
Prints out essential data to aid debugging TDynHashArray. |
property FirstHashItem: PDynHashArrayItem; [r] |
|
|
property MinCapacity: Integer; [rw] |
|
The minimum number of items that will be allocated for an array. |
property MaxCapacity: Integer; [rw] |
|
The size of the array cannot be larger than this number. |
|
Space is allocated for this number of items. |
|
property CustomHashFunction: THashFunction; [rw] |
|
The pointer to the user-defined hash function. |
property OwnerHashFunction: TOwnerHashFunction; [rw] |
|
THe pointer to the user-defined hash function. |
property OnGetKeyForHashItem: TOnGetKeyForHashItem; [rw] |
|
User-defined function to obtain a key from an item |
property Options: TDynHashArrayOptions; [rw] |
|
|
end; |
|
Implements set/associative array |
|
| | ||
TObject |
lazarus-ccr.sourceforge.net |