Sign in Join
FPDoc Onlineexperiment

TFPGMapObject class

In unit fgl

Generic map.

Declaration

pascal
TFPGMapObject<TKey;TData: TObject = class

Inheritance

  1. TFPGMapObject
  2. TFPSMap
  3. TFPSList
  4. TObject

Description

TFPGMapObject is a generic map class. It can be used to specialize a map for object types, but not objects with automated reference counting: For reference counted interface objects, TFPGMapInterfacedObjectData must be used.

See also

Properties

KeyspublicIndexed access to the keys in the list.
DatapublicIndexed access to the data in the list.
KeyDatapublicAccess to data based on key.

Methods

CopyItemprotected
CopyKeyprotected
CopyDataprotected
Derefprotected
InitOnPtrCompareprotected
GetKeyprotected
GetKeyDataprotected
GetDataprotected
KeyCompareprotected
KeyCustomCompareprotected
DataCustomCompareprotected
PutKeyprotected
PutKeyDataprotected
PutDataprotected
SetOnKeyCompareprotected
SetOnDataCompareprotected
CreatepublicCreate a new instance of the map.
AddpublicAdd a key and value to the map.
FindpublicFind item based on key.
TryGetDatapublicFind data or return default.
AddOrSetDatapublicAdd data with given or set value if the key already exists.
IndexOfpublicFind index of a key in the list.
IndexOfDatapublicFind index of data value in the list.
InsertKeypublicInsert a new key in the list.
InsertKeyDatapublicInsert a new key with associated data in the list.
RemovepublicRemove a key from the list.

Events

OnComparepublicAlias for OnKeyCompare.
OnKeyComparepublicCompare function for key values.
OnDataComparepublicCompare function for data values.

Fields

FOnKeyCompareprotected
FOnDataCompareprotected
FFreeObjectsprotected

Inherited

From TFPSMap (15)

BinaryCompareData BinaryCompareKey DataSize Duplicates Insert KeySize LinearIndexOf OnDataPtrCompare OnKeyPtrCompare OnPtrCompare SetOnDataPtrCompare SetOnKeyPtrCompare Sort Sorted SortRange

From TFPSList (37)

AddList Assign Capacity CheckIndex Clear CopyItems Count Delete DeleteRange 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.