cSubModIterator Class Reference

#include <cmodule.h>

List of all members.


Detailed Description

Iterates through submodules of a compound module.

Example:

 for (cSubModIterator i(*modp); !i.end(); i++)
 {
     cModule *submodp = i();
     ...
 }


Public Member Functions

 cSubModIterator (const cModule &h)
void init (const cModule &h)
cModuleoperator() () const
bool end () const
cModuleoperator++ (int)


Constructor & Destructor Documentation

cSubModIterator::cSubModIterator const cModule h  )  [inline]
 

Constructor.

It takes the parent module.


Member Function Documentation

bool cSubModIterator::end  )  const [inline]
 

Returns true if the iterator reached the end of the list.

void cSubModIterator::init const cModule h  )  [inline]
 

Reinitializes the iterator.

cModule* cSubModIterator::operator()  )  const [inline]
 

Returns pointer to the current module.

The pointer then may be cast to the appropriate cModule subclass. Returns NULL of the iterator has reached the end of the list.

cModule* cSubModIterator::operator++ int   )  [inline]
 

Returns the current module, then moves the iterator to the next module.

Returns NULL if the iterator has already reached the end of the list.


The documentation for this class was generated from the following file:
Generated on Sat Oct 21 17:47:57 2006 for OMNeT++/OMNEST Simulation Library by  doxygen 1.4.6