Public Member Functions | Protected Attributes

# CargoLoad Class Reference

Action of loading cargo from a station onto a vehicle. More...

`#include <cargoaction.h>`

Inheritance diagram for CargoLoad:

## Public Member Functions
| CargoLoad (StationCargoList *source, VehicleCargoList *destination, uint max_move, TileIndex load_place)
bool | operator() (CargoPacket *cp)
| Loads some cargo onto a vehicle.
## Protected Attributes
TileIndex | load_place
| TileIndex to be saved in the packets' loaded_at_xy.

## Detailed Description

Action of loading cargo from a station onto a vehicle.

Definition at line 81 of file cargoaction.h.

## Member Function Documentation

bool CargoLoad::operator() | ( | CargoPacket * | cp | ) |

Loads some cargo onto a vehicle.

Parameters:

  | cp | Packet to be loaded.

Returns:
  True if the packet was completely loaded, false if part of it was.

Reimplemented in CargoReservation.

Definition at line 119 of file cargoaction.cpp.

References VehicleCargoList::Append(), CargoPacket::Count(), CargoMovement< StationCargoList, VehicleCargoList >::destination, load_place, CargoList< VehicleCargoList, CargoPacketList >::MTA_KEEP, CargoMovement< StationCargoList, VehicleCargoList >::Preprocess(), CargoList< Tinst, Tcont >::RemoveFromCache(), CargoPacket::SetLoadPlace(), and CargoMovement< StationCargoList, VehicleCargoList >::source.

The documentation for this class was generated from the following files:

- src/cargoaction.h
- src/cargoaction.cpp