Iterator for connections within a network. More...
Public Member Functions | |
dsim_connection * | connection () |
Retrieves the connection associated with the iterator's current state. | |
dsim_connection_iterator & | next () |
Moves the iterator to the next connection in the set. | |
bool | finished () |
Determines whether or not the iterator now points to an invalid connection, indicating that the iteration has completed. |
Iterator for connections within a network.
Models can make use of a connection iterator, returned from dsim_network::connection_iterator(), to loop through the set of connections within a network.
It is important to note that the set of connections is in fact a set- it is not ordered in any fashion. If the controlling model would like to do any ordering on it, managing that order via the dsim_network::object_identifier() functon is the best way to go about it.
A dsim_connection_iterator is not a STL iterator. Do not attempt to use it in place of an STL iterator; such attempts will fail.
dsim_connection* dsim_connection_iterator::connection | ( | ) | [inline] |
Retrieves the connection associated with the iterator's current state.
bool dsim_connection_iterator::finished | ( | ) |
Determines whether or not the iterator now points to an invalid connection, indicating that the iteration has completed.
Once finished() returns true, next() should no longer be called on this iterator.
dsim_connection_iterator& dsim_connection_iterator::next | ( | ) | [inline] |
Moves the iterator to the next connection in the set.
The iterator object is mutated by this function call.