OpenTTD Source  1.11.2
LinkGraph::EdgeWrapper< Tedge > Class Template Reference

Wrapper for an edge (const or not) allowing retrieval, but no modification. More...

#include <linkgraph.h>

Inheritance diagram for LinkGraph::EdgeWrapper< Tedge >:
LinkGraphJob::Edge

Public Member Functions

 EdgeWrapper (Tedge &edge)
 Wrap a an edge. More...
 
uint Capacity () const
 Get edge's capacity. More...
 
uint Usage () const
 Get edge's usage. More...
 
Date LastUnrestrictedUpdate () const
 Get the date of the last update to the edge's unrestricted capacity. More...
 
Date LastRestrictedUpdate () const
 Get the date of the last update to the edge's restricted capacity. More...
 
Date LastUpdate () const
 Get the date of the last update to any part of the edge's capacity. More...
 

Protected Attributes

Tedge & edge
 Actual edge to be used.
 

Detailed Description

template<typename Tedge>
class LinkGraph::EdgeWrapper< Tedge >

Wrapper for an edge (const or not) allowing retrieval, but no modification.

Template Parameters
TedgeActual edge class, may be "const BaseEdge" or just "BaseEdge".

Definition at line 76 of file linkgraph.h.

Constructor & Destructor Documentation

◆ EdgeWrapper()

template<typename Tedge >
LinkGraph::EdgeWrapper< Tedge >::EdgeWrapper ( Tedge &  edge)
inline

Wrap a an edge.

Parameters
edgeEdge to be wrapped.

Definition at line 86 of file linkgraph.h.

Member Function Documentation

◆ Capacity()

template<typename Tedge >
uint LinkGraph::EdgeWrapper< Tedge >::Capacity ( ) const
inline

Get edge's capacity.

Returns
Capacity.

Definition at line 92 of file linkgraph.h.

Referenced by Path::AddFlow().

◆ LastRestrictedUpdate()

template<typename Tedge >
Date LinkGraph::EdgeWrapper< Tedge >::LastRestrictedUpdate ( ) const
inline

Get the date of the last update to the edge's restricted capacity.

Returns
Last update.

Definition at line 110 of file linkgraph.h.

◆ LastUnrestrictedUpdate()

template<typename Tedge >
Date LinkGraph::EdgeWrapper< Tedge >::LastUnrestrictedUpdate ( ) const
inline

Get the date of the last update to the edge's unrestricted capacity.

Returns
Last update.

Definition at line 104 of file linkgraph.h.

◆ LastUpdate()

template<typename Tedge >
Date LinkGraph::EdgeWrapper< Tedge >::LastUpdate ( ) const
inline

Get the date of the last update to any part of the edge's capacity.

Returns
Last update.

Definition at line 116 of file linkgraph.h.

Referenced by DeleteStaleLinks().

◆ Usage()

template<typename Tedge >
uint LinkGraph::EdgeWrapper< Tedge >::Usage ( ) const
inline

Get edge's usage.

Returns
Usage.

Definition at line 98 of file linkgraph.h.


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