OpenTTD Source: LinkGraphJob::EdgeAnnotation Struct Reference

OpenTTD Source 15.3

Public Member Functions | Data Fields | Friends
LinkGraphJob::EdgeAnnotation Struct Reference

Annotation for a link graph edge. More...

`#include <linkgraphjob.h>`

## Public Member Functions
| EdgeAnnotation (const LinkGraph::BaseEdge &base)
uint | Flow () const
| Get the total flow on the edge.
void | AddFlow (uint flow)
| Add some flow.
void | RemoveFlow (uint flow)
| Remove some flow.

## Data Fields
const LinkGraph::BaseEdge & | base
| Reference to the edge that is annotated.
uint | flow = 0
| Planned flow over this edge.

## Friends
bool | operator< (NodeID dest, const EdgeAnnotation &rhs)

## Detailed Description

Annotation for a link graph edge.

Definition at line 42 of file linkgraphjob.h.

## Constructor & Destructor Documentation

## ◆ EdgeAnnotation()

LinkGraphJob::EdgeAnnotation::EdgeAnnotation | ( | const LinkGraph::BaseEdge & | base | ) |
| inline

Definition at line 46 of file linkgraphjob.h.

## Member Function Documentation

## ◆ AddFlow()

void LinkGraphJob::EdgeAnnotation::AddFlow | ( | uint | flow | ) |
| inline

Add some flow.

Parameters

  flow | Flow to be added.

Definition at line 58 of file linkgraphjob.h.

References flow.

Referenced by Path::AddFlow().

## ◆ Flow()

uint LinkGraphJob::EdgeAnnotation::Flow | ( |  | ) | const
| inline

Get the total flow on the edge.

Returns
  Flow.

Definition at line 52 of file linkgraphjob.h.

References flow.

Referenced by Path::AddFlow().

## ◆ RemoveFlow()

void LinkGraphJob::EdgeAnnotation::RemoveFlow | ( | uint | flow | ) |
| inline

Remove some flow.

Parameters

  flow | Flow to be removed.

Definition at line 64 of file linkgraphjob.h.

References flow.

## Friends And Related Symbol Documentation

## ◆ operator<

bool operator< | ( | NodeID | dest,
|  | const EdgeAnnotation & | rhs
| ) |  |
| friend

Definition at line 70 of file linkgraphjob.h.

## Field Documentation

## ◆ base

const LinkGraph::BaseEdge& LinkGraphJob::EdgeAnnotation::base

Reference to the edge that is annotated.

Definition at line 43 of file linkgraphjob.h.

Referenced by Path::AddFlow(), LinkGraphJob::NodeAnnotation::operator[](), and LinkGraphJob::NodeAnnotation::operator[]().

## ◆ flow

uint LinkGraphJob::EdgeAnnotation::flow = 0

Planned flow over this edge.

Definition at line 44 of file linkgraphjob.h.

Referenced by AddFlow(), Flow(), and RemoveFlow().

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

- src/linkgraph/linkgraphjob.h