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
Fields
Methods
Properties
Description
Internal Types
TDataCompareFunc = function(const Data1, Data2: TData): Integer;
TKeyCompareFunc = function(const Key1, Key2: TKey ): Integer;
Fields
Methods
procedure CopyItem (Src, Dest: Pointer); override;
procedure CopyKey (Src, Dest: Pointer); override;
procedure CopyData (Src, Dest: Pointer); override;
procedure Deref (Item: Pointer); override;
procedure InitOnPtrCompare ; override;
function GetKey (Index: Integer): TKey ;
function GetKeyData (const AKey: TKey ): TData;
function GetData (Index: Integer): TData;
function KeyCompare (Key1, Key2: Pointer): Integer;
function KeyCustomCompare (Key1, Key2: Pointer): Integer;
function DataCustomCompare (Data1, Data2: Pointer): Integer;
function DataCompare(Data1, Data2: Pointer): Integer;
procedure PutKey (Index: Integer; const NewKey: TKey );
procedure PutKeyData (const AKey: TKey ; const NewData: TData);
procedure PutData (Index: Integer; const NewData: TData);
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
Generated by PasDoc 0.13.0 on 2014-04-30 22:06:43