OpenTTD

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

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions | Private Attributes
LinkGraphJob::EdgeIterator Class Reference

Iterator for job edges. More...

`#include <linkgraphjob.h>`

Inheritance diagram for LinkGraphJob::EdgeIterator:

## Public Member Functions
| EdgeIterator (const LinkGraph::BaseEdge *base, EdgeAnnotation *base_anno, NodeID current)
| Constructor.
SmallPair< NodeID, Edge > | operator* () const
| Dereference.
FakePointer | operator-> () const
| Dereference.
Public Member Functions inherited from LinkGraph::BaseEdgeIterator< const LinkGraph::BaseEdge, Edge, EdgeIterator >
| BaseEdgeIterator (const LinkGraph::BaseEdge *base, NodeID current)
| Constructor.
EdgeIterator & | operator++ ()
| Prefix-increment.
EdgeIterator | operator++ (int)
| Postfix-increment.
bool | operator== (const Tother &other)
| Compare with some other edge iterator.
bool | operator!= (const Tother &other)
| Compare for inequality with some other edge iterator.

## Private Attributes
EdgeAnnotation * | base_anno
| Array of annotations to be (indirectly) iterated.

## Additional Inherited Members
Protected Attributes inherited from LinkGraph::BaseEdgeIterator< const LinkGraph::BaseEdge, Edge, EdgeIterator >
const LinkGraph::BaseEdge * | base
| Array of edges being iterated.
NodeID | current
| Current offset in edges array.

## Detailed Description

Iterator for job edges.

Definition at line 147 of file linkgraphjob.h.

## Constructor & Destructor Documentation

LinkGraphJob::EdgeIterator::EdgeIterator | ( | const LinkGraph::BaseEdge * | base,
|  | EdgeAnnotation * | base_anno,
|  | NodeID | current
| ) |  |
| inline

Constructor.

Parameters

  base | Array of edges to be iterated.
  base_anno | Array of annotations to be iterated.
  current | Start offset of iteration.

Definition at line 156 of file linkgraphjob.h.

## Member Function Documentation

SmallPair<NodeID, Edge> LinkGraphJob::EdgeIterator::operator* | ( |  | ) | const
| inline

Dereference.

Returns
  Pair of the edge currently pointed to and the ID of its other end.

Reimplemented from LinkGraph::BaseEdgeIterator< const LinkGraph::BaseEdge, Edge, EdgeIterator >.

Definition at line 165 of file linkgraphjob.h.

References LinkGraph::BaseEdgeIterator< const LinkGraph::BaseEdge, Edge, EdgeIterator >::base, base_anno, and LinkGraph::BaseEdgeIterator< const LinkGraph::BaseEdge, Edge, EdgeIterator >::current.

FakePointer LinkGraphJob::EdgeIterator::operator-> | ( |  | ) | const
| inline

Dereference.

Has to be repeated here as operator* is different than in LinkGraph::EdgeWrapper.

Returns
  Fake pointer to pair of NodeID/Edge.

Reimplemented from LinkGraph::BaseEdgeIterator< const LinkGraph::BaseEdge, Edge, EdgeIterator >.

Definition at line 175 of file linkgraphjob.h.

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

- src/linkgraph/linkgraphjob.h