cArray::Iterator Class Reference

Walks along a cArray. More...

#include <carray.h>

List of all members.

Public Member Functions

 Iterator (const cArray &a, bool athead=true)
void init (const cArray &a, bool athead=true)
cObjectoperator() ()
bool end () const
cObjectoperator++ (int)
cObjectoperator-- (int)

Detailed Description

Walks along a cArray.


Constructor & Destructor Documentation

cArray::Iterator::Iterator ( const cArray a,
bool  athead = true 
) [inline]

Constructor.

Iterator will walk on the array passed as argument. The starting object will be the first (if athead==true) or the last (athead==false) object in the array, not counting empty slots.


Member Function Documentation

cObject* cArray::Iterator::operator++ ( int   ) 

Returns the current object, then moves the iterator to the next item.

Empty slots in the array are skipped. If the iterator has reached either end of the array, nothing happens; you have to call init() again to restart iterating. If elements are added or removed during interation, the behaviour is undefined.

cObject* cArray::Iterator::operator-- ( int   ) 

Returns the current object, then moves the iterator to the previous item.

Empty slots in the array are skipped. If the iterator has reached either end of the array, nothing happens; you have to call init() again to restart iterating. If elements are added or removed during interation, the behaviour is undefined.


The documentation for this class was generated from the following file:
Generated on Tue Dec 2 11:16:28 2014 for OMNeT++ Simulation Library by  doxygen 1.6.3