Defines a linked list class where every node in the list has an associated Item object.
Namespace: GLists
TPersistent |
Delphi |
type |
|
|
|
To iterate through a list is easy: Delphi |
var |
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:
Note |
---|
for aNode in List do aNode.Item := MyObject |
Reference |