Sign in Join
FPDoc Onlineexperiment

TFPSMap class

In unit fgl

Basic map object, used in generic maps.

Declaration

pascal
TFPSMap = class(TFPSList)

Inheritance

  1. TFPSMap
  2. TFPSList
  3. TObject

Descends from it: TFPGMap TFPGMapInterfacedObjectData TFPGMapObject

Description

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.

See also

Properties

DuplicatespublicWhat to do with duplicate key values.
KeySizepublicSize (in bytes) for the key.
DataSizepublicSize (in bytes) for the data associated with keys.
KeyspublicIndexed access to the locations of all keys.
DatapublicIndexed access to the locations of all data items.
KeyDatapublicAccess to data locations using key.
SortedpublicIs the map permanently sorted on key ?

Methods

BinaryCompareKeyprotected
BinaryCompareDataprotected
SetOnKeyPtrCompareprotected
SetOnDataPtrCompareprotected
InitOnPtrCompareprotected
CopyKeyprotected
CopyDataprotected
GetKeyprotected
GetKeyDataprotected
GetDataprotected
LinearIndexOfprotected
PutKeyprotected
PutKeyDataprotected
PutDataprotected
CreatepublicCreate a new map with given key and data size.
AddpublicAdd a key, value pair to the map.
FindpublicFind data using the associated key.
IndexOfpublicIndex of key pointed to by AKey.
IndexOfDatapublicIndex of data item AData.
InsertpublicInsert a new slot for key and associated data item in the list.
InsertKeypublicInsert a key in the list.
InsertKeyDatapublicInsert a key and associated in the list.
RemovepublicRemove a key/value pair from the map.
SortpublicSort the list according to key.
SortRangepublic

Events

OnPtrComparepublicAlias for OnKeyPtrCompare.
OnKeyPtrComparepublicCallback to compare 2 keys.
OnDataPtrComparepublicCallback to compare 2 data items.

Inherited

From TFPSList (39)

AddList Assign Capacity CheckIndex Clear CopyItem CopyItems Count Delete DeleteRange Deref Destroy Error Exchange Expand Extract First Get GetFirst GetLast InsertRange InternalExchange InternalGet InternalItems InternalPut ItemIsManaged Items ItemSize Last List Move Pack Put QuickSort RaiseIndexError SetCapacity SetCount SetFirst SetLast

From TObject (40)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.