OpenTTD Source: LinkProperties Struct Reference

OpenTTD Source 15.3

Public Member Functions | Data Fields
LinkProperties Struct Reference

Monthly statistics for a link between two stations. More...

`#include <linkgraph_gui.h>`

## Public Member Functions
uint | Usage () const
| Return the usage of the link to display.

## Data Fields
CargoType | cargo = INVALID_CARGO
| Cargo type of the link.
uint | capacity = 0
| Capacity of the link.
uint | usage = 0
| Actual usage of the link.
uint | planned = 0
| Planned usage of the link.
uint32_t | time = 0
| Travel time of the link.
bool | shared = false
| If this is a shared link to be drawn dashed.

## Detailed Description

Monthly statistics for a link between two stations.

Only the cargo type of the most saturated linkgraph is taken into account.

Definition at line 23 of file linkgraph_gui.h.

## Constructor & Destructor Documentation

## ◆ LinkProperties()

LinkProperties::LinkProperties | ( |  | ) |
| inline

Definition at line 24 of file linkgraph_gui.h.

## Member Function Documentation

## ◆ Usage()

uint LinkProperties::Usage | ( |  | ) | const
| inline

Return the usage of the link to display.

Definition at line 27 of file linkgraph_gui.h.

References planned, and usage.

Referenced by LinkGraphOverlay::AddStats(), and LinkGraphOverlay::DrawContent().

## Field Documentation

## ◆ capacity

uint LinkProperties::capacity = 0

Capacity of the link.

Definition at line 30 of file linkgraph_gui.h.

Referenced by LinkGraphOverlay::AddStats(), and LinkGraphOverlay::DrawContent().

## ◆ cargo

CargoType LinkProperties::cargo = INVALID_CARGO

Cargo type of the link.

Definition at line 29 of file linkgraph_gui.h.

Referenced by LinkGraphOverlay::AddStats().

## ◆ planned

uint LinkProperties::planned = 0

Planned usage of the link.

Definition at line 32 of file linkgraph_gui.h.

Referenced by LinkGraphOverlay::AddStats(), and Usage().

## ◆ shared

bool LinkProperties::shared = false

If this is a shared link to be drawn dashed.

Definition at line 34 of file linkgraph_gui.h.

Referenced by LinkGraphOverlay::AddStats(), and LinkGraphOverlay::DrawContent().

## ◆ time

uint32_t LinkProperties::time = 0

Travel time of the link.

Definition at line 33 of file linkgraph_gui.h.

Referenced by LinkGraphOverlay::AddStats().

## ◆ usage

uint LinkProperties::usage = 0

Actual usage of the link.

Definition at line 31 of file linkgraph_gui.h.

Referenced by LinkGraphOverlay::AddStats(), and Usage().

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

- src/linkgraph/linkgraph_gui.h