OpenTTD
|
Wrapper for a node (const or not) allowing retrieval, but no modification. More...
#include <linkgraph.h>
Public Member Functions | |
NodeWrapper (Tnode &node, Tedge *edges, NodeID index) | |
Wrap a node. | |
uint | Supply () const |
Get supply of wrapped node. | |
uint | Demand () const |
Get demand of wrapped node. | |
StationID | Station () const |
Get ID of station belonging to wrapped node. | |
Date | LastUpdate () const |
Get node's last update. | |
TileIndex | XY () const |
Get the location of the station associated with the node. |
Protected Attributes | |
Tnode & | node |
Node being wrapped. | |
Tedge * | edges |
Outgoing edges for wrapped node. | |
NodeID | index |
ID of wrapped node. |
Wrapper for a node (const or not) allowing retrieval, but no modification.
Tedge | Actual node class, may be "const BaseNode" or just "BaseNode". |
Tedge | Actual edge class, may be "const BaseEdge" or just "BaseEdge". |
Definition at line 126 of file linkgraph.h.
|
inline |
Wrap a node.
node | Node to be wrapped. |
edges | Outgoing edges for node to be wrapped. |
index | ID of node to be wrapped. |
Definition at line 140 of file linkgraph.h.
|
inline |
Get demand of wrapped node.
Definition at line 153 of file linkgraph.h.
Referenced by SymmetricScaler::HasDemandLeft(), and AsymmetricScaler::HasDemandLeft().
|
inline |
|
inline |
Get ID of station belonging to wrapped node.
Definition at line 159 of file linkgraph.h.
Referenced by FlowMapper::Run(), and LinkGraphJob::~LinkGraphJob().
|
inline |
Get supply of wrapped node.
Definition at line 147 of file linkgraph.h.
Referenced by SymmetricScaler::AddNode(), SymmetricScaler::EffectiveSupply(), AsymmetricScaler::EffectiveSupply(), SymmetricScaler::HasDemandLeft(), and LinkGraphOverlay::RebuildCache().
|
inline |
Get the location of the station associated with the node.
Definition at line 171 of file linkgraph.h.