OMNeT++ Simulation Library  5.6.1
cQueue::Iterator Class Reference

#include <cqueue.h>

Description

Walks along a cQueue.

Public Member Functions

 Iterator (const cQueue &q, bool reverse=false)
 
void init (const cQueue &q, bool reverse=false)
 
cObjectoperator* () const
 
_OPPDEPRECATED cObjectoperator() () const
 
bool end () const
 
Iteratoroperator++ ()
 
Iterator operator++ (int)
 
Iteratoroperator-- ()
 
Iterator operator-- (int)
 

Constructor & Destructor Documentation

◆ Iterator()

Iterator ( const cQueue q,
bool  reverse = false 
)
inline

Constructor. Iterator will walk on the queue passed as argument. The iterator can be initialized for forward (front-to-back, using ++) or reverse (back-to-front, using ) iteration.

Member Function Documentation

◆ init()

void init ( const cQueue q,
bool  reverse = false 
)
inline

Reinitializes the iterator object.

◆ operator*()

cObject* operator* ( ) const
inline

Returns the current object.

◆ operator()()

_OPPDEPRECATED cObject* operator() ( ) const
inline

DEPRECATED. Use the * operator to access the object the iterator is at.

◆ end()

bool end ( ) const
inline

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

◆ operator++() [1/2]

Iterator& operator++ ( )
inline

Prefix increment operator (++it). Moves the iterator to the next object in the queue. It has no effect if the iterator has reached either end of the queue.

◆ operator++() [2/2]

Iterator operator++ ( int  )
inline

Postfix increment operator (it++). Moves the iterator to the next object in the queue, and returns the iterator's previous state. It has no effect if the iterator has reached either end of the queue.

◆ operator--() [1/2]

Iterator& operator-- ( )
inline

Prefix decrement operator (–it). Moves the iterator to the previous object in the queue. It has no effect if the iterator has reached either end of the queue.

◆ operator--() [2/2]

Iterator operator-- ( int  )
inline

Postfix decrement operator (it–). Moves the iterator to the previous object in the queue, and returns the iterator's previous state. It has no effect if the iterator has reached either end of the queue.


The documentation for this class was generated from the following file: