#include <cllist.h>
Public Methods | |
Iterator (const cLinkedList &q, bool athead=true) | |
void | init (const cLinkedList &q, bool athead=true) |
void* | operator() () const |
bool | end () const |
void* | operator++ (int) |
void* | operator-- (int) |
|
Constructor. Takes the cLinkedList object as argument. The current item will be the first (if athead==true, default) or the last (if athead==false) item in the list. |
|
Returns true if we have reached the end (with operator++) or the beginning (with operator--) of the list. |
|
Reinitializes the iterator object. |
|
Returns the current item. |
|
Returns the current item and steps to the next one. |
|
Returns the current item and steps to the previous one. |