TLinkList class
Defines a simple doubly linked list class.
Declaration
TLinkList = classDescription
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.
Properties
First | public | First item in the doubly linked list. |
Last | public | Last item in the doubly linked list. |
Count | public | Total number of items used in the doubly linked list. |
Methods
CreateItem | protected | Specifies the interface used to create a new linked list item for the class. |
GetNewItem | protected | Gets a new linked list item by reusing a free item or creating a new one. |
AddAsLast | protected | Configures and adds the specified item as the terminal node for the doubly linked list. |
Delete | public | Removes the specified list item from the doubly linked list. |
MoveToLast | public | Relocates the specified list item to the last (or terminal) node for the linked list. |
Clear | public | Removes all items in the doubly linked list. |
ConsistencyCheck | public | Checks the validity of traversal nodes and node counts in the doubly linked list. |
Create | public | Constructor for the class instance. |
Destroy | public | Destructor for the class instance. |
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
