OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

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

  job | Job 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

  source | Unused.
  node | Node 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:

- src/linkgraph/mcf.cpp