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 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 4125 of file station_cmd.cpp.

void FlowStatMap::FinalizeLocalConsumption ( StationID  self  ) 

Subtract invalid flows from locally consumed flow.

Parameters:
self ID of own station.

Definition at line 4160 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 4143 of file station_cmd.cpp.

References FlowStat::AppendShare().


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