#include <CNCL/SLList.h>
CN_SLLIST
CNObject
CNDLList
CNSLObject, CNSLIterator
CNSLList is a single linked list that can contain any CNCL
compatible object.
Constructors:
CNSLList();
CNSLList(CNParam *param);
Destructors:
~CNSLList();
CNSLObject nodes. It does NOT
delete the objects referenced by the nodes.
In addition to the member functions required by CNCL, CNSLList provides:
CNSLObject *first() const;
NIL if the list is empty.
virtual CNSLObject *last() const;
NIL if the list is empty.
CNSLObject *next(CNSLObject *link) const;
link points to the
current node. This may be NIL if the next node doesn't exist.
virtual CNSLObject *prev(CNSLObject *link) const;
link points to the
current node. This may be NIL if the previous node doesn't exist.
bool empty() const;
DLList is empty.
unsigned long length() const;
DLList.
virtual CNSLObject *append(CNObject *obj);
virtual CNSLObject *append(CNObject &obj);
obj. It returns the node allocated for the object.
virtual CNSLObject *append(CNSLObject *obj);
obj.
virtual CNSLObject *prepend(CNObject *obj);
virtual CNSLObject *prepend(CNObject &obj);
obj. It returns the node allocated for the object.
virtual CNSLObject *prepend(CNSLObject *obj);
obj.
virtual CNSLObject *delete_object(CNSLObject *pos);
pos from the list. It returns the next node. This
function deletes the node (CNSLObject) from the list, but it does
NOT delete the object referenced by the node.
virtual CNSLObject *remove_object(CNSLObject *pos);
pos from the list. It returns the next
node. This function does NOT delete the linked list node
(CNSLObject) and it does NOT delete the object referenced by the
node, either.
void delete_all();
void delete_all_w_obj();
virtual CNSLObject *insert_before(CNSLObject *pos, CNObject *obj);
virtual CNSLObject *insert_before(CNSLObject *pos, CNObject &obj);
obj and inserts it into the list before
node pos. It returns the new node.
virtual CNSLObject *insert_before(CNSLObject *pos, CNSLObject *obj);
pos.
It returns obj.
virtual CNSLObject *insert_after(CNSLObject *pos, CNObject *obj);
virtual CNSLObject *insert_after(CNSLObject *pos, CNObject &obj);
obj and inserts it into the list after
node pos. It returns the new node.
virtual CNSLObject *insert_after(CNSLObject *pos, CNSLObject *obj);
pos.
It returns obj.
Go to the first, previous, next, last section, table of contents.