OpenTTD Source 20241224-master-gf74b0cf984
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

CargoID cargo
 Cargo type of the link.
 
uint capacity
 Capacity of the link.
 
uint usage
 Actual usage of the link.
 
uint planned
 Planned usage of the link.
 
uint32_t time
 Travel time of the link.
 
bool shared
 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

Capacity of the link.

Definition at line 30 of file linkgraph_gui.h.

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

◆ cargo

CargoID LinkProperties::cargo

Cargo type of the link.

Definition at line 29 of file linkgraph_gui.h.

Referenced by LinkGraphOverlay::AddStats().

◆ planned

uint LinkProperties::planned

Planned usage of the link.

Definition at line 32 of file linkgraph_gui.h.

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

◆ shared

bool LinkProperties::shared

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

Travel time of the link.

Definition at line 33 of file linkgraph_gui.h.

Referenced by LinkGraphOverlay::AddStats().

◆ usage

uint LinkProperties::usage

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: