[Overview][Constants][Types][Classes][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Generic map for reference counted objects
Source position: fgl.pp line 377
type generic TFPGMapInterfacedObjectData <TKey,TData>= class(TFPSMap) |
||
public |
||
constructor Create; |
|
Create a new instance of the map |
function Add(); |
|
Add a key and value to the map |
function Find(); |
|
Find item based on key |
function TryGetData(); |
|
Find data or return default |
procedure AddOrSetData(); |
|
Add data with given or set value if the key already exists. |
function IndexOf(); |
|
Find index of a key in the list. |
function IndexOfData(); |
|
Find index of data value in the list. |
procedure InsertKey(); |
|
Insert a new key in the list |
procedure InsertKeyData(); |
|
Insert a new key with associated data in the list |
function Remove(); |
|
Remove a key from the list |
property Keys []: TKey; [rw] |
|
Indexed access to the keys in the list. |
property Data []: TData; [rw] |
|
Indexed access to the data in the list |
property KeyData []: TData; default; [rw] |
|
Access to data based on key |
property OnCompare: TKeyCompareFunc; [rw] |
|
Alias for OnKeyCompare |
property OnKeyCompare: TKeyCompareFunc; [rw] |
|
Compare function for key values. |
property OnDataCompare: TDataCompareFunc; [rw] |
|
Compare function for data values. |
end; |
|
Generic map for reference counted objects |
|
|
Basic map object, used in generic maps |
|
|
Basic list of memory blocks |
|
|
Base class of all classes. |
TFPGInterfacedObjectMap is a generic map class. It can be used to specialize a map for any key type, with associated data type that requires manual reference counting: any type which implements IInterface. For non-reference counted objects, TFPGMap should be used.
This map class is entirely equivalend to TFPGMap, but operates on data items that require additional reference counting code on the data.
|
Generic map |