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. | |
void | Cleanup (StationID self, LinkGraphID link_graph) |
Flow descriptions by origin stations.
Definition at line 88 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 4149 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().
Referenced by DeleteStaleLinks(), and Station::~Station().
void FlowStatMap::FinalizeLocalConsumption | ( | StationID | self | ) |
Subtract invalid flows from locally consumed flow.
self | ID of own station. |
Definition at line 4186 of file station_cmd.cpp.
References FlowStat::ChangeShare(), and FlowStat::GetShare().
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 4168 of file station_cmd.cpp.
References FlowStat::AppendShare().