Sign in Join
FPDoc Onlineexperiment

TFPGMapInterfacedObjectData class

In unit fgl

Generic map for reference counted objects.

Declaration

pascal
TFPGMapInterfacedObjectData<TKey,TData> = class(TFPSMap)

Inheritance

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

Description

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 equivalent to TFPGMap, but operates on data items that require additional reference counting code on the data.

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

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.