Show/Hide Toolbars

RiverSoftAVG Products Help

Navigation: Code Documentation > RSCommon > GLists > Classes

TGCustomLinkedList Class

Scroll Prev Top Next More

Provides a base linked list class from which to derive all other types of linked lists (doubly linked lists, stacks, and queues).

All structures will have the advantage of being persistent, easily extendable, and assignment compatible. However, the TGCustomLinkedList is slower than a TList because it creates objects for every node.


This class uses TPersistents instead of records for the nodes because of expandability, readability, and power. The performance hit is small (<3%).

Namespace: GLists

The list also provides accessor properties to do this for you. The following example also iterates through the list:


List.Reset; // go to head of list
 while not List.EndOfList do
   List.Item := MyObject;

The TGCustomLinkedList also supports the for-in construct of Delphi:


for aNode in List do

aNode.Item := MyObject

RiverSoftAVG Products Help © 1996-2016 Thomas G. Grubb