OpenTTD Source  20241121-master-g67a0fccfad
LinkGraphJob::EdgeAnnotation Struct Reference

Annotation for a link graph edge. More...

#include <linkgraphjob.h>

Public Member Functions

 EdgeAnnotation (const LinkGraph::BaseEdge &base)
 
uint Flow () const
 Get the total flow on the edge. More...
 
void AddFlow (uint flow)
 Add some flow. More...
 
void RemoveFlow (uint flow)
 Remove some flow. More...
 

Data Fields

const LinkGraph::BaseEdgebase
 Reference to the edge that is annotated.
 
uint flow
 Planned flow over this edge.
 

Friends

bool operator< (NodeID dest, const EdgeAnnotation &rhs)
 

Detailed Description

Annotation for a link graph edge.

Definition at line 42 of file linkgraphjob.h.

Member Function Documentation

◆ AddFlow()

void LinkGraphJob::EdgeAnnotation::AddFlow ( uint  flow)
inline

Add some flow.

Parameters
flowFlow to be added.

Definition at line 59 of file linkgraphjob.h.

References flow.

Referenced by Path::AddFlow().

◆ Flow()

uint LinkGraphJob::EdgeAnnotation::Flow ( ) const
inline

Get the total flow on the edge.

Returns
Flow.

Definition at line 53 of file linkgraphjob.h.

References flow.

Referenced by Path::AddFlow().

◆ RemoveFlow()

void LinkGraphJob::EdgeAnnotation::RemoveFlow ( uint  flow)
inline

Remove some flow.

Parameters
flowFlow to be removed.

Definition at line 65 of file linkgraphjob.h.

References flow.


The documentation for this struct was generated from the following file: