Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members  

cQueue::Iterator Class Reference

#include <cqueue.h>

List of all members.

Public Methods

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


Detailed Description

Walks along a cQueue.


Constructor & Destructor Documentation

cQueue::Iterator::Iterator ( const cQueue & q,
bool athead = true ) [inline]
 

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.


Member Function Documentation

bool cQueue::Iterator::end ( ) const [inline]
 

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

void cQueue::Iterator::init ( const cQueue & q,
bool athead = true ) [inline]
 

Reinitializes the iterator object.

cObject * cQueue::Iterator::operator() ( ) [inline]
 

Returns the current object.

cObject * cQueue::Iterator::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 * cQueue::Iterator::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 & cQueue::Iterator::operator[] ( int ) [inline]
 

DEPRECATED. Use operator() instead.


The documentation for this class was generated from the following file:
Generated at Mon Jun 16 23:37:33 2003 for OMNeT++ by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001