OpenTTD Source 20241224-master-gee860a5c8e
CargoSummaryItem Struct Reference

Helper struct for the cargo details information. More...

Public Member Functions

bool operator!= (const CargoSummaryItem &other) const
 Used by CargoSummary::Find() and similar functions.
 
bool operator== (const CargoSummaryItem &other) const
 Used by std::find() and similar functions.
 

Data Fields

CargoID cargo
 The cargo that is carried.
 
StringID subtype
 STR_EMPTY if none.
 
uint capacity
 Amount that can be carried.
 
uint amount
 Amount that is carried.
 
StationID source
 One of the source stations.
 

Detailed Description

Helper struct for the cargo details information.

Definition at line 175 of file train_gui.cpp.

Member Function Documentation

◆ operator!=()

bool CargoSummaryItem::operator!= ( const CargoSummaryItem other) const
inline

Used by CargoSummary::Find() and similar functions.

Definition at line 183 of file train_gui.cpp.

References cargo, and subtype.

◆ operator==()

bool CargoSummaryItem::operator== ( const CargoSummaryItem other) const
inline

Used by std::find() and similar functions.

Definition at line 189 of file train_gui.cpp.

References cargo.

Field Documentation

◆ amount

uint CargoSummaryItem::amount

Amount that is carried.

Definition at line 179 of file train_gui.cpp.

Referenced by TrainDetailsCargoTab().

◆ capacity

uint CargoSummaryItem::capacity

Amount that can be carried.

Definition at line 178 of file train_gui.cpp.

Referenced by TrainDetailsCapacityTab().

◆ cargo

CargoID CargoSummaryItem::cargo

The cargo that is carried.

Definition at line 176 of file train_gui.cpp.

Referenced by GetCargoSummaryOfArticulatedVehicle(), operator!=(), operator==(), TrainDetailsCapacityTab(), and TrainDetailsCargoTab().

◆ source

StationID CargoSummaryItem::source

One of the source stations.

Definition at line 180 of file train_gui.cpp.

Referenced by TrainDetailsCargoTab().

◆ subtype

StringID CargoSummaryItem::subtype

STR_EMPTY if none.

Definition at line 177 of file train_gui.cpp.

Referenced by GetCargoSummaryOfArticulatedVehicle(), operator!=(), and TrainDetailsCapacityTab().


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