OMNeT++ Simulation Library
5.6.1
|
#include <cmodule.h>
Iterates through the gates of a module.
Usage:
Public Member Functions | |
GateIterator (const cModule *m) | |
void | init (const cModule *m) |
cGate * | operator* () const |
_OPPDEPRECATED cGate * | operator() () const |
bool | end () const |
GateIterator & | operator++ () |
GateIterator | operator++ (int) |
|
inline |
Constructor. It takes the module on which to iterate.
void init | ( | const cModule * | m | ) |
Reinitializes the iterator.
|
inline |
Returns the current gate, or nullptr if the iterator is not at a valid position.
|
inline |
DEPRECATED. Use the * operator to access the object the iterator is at.
bool end | ( | ) | const |
Returns true if the iterator reached the end of the list.
|
inline |
Prefix increment operator (++it). Moves the iterator to the next gate. It has no effect if the iterator has reached either end of the list.
|
inline |
Postfix increment operator (it++). Moves the iterator to the next gate, and returns the iterator's previous state. It has no effect if the iterator has reached either end of the list.