Sign in Join
FPDoc Onlineexperiment

TMap class

In unit Maps

Implements a map for unique IDs to arbitrary data.

Declaration

pascal
TMap = class(TBaseMap)

Inheritance

  1. TMap
  2. TBaseMap
  3. TPersistent

Description

Implements a map for unique IDs to arbitrary data. The ID-to-Data mapping is stored in an Average Level Binary Tree for fast indexing. The map also maintains a linked list between the ordered items for fast iteration through its elements. The ID can be signed or unsigned, with a size of 1, 2, 4, 8, 16 or 32 bytes. The data can be of any (constant) size.

TMap extends the ancestor class to include public methods which Add map items, and read or write their arbitrary data values.

Author: Marc Weustink

Methods

AddpublicAdds a map item with the specified ID and Data values.
HasIdpublicChecks for the specified ID is in the AVL Tree for the map.
GetDatapublicGets the Data for the map item with the specified ID.
GetDataPtrpublicGets a Pointer to the data for the specified map item.
SetDatapublicStores the data for the specified map item.

Inherited

From TBaseMap (13)

Clear Count Create Delete Destroy InternalAdd InternalGetData InternalGetDataPtr InternalGetId InternalSetData LockMap ReleaseData UnLockMap

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.