SLLists provide pseudo-generic singly linked lists. DLLists provide
doubly linked lists. The lists are designed for the simple maintenance
of elements in a linked structure, and do not provide the more extensive
operations (or node-sharing) of class
List. They behave similarly
slist and similar classes described by Stroustrup.
All list nodes are created dynamically. Assignment is performed via copying.
DLList supports all
SLList operations, plus
additional operations described below.
For purposes of illustration, assume the specification of class
intSLList. In addition to the operations listed here,
SLLists support traversal via Pixes. See section Pseudo-indexes
intSLList b = a;
x = a.front()
x = a.remove_front()
a.ins_after(Pix i, item);
DLList supports the following additional operations,
as well as backward traversal via Pixes.
x = a.remove_rear();
a.ins_before(Pix i, x)
a.del(Pix& iint dir = 1)
Go to the first, previous, next, last section, table of contents.