[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'Maps' (#lazutils)

TMap

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Implements a map for unique IDs to arbitrary data.

Declaration

Source position: maps.pp line 162

type TMap = class(TBaseMap)

public

  procedure Add();

  

Adds a map item with the specified ID and Data values.

  function HasId();

  

Checks for the specified ID is in the AVL Tree for the map.

  function GetData();

  

Gets the Data for the map item with the specified ID.

  function GetDataPtr();

  

Gets a Pointer to the data for the specified map item.

  function SetData();

  

Stores the data for the specified map item.

end;

Inheritance

TMap

  

Implements a map for unique IDs to arbitrary data.

|

TBaseMap

  

Implements the base class for a map for unique IDs to arbitrary data.

|

TPersistent,IFPObserved

|

TObject

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


Version 3.2 Generated 2024-02-25 Home