Public Member Functions | Protected Attributes

# CargoReroute Class Reference

Action of rerouting cargo between different station cargo lists and/or next hops. More...

`#include <cargoaction.h>`

Inheritance diagram for CargoReroute:

## Public Member Functions
| CargoReroute (StationCargoList *source, StationCargoList *dest, uint max_move, StationID avoid, StationID avoid2, const GoodsEntry *ge)
bool | operator() (CargoPacket *cp)
| Reroutes some cargo from one Station sublist to another.
## Protected Attributes
StationID | avoid
StationID | avoid2
const GoodsEntry * | ge

## Detailed Description

Action of rerouting cargo between different station cargo lists and/or next hops.

Definition at line 118 of file cargoaction.h.

## Member Function Documentation

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

Reroutes some cargo from one Station sublist to another.

Parameters:

  | cp | Packet to be rerouted.

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

Definition at line 195 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().

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

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