Iterates through the gates of a module. More...
#include <cmodule.h>
Public Member Functions | |
| GateIterator (const cModule *m) | |
| void | init (const cModule *m) | 
| cGate * | operator() () const | 
| bool | end () const | 
| cGate * | operator++ (int) | 
| cGate * | operator+= (int k) | 
Iterates through the gates of a module.
Example:
for (cModule::GateIterator i(modp); !i.end(); i++) { cGate *gate = i(); ... }
| cModule::GateIterator::GateIterator | ( | const cModule * | m | ) |  [inline] | 
        
Constructor.
It takes the module on which to iterate.
| cGate* cModule::GateIterator::operator() | ( | ) |  const [inline] | 
        
Returns a pointer to the current gate.
Only returns NULL if the iterator has reached the end of the list.
| cGate* cModule::GateIterator::operator++ | ( | int | ) | 
Returns the current gate, then moves the iterator to the next gate.
Only returns NULL if the iterator has already reached the end of the list.
| cGate* cModule::GateIterator::operator+= | ( | int | k | ) | 
Advances the iterator by k gates.
Equivalent to calling "++" k times, but more efficient.
 1.6.3