Public Member Functions

# FlowStatMap Class Reference

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.

## Detailed Description

Flow descriptions by origin stations.

Definition at line 87 of file station_base.h.

## Member Function Documentation

void FlowStatMap::AddFlow | ( | StationID | origin,
|  | StationID | via,
|  | uint | flow |
| ) |  |  |

Add some flow from "origin", going via "via".

Parameters:

  | origin | Origin of the flow.
  | via | Next hop.
  | flow | Amount of flow to be added.

Definition at line 4117 of file station_cmd.cpp.

void FlowStatMap::DeleteFlows | ( | StationID | via | ) |

Delete all flows at a station for specific cargo and destination.

Parameters:

  | via | Remote station of flows to be deleted.

Definition at line 4172 of file station_cmd.cpp.

References FlowStat::ChangeShare().

Referenced by Station::~Station().

void FlowStatMap::FinalizeLocalConsumption | ( | StationID | self | ) |

Subtract invalid flows from locally consumed flow.

Parameters:

  | self | ID of own station.

Definition at line 4154 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.

Parameters:

  | origin | Origin of the flow.
  | via | Next hop.
  | flow | Amount of flow to be passed.

Definition at line 4136 of file station_cmd.cpp.

References FlowStat::AppendShare().

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

- src/station_base.h
- src/station_cmd.cpp