OpenTTD Source  20241121-master-g67a0fccfad
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. More...
 
void SetNode (NodeID, NodeID node)
 Setup the node to start iterating at. More...
 
NodeID Next ()
 Retrieve the ID of the node the next edge points to. More...
 

Private Attributes

LinkGraphJobjob
 Job being executed.
 
std::vector< LinkGraphJob::EdgeAnnotation >::const_iterator i
 Iterator pointing to current edge.
 
std::vector< LinkGraphJob::EdgeAnnotation >::const_iterator 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::GraphEdgeIterator ( LinkGraphJob job)
inline

Construct a GraphEdgeIterator.

Parameters
jobJob to iterate on.

Definition at line 107 of file mcf.cpp.

Member Function Documentation

◆ Next()

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 123 of file mcf.cpp.

◆ SetNode()

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

Setup the node to start iterating at.

Parameters
nodeNode to start iterating at.

Definition at line 113 of file mcf.cpp.


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