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

TBaseMapIterator.InternalLocate

True when a matching map item is found.

Declaration

Source position: maps.pp line 144

protected function TBaseMapIterator.InternalLocate(

  const AId

):Boolean;

Arguments

AId

  

Map item to locate in the method.

Function result

True when the map item exists in the map.

Description

InternalLocate is a Boolean function used to locate the specified map item in the AVL Tree for the map. AID contains a pointer to the map item and its ID and Data values. The return value is True when a matching map item is found.

InternalLocate calls ValidateMap to ensure that the map is still valid for the iterator. An EInvalidOperation is raised in ValidateMap if the structure is not assigned (contains Nil).

InternalLocate compares the map item in AId to the nodes in the AVL Tree for the map. The internal Invalid flag is set to True if a map item in the linked list has been removed, or when the map has been freed. The values in the following properties are updated to reflect the position and state for the iterator:

BOM
True when the item in Current is Nil
EOM
True when the item in Current is Nil
Current
Node in the AVL Tree where the item is stored, or the value from Last when the item is not found

Do not call InternalLocate directly. It is called from descendant classes which implement the Locate method.


Version 4.0 Generated 2025-05-03 Home