diff options
author | fonsinchen <fonsinchen@openttd.org> | 2014-09-21 16:19:52 +0000 |
---|---|---|
committer | fonsinchen <fonsinchen@openttd.org> | 2014-09-21 16:19:52 +0000 |
commit | 9fdb88962fed69472a88861cf08d9559e8dff2a4 (patch) | |
tree | a0337c7ce519fb69e5458bc48c48f5fdc01396fa /src/station_base.h | |
parent | f56b8ba69eb967a1b9c8f8ab89dd70eeb00a0f72 (diff) | |
download | openttd-9fdb88962fed69472a88861cf08d9559e8dff2a4.tar.xz |
(svn r26891) -Codechange: Add methods to retrieve flows from a FlowStatMap
Diffstat (limited to 'src/station_base.h')
-rw-r--r-- | src/station_base.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/station_base.h b/src/station_base.h index 6d6522840..b832a3c19 100644 --- a/src/station_base.h +++ b/src/station_base.h @@ -149,6 +149,11 @@ private: /** Flow descriptions by origin stations. */ class FlowStatMap : public std::map<StationID, FlowStat> { public: + uint GetFlow() const; + uint GetFlowVia(StationID via) const; + uint GetFlowFrom(StationID from) const; + uint GetFlowFromVia(StationID from, StationID via) const; + void AddFlow(StationID origin, StationID via, uint amount); void PassOnFlow(StationID origin, StationID via, uint amount); StationIDStack DeleteFlows(StationID via); @@ -268,8 +273,6 @@ struct GoodsEntry { return HasBit(this->status, GES_RATING); } - uint GetSumFlowVia(StationID via) const; - /** * Get the best next hop for a cargo packet from station source. * @param source Source of the packet. |