#include <cqueue.h>
Public Methods | |
Iterator (const cQueue &q, bool athead=true) | |
void | init (const cQueue &q, bool athead=true) |
cObject& | operator[] (int) |
cObject* | operator() () |
bool | end () const |
cObject* | operator++ (int) |
cObject* | operator-- (int) |
|
Constructor. cQueueIterator will walk on the queue passed as argument. The current object will be the first (if athead==true) or the last (athead==false) object in the queue. |
|
Returns true if the iterator has reached either end of the queue. |
|
Reinitializes the iterator object. |
|
Returns the current object. |
|
Returns the current object, then moves the iterator to the next item. If the iterator has reached either end of the queue, nothing happens; you have to call init() again to restart iterating. |
|
Returns the current object, then moves the iterator to the previous item. If the iterator has reached either end of the queue, nothing happens; you have to call init() again to restart iterating. |
|
DEPRECATED. Use operator() instead. |