OpenTTD
Public Member Functions | Private Attributes
GraphEdgeIterator Class Reference

Iterator class for getting the edges in the order of their next_edge members. More...

Public Member Functions

 GraphEdgeIterator (LinkGraphJob &job)
 Construct a GraphEdgeIterator.
void SetNode (NodeID source, NodeID node)
 Setup the node to start iterating at.
NodeID Next ()
 Retrieve the ID of the node the next edge points to.

Private Attributes

LinkGraphJobjob
 Job being executed.
EdgeIterator i
 Iterator pointing to current edge.
EdgeIterator end
 Iterator pointing beyond last edge.

Detailed Description

Iterator class for getting the edges in the order of their next_edge members.

Definition at line 94 of file mcf.cpp.

Constructor & Destructor Documentation

GraphEdgeIterator::GraphEdgeIterator ( LinkGraphJob job)
inline

Construct a GraphEdgeIterator.

Parameters
jobJob to iterate on.

Definition at line 106 of file mcf.cpp.

Member Function Documentation

NodeID GraphEdgeIterator::Next ( )
inline

Retrieve the ID of the node the next edge points to.

Returns
Next edge's target node ID or INVALID_NODE.

Definition at line 125 of file mcf.cpp.

References end, and i.

void GraphEdgeIterator::SetNode ( NodeID  source,
NodeID  node 
)
inline

Setup the node to start iterating at.

Parameters
sourceUnused.
nodeNode to start iterating at.

Definition at line 115 of file mcf.cpp.

References end, i, and job.


The documentation for this class was generated from the following file: