summaryrefslogtreecommitdiff
path: root/src/cargopacket.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cargopacket.h')
-rw-r--r--src/cargopacket.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/cargopacket.h b/src/cargopacket.h
index c23df8800..ab0d45f47 100644
--- a/src/cargopacket.h
+++ b/src/cargopacket.h
@@ -219,6 +219,12 @@ protected:
void RemoveFromCache(const CargoPacket *cp, uint count);
+ template<class Taction>
+ void ShiftCargo(Taction action);
+
+ template<class Taction>
+ void PopCargo(Taction action);
+
static bool TryMerge(CargoPacket *cp, CargoPacket *icp);
public:
@@ -303,6 +309,12 @@ public:
/** The vehicles have a cargo list (and we want that saved). */
friend const struct SaveLoad *GetVehicleDescription(VehicleType vt);
+ friend class CargoShift;
+ friend class CargoTransfer;
+ friend class CargoDelivery;
+ template<class Tsource>
+ friend class CargoRemoval;
+
/**
* Returns total sum of the feeder share for all packets.
* @return The before mentioned number.
@@ -343,6 +355,11 @@ public:
/** The stations, via GoodsEntry, have a CargoList. */
friend const struct SaveLoad *GetGoodsDesc();
+ friend class CargoLoad;
+ friend class CargoTransfer;
+ template<class Tsource>
+ friend class CargoRemoval;
+
/**
* Are two the two CargoPackets mergeable in the context of
* a list of CargoPackets for a Vehicle?