Class for storing amounts of cargo. More...
#include <cargo_type.h>
Public Member Functions | |
FORCEINLINE | CargoArray () |
Default constructor. | |
FORCEINLINE void | Clear () |
Reset all entries. | |
FORCEINLINE uint & | operator[] (CargoID cargo) |
Read/write access to an amount of a specific cargo type. | |
FORCEINLINE const uint & | operator[] (CargoID cargo) const |
Read-only access to an amount of a specific cargo type. | |
Private Attributes | |
uint | amount [NUM_CARGO] |
Amount of each type of cargo. |
Class for storing amounts of cargo.
Definition at line 73 of file cargo_type.h.
FORCEINLINE CargoArray::CargoArray | ( | ) | [inline] |
FORCEINLINE void CargoArray::Clear | ( | ) | [inline] |
Reset all entries.
Definition at line 85 of file cargo_type.h.
References amount.
Referenced by CargoArray().
FORCEINLINE const uint& CargoArray::operator[] | ( | CargoID | cargo | ) | const [inline] |
Read-only access to an amount of a specific cargo type.
cargo | Cargo type to access. |
Definition at line 101 of file cargo_type.h.
References amount.
FORCEINLINE uint& CargoArray::operator[] | ( | CargoID | cargo | ) | [inline] |
Read/write access to an amount of a specific cargo type.
cargo | Cargo type to access. |
Definition at line 93 of file cargo_type.h.
References amount.