Flow descriptions by origin stations. More...
#include <station_base.h>
Public Member Functions | |
void | AddFlow (StationID origin, StationID via, uint amount) |
Add some flow from "origin", going via "via". | |
void | PassOnFlow (StationID origin, StationID via, uint amount) |
Pass on some flow, remembering it as invalid, for later subtraction from locally consumed flow. | |
void | DeleteFlows (StationID via) |
Delete all flows at a station for specific cargo and destination. | |
void | FinalizeLocalConsumption (StationID self) |
Subtract invalid flows from locally consumed flow. |
Flow descriptions by origin stations.
Definition at line 102 of file station_base.h.
void FlowStatMap::AddFlow | ( | StationID | origin, | |
StationID | via, | |||
uint | flow | |||
) |
Add some flow from "origin", going via "via".
origin | Origin of the flow. | |
via | Next hop. | |
flow | Amount of flow to be added. |
Definition at line 4166 of file station_cmd.cpp.
void FlowStatMap::DeleteFlows | ( | StationID | via | ) |
Delete all flows at a station for specific cargo and destination.
via | Remote station of flows to be deleted. |
Definition at line 4221 of file station_cmd.cpp.
References FlowStat::ChangeShare(), and FlowStat::GetShares().
Referenced by DeleteStaleLinks(), LinkGraphJob::~LinkGraphJob(), and Station::~Station().
void FlowStatMap::FinalizeLocalConsumption | ( | StationID | self | ) |
Subtract invalid flows from locally consumed flow.
self | ID of own station. |
Definition at line 4203 of file station_cmd.cpp.
References FlowStat::ChangeShare(), FlowStat::GetShare(), and FlowStat::GetShares().
void FlowStatMap::PassOnFlow | ( | StationID | origin, | |
StationID | via, | |||
uint | flow | |||
) |
Pass on some flow, remembering it as invalid, for later subtraction from locally consumed flow.
This is necessary because we can't have negative flows and we don't want to sort the flows before adding them up.
origin | Origin of the flow. | |
via | Next hop. | |
flow | Amount of flow to be passed. |
Definition at line 4185 of file station_cmd.cpp.
References FlowStat::AppendShare().