Sign in Join
FPDoc Onlineexperiment

TBaseMap class

In unit Maps

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

Declaration

pascal
TBaseMap = class(TPersistent)

Inheritance

  1. TBaseMap
  2. TPersistent
  3. TObject

Descends from it: TMap TTypedMap

Description

Implements the base class that is 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.

Use a descendant class, such as TMap, which includes methods to Add items and to read or write their arbitrary data values.

Author: Marc Weustink

See also

Methods

LockMapprotectedLocks the Map when an iterator is added.
UnLockMapprotectedUnlocks the Map when an iterator is removed.
InternalAddprotectedAdds a map item with the specified ID and Data to the AVL Tree.
InternalGetDataprotectedGets the data stored in the specified map item.
InternalGetDataPtrprotectedGets a Pointer to the data for the specified map item.
InternalGetIdprotectedGet the ID value for the specified map item.
InternalSetDataprotectedStores the data for the specified map item.
ReleaseDataprotectedFrees resources allocated for the data in the map item.
CreatepublicConstructor for the class instance.
ClearpublicClears all map items in the AVL Tree.
CountpublicGets the number of map items in the AVL Tree.
DeletepublicDeletes the specified map item from the AVL Tree.
DestroypublicDestructor for the class instance.

Inherited

From TPersistent (8)

Assign AssignTo DefineProperties FPOAttachObserver FPODetachObserver FPONotifyObservers GetNamePath GetOwner

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.