OpenTTD
|
Base class for iterating across outgoing edges of a node. More...
#include <linkgraph.h>
Data Structures | |
class | FakePointer |
A "fake" pointer to enable operator-> on temporaries. More... |
Public Member Functions | |
BaseEdgeIterator (Tedge *base, NodeID current) | |
Constructor. | |
Titer & | operator++ () |
Prefix-increment. | |
Titer | operator++ (int) |
Postfix-increment. | |
template<class Tother > | |
bool | operator== (const Tother &other) |
Compare with some other edge iterator. | |
template<class Tother > | |
bool | operator!= (const Tother &other) |
Compare for inequality with some other edge iterator. | |
SmallPair< NodeID, Tedge_wrapper > | operator* () const |
Dereference with operator*. | |
FakePointer | operator-> () const |
Dereference with operator->. |
Protected Attributes | |
Tedge * | base |
Array of edges being iterated. | |
NodeID | current |
Current offset in edges array. |
Base class for iterating across outgoing edges of a node.
Only the real edges (those with capacity) are iterated. The ones with only distance information are skipped.
Tedge | Actual edge class. May be "BaseEdge" or "const BaseEdge". |
Titer | Actual iterator class. |
Definition at line 182 of file linkgraph.h.
|
inline |
Constructor.
base | Array of edges to be iterated. |
current | ID of current node (to locate the first edge). |
Definition at line 215 of file linkgraph.h.
|
inline |
Compare for inequality with some other edge iterator.
The other one may be of a child class.
Tother | Class of other iterator. |
other | Instance of other iterator. |
Definition at line 262 of file linkgraph.h.
|
inline |
Dereference with operator*.
Reimplemented in LinkGraphJob::EdgeIterator.
Definition at line 271 of file linkgraph.h.
|
inline |
|
inline |
Postfix-increment.
Definition at line 234 of file linkgraph.h.
|
inline |
Dereference with operator->.
Reimplemented in LinkGraphJob::EdgeIterator.
Definition at line 280 of file linkgraph.h.
|
inline |
Compare with some other edge iterator.
The other one may be of a child class.
Tother | Class of other iterator. |
other | Instance of other iterator. |
Definition at line 249 of file linkgraph.h.