Class TGenericStructMap
Unit
CastleGenericLists
Declaration
type generic TGenericStructMap<TKey,TData> = class(TFPSMap)
Description
Generic map of types, with keys compared by CompareByte.
This is equivalent to TFPGMap, except our KeyCompare doesn't use < or > or even = operators, instead it compares by CompareByte. So it works with types that do not have built-in < or > or even = operator in FPC, like records or class instances.
See also http://bugs.freepascal.org/view.php?id=15480 .
Hierarchy
- TFPSMap
- TGenericStructMap
Overview
Internal Types
Methods
 |
constructor Create; |
 |
function Add(const AKey: TKey; const AData: TData): Integer; |
 |
function Add(const AKey: TKey): Integer; |
 |
function Find(const AKey: TKey; out Index: Integer): Boolean; |
 |
function IndexOf(const AKey: TKey): Integer; |
 |
function IndexOfData(const AData: TData): Integer; |
 |
procedure InsertKey(Index: Integer; const AKey: TKey); |
 |
procedure InsertKeyData(Index: Integer; const AKey: TKey; const AData: TData); |
 |
function Remove(const AKey: TKey): Integer; |
Properties
Description
Internal Types
 |
TDataCompareFunc = function(const Data1, Data2: TData): Integer; |
|
 |
TKeyCompareFunc = function(const Key1, Key2: TKey): Integer; |
|
Methods
 |
constructor Create; |
|
 |
function Add(const AKey: TKey; const AData: TData): Integer; |
|
 |
function Add(const AKey: TKey): Integer; |
|
 |
function Find(const AKey: TKey; out Index: Integer): Boolean; |
|
 |
function IndexOf(const AKey: TKey): Integer; |
|
 |
function IndexOfData(const AData: TData): Integer; |
|
 |
procedure InsertKey(Index: Integer; const AKey: TKey); |
|
 |
procedure InsertKeyData(Index: Integer; const AKey: TKey; const AData: TData); |
|
 |
function Remove(const AKey: TKey): Integer; |
|
Properties
 |
property Keys[Index:Integer]: TKey read GetKey write PutKey; |
|
 |
property Data[Index:Integer]: TData read GetData write PutData; |
|
 |
property KeyData[constAKey:TKey]: TData read GetKeyData write PutKeyData; |
|
 |
property OnCompare: TKeyCompareFunc read FOnKeyCompare write SetOnKeyCompare; |
|
 |
property OnKeyCompare: TKeyCompareFunc read FOnKeyCompare write SetOnKeyCompare; |
deprecated;
|
 |
property OnDataCompare: TDataCompareFunc read FOnDataCompare write SetOnDataCompare; |
|
Generated by PasDoc 0.13.0 on 2013-08-17 21:27:12
|