[Overview][Constants][Types][Classes][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Basic map object, used in generic maps
Source position: fgl.pp line 244
type TFPSMap = class(TFPSList) |
||
public |
||
constructor Create(); |
|
Create a new map with given key and data size. |
function Add(); |
|
Add a key, value pair to the map. |
function Find(); |
|
Find data using the associated key |
function IndexOf(); |
|
Index of key pointed to by AKey |
function IndexOfData(); |
|
Index of data item AData |
function Insert(); |
|
Insert a new slot for key and associated data item in the list |
procedure InsertKey(); |
|
Insert a key in the list |
procedure InsertKeyData(); |
|
Insert a key and associated in the list |
function Remove(); |
|
Remove a key/value pair from the map. |
procedure Sort; |
|
Sort the list according to key |
property Duplicates: TDuplicates; [rw] |
|
What to do with duplicate key values |
|
Size (in bytes) for the key |
|
|
Size (in bytes) for the data associated with keys |
|
property Keys []: Pointer; [rw] |
|
Indexed access to the locations of all keys |
property Data []: Pointer; [rw] |
|
Indexed access to the locations of all data items |
property KeyData []: Pointer; default; [rw] |
|
Access to data locations using key |
property Sorted: Boolean; [rw] |
|
Is the map permanently sorted on key ? |
property OnPtrCompare: TFPSListCompareFunc; [rw] |
|
Alias for OnKeyPtrCompare |
property OnKeyPtrCompare: TFPSListCompareFunc; [rw] |
|
Callback to compare 2 keys |
property OnDataPtrCompare: TFPSListCompareFunc; [rw] |
|
Callback to compare 2 data items |
end; |
|
Basic map object, used in generic maps |
|
| | ||
|
Basic list of memory blocks |
|
| | ||
|
Base class of all classes. |
TFPSMap can be used to create a map for any type T that does not require reference counting (such as interfaced objects). It will specialize to a map which is a generalized list with an arbitrary type as the list index (called the key).
This class should normally not be used directly, instead use one of the generic map objects such as TFPGMap.
|
Generic map |