cModule::SubmoduleIterator Class Reference

Iterates through submodules of a compound module. More...

#include <cmodule.h>

Inheritance diagram for cModule::SubmoduleIterator:
cSubModIterator

List of all members.

Public Member Functions

 SubmoduleIterator (const cModule *m)
void init (const cModule *m)
cModuleoperator() () const
bool end () const
cModuleoperator++ (int)

Detailed Description

Iterates through submodules of a compound module.

Example:

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

Constructor & Destructor Documentation

cModule::SubmoduleIterator::SubmoduleIterator ( const cModule m  )  [inline]

Constructor.

It takes the parent module on which to iterate.


Member Function Documentation

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

Returns pointer to the current module.

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

cModule* cModule::SubmoduleIterator::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 Tue Dec 2 11:16:29 2014 for OMNeT++ Simulation Library by  doxygen 1.6.3