Action of rerouting cargo between different station cargo lists and/or next hops. More...
#include <cargoaction.h>
Public Member Functions | |
CargoReroute (StationCargoList *source, StationCargoList *dest, uint max_move, StationID avoid, const GoodsEntry *ge) | |
bool | operator() (CargoPacket *cp) |
Reroutes some cargo from one Station sublist to another. | |
Protected Attributes | |
StationID | avoid |
const GoodsEntry * | ge |
Action of rerouting cargo between different station cargo lists and/or next hops.
Definition at line 119 of file cargoaction.h.
bool CargoReroute::operator() | ( | CargoPacket * | cp | ) |
Reroutes some cargo from one Station sublist to another.
cp | Packet to be rerouted. |
Definition at line 194 of file cargoaction.cpp.
References CargoList< Tinst, Tcont >::AddToCache(), CargoPacket::Count(), CargoMovement< StationCargoList, StationCargoList >::destination, GoodsEntry::GetVia(), MultiMap< Tkey, Tvalue, Tcompare >::Insert(), CargoList< Tinst, Tcont >::packets, CargoMovement< StationCargoList, StationCargoList >::Preprocess(), CargoList< Tinst, Tcont >::RemoveFromCache(), CargoMovement< StationCargoList, StationCargoList >::source, and CargoPacket::SourceStation().