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.
StationIDStack DeleteFlows (StationID via)
 Delete all flows at a station for specific cargo and destination.
void RestrictFlows (StationID via)
 Restrict all flows at a station for specific cargo and destination.
void ReleaseFlows (StationID via)
 Release 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 149 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 4322 of file station_cmd.cpp.

StationIDStack FlowStatMap::DeleteFlows ( StationID  via  ) 

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

Parameters:
via Remote station of flows to be deleted.
Returns:
IDs of source stations for which the complete FlowStat, not only a share, has been erased.

Definition at line 4384 of file station_cmd.cpp.

References FlowStat::ChangeShare(), FlowStat::GetShares(), and SmallStack< Titem, Tindex, Tinvalid, Tgrowth_step, Tmax_size >::Push().

Referenced by DeleteStaleLinks(), LinkGraphJob::~LinkGraphJob(), and Station::~Station().

void FlowStatMap::FinalizeLocalConsumption ( StationID  self  ) 

Subtract invalid flows from locally consumed flow.

Parameters:
self ID of own station.

Definition at line 4359 of file station_cmd.cpp.

References FlowStat::ChangeShare(), FlowStat::GetShare(), and FlowStat::GetShares().

Referenced by FlowMapper::Run().

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

References FlowStat::AppendShare().

void FlowStatMap::ReleaseFlows ( StationID  via  ) 

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

Parameters:
via Remote station of flows to be released.

Definition at line 4415 of file station_cmd.cpp.

void FlowStatMap::RestrictFlows ( StationID  via  ) 

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

Parameters:
via Remote station of flows to be restricted.

Definition at line 4404 of file station_cmd.cpp.

Referenced by DeleteStaleLinks(), and LinkGraphJob::~LinkGraphJob().


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