[Overview][Classes][Index] Reference for unit 'LazLinkedList' (#lazutils)

TLinkList

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

Defines a simple doubly linked list class.

Declaration

Source position: lazlinkedlist.pas line 32

type TLinkList = class

protected

  function CreateItem; virtual; abstract;

  

Specifies the interface used to create a new linked list item for the class.

  function GetNewItem;

  

Gets a new linked list item by reusing a free item or creating a new one.

  procedure AddAsLast();

  

Configures and adds the specified item as the terminal node for the doubly linked list.

public

  property First: TLinkListItem; [r]

  

First item in the doubly linked list.

  property Last: TLinkListItem; [r]

  

Last item in the doubly linked list.

  property Count: Integer; [r]

  

Total number of items used in the doubly linked list.

  procedure Delete();

  

Removes the specified list item from the doubly linked list.

  procedure MoveToLast();

  

Relocates the specified list item to the last (or terminal) node for the linked list.

  procedure Clear;

  

Removes all items in the doubly linked list.

  function ConsistencyCheck;

  

Checks the validity of traversal nodes and node counts in the doubly linked list.

  constructor Create;

  

Constructor for the class instance.

  destructor Destroy; override;

  

Destructor for the class instance.

end;

Inheritance

TLinkList

  

Defines a simple doubly linked list class.

|

TObject

Description

TLinkList is a class which defines a navigational interface for a simple doubly linked list.

TLinkList provides properties used to access the First and Last items in the linked list, the number of list items in Count, and the first free item in the linked list. Items in the linked list are represented using the TLinkListItem class, which provides Prior and Next properties for navigation of items in the list.

TLinkList contains an abstract virtual CreateItem method that is used to create new items for the linked list. The method must be implemented in a descendent class to provided implementation details that address storage and ownership of the linked list items. See TGtkMessageQueue for an example of a concrete implementation of the TLinkList class.


Version 4.0 Generated 2025-05-03 Home