OpenTTD
|
Constant node class. More...
#include <linkgraph.h>
Public Member Functions | |
ConstNode (const LinkGraph *lg, NodeID node) | |
Constructor. | |
ConstEdge | operator[] (NodeID to) const |
Get a ConstEdge. | |
ConstEdgeIterator | Begin () const |
Get an iterator pointing to the start of the edges array. | |
ConstEdgeIterator | End () const |
Get an iterator pointing beyond the end of the edges array. | |
![]() | |
NodeWrapper (const BaseNode &node, const BaseEdge *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. |
Additional Inherited Members | |
![]() | |
const BaseNode & | node |
Node being wrapped. | |
const BaseEdge * | edges |
Outgoing edges for wrapped node. | |
NodeID | index |
ID of wrapped node. |
Constant node class.
Only retrieval operations are allowed on both the node itself and its edges.
Definition at line 339 of file linkgraph.h.
|
inline |
Constructor.
lg | LinkGraph to get the node from. |
node | ID of the node. |
Definition at line 346 of file linkgraph.h.
|
inline |
Get an iterator pointing to the start of the edges array.
Reimplemented in LinkGraphJob::Node.
Definition at line 362 of file linkgraph.h.
References LinkGraph::NodeWrapper< const BaseNode, const BaseEdge >::edges, and LinkGraph::NodeWrapper< const BaseNode, const BaseEdge >::index.
Referenced by LinkGraphOverlay::RebuildCache().
|
inline |
Get an iterator pointing beyond the end of the edges array.
Reimplemented in LinkGraphJob::Node.
Definition at line 368 of file linkgraph.h.
References LinkGraph::NodeWrapper< const BaseNode, const BaseEdge >::edges.
Referenced by LinkGraphOverlay::RebuildCache().
|
inline |
Get a ConstEdge.
This is not a reference as the wrapper objects are not actually persistent.
to | ID of end node of edge. |
Reimplemented in LinkGraphJob::Node.
Definition at line 356 of file linkgraph.h.
References LinkGraph::NodeWrapper< const BaseNode, const BaseEdge >::edges.