- Main Page
- Modules
- Classes
- Files
- Directories
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# 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)
cModule * | operator() () const
bool | end () const
cModule * | operator++ (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:

- cmodule.h