Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members  

cQueueIterator Class Reference

#include <cqueue.h>

List of all members.

Public Methods

 cQueueIterator (const cQueue &q, int athead=1)
void init (const cQueue &q, int athead=1)
cObjectoperator[] (int)
cObjectoperator() ()
bool end () const
cObjectoperator++ (int)
cObjectoperator-- (int)


Detailed Description

Walks along a cQueue.

NOTE: not a cObject descendant.


Constructor & Destructor Documentation

cQueueIterator::cQueueIterator ( const cQueue & q,
int athead = 1 ) [inline]
 

Constructor. cQueueIterator will walk on the queue passed as argument. The current object will be the first (if a==1) or the last (a==0) object in the queue.


Member Function Documentation

bool cQueueIterator::end ( ) const [inline]
 

Returns true if the iterator has reached either end of the queue.

void cQueueIterator::init ( const cQueue & q,
int athead = 1 ) [inline]
 

Reinitializes the iterator object.

cObject * cQueueIterator::operator() ( ) [inline]
 

Returns the current object.

cObject * cQueueIterator::operator++ ( int ) [inline]
 

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.

cObject * cQueueIterator::operator-- ( int ) [inline]
 

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.

cObject & cQueueIterator::operator[] ( int ) [inline]
 

OBSOLETE. Use operator() instead.


The documentation for this class was generated from the following file:
Generated at Sat May 4 15:45:51 2002 for OMNeT++ by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001