OpenTTD Source 15.0-beta2
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, NodeID node)
 Setup the node to start iterating at.
 
NodeID Next ()
 Retrieve the ID of the node the next edge points to.
 

Private Attributes

LinkGraphJob & job
 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.

Field Documentation

◆ end

std::vector<LinkGraphJob::EdgeAnnotation>::const_iterator GraphEdgeIterator::end
private

Iterator pointing beyond last edge.

Definition at line 99 of file mcf.cpp.

◆ i

std::vector<LinkGraphJob::EdgeAnnotation>::const_iterator GraphEdgeIterator::i
private

Iterator pointing to current edge.

Definition at line 98 of file mcf.cpp.

◆ job

LinkGraphJob& GraphEdgeIterator::job
private

Job being executed.

Definition at line 96 of file mcf.cpp.


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