#include <CNCL/SLIterator.h>
CN_SLITERATOR
CNObject
CNDLIterator
CNSLList, CNSLObject
CNSLIterator
is an iterator to traverse a CNSLList
single
linked list.
Constructors:
CNSLIterator();
CNSLIterator(CNParam *param);
CNSLIterator
.
CNSLIterator(const CNSLList *new_list);
CNSLIterator(const CNSLList &new_list);
CNSLIterator
with linked list list
. The iterator
is reset to the first element in the list.
In addition to the member functions required by CNCL, CNSLIterator
provides:
void reset(const CNSLList *new_list);
void reset(const CNSLList &new_list);
void reset();
new_list
and/or sets the iterator
to the first element in the list.
CNObject *object()
CNObject *get_object()
NIL
, if none is available.
CNSLObject *position()
CNSLObject *get_position()
NIL
, if none is available.
void position(CNSLObject *pos)
void set_position(CNSLObject *pos)
CNObject *first_object();
CNObject *first();
NIL
, if none is available.
CNObject *last_object();
CNObject *last();
NIL
, if none is available.
CNObject *next_object();
CNObject *next();
CNObject *operator ++();
CNObject *operator ++(int);
NIL
, if none is available.
An example which shows the use of a Iterators
object to
traverse a double linked list can be found at the end of the class
CNDIterator
.
Go to the first, previous, next, last section, table of contents.