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.

noteNote

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:

Delphi

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

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

noteNote

for aNode in List do

aNode.Item := MyObject

RiverSoftAVG Products Help © 1996-2016 Thomas G. Grubb