Public Member Functions | Protected Attributes

LinkGraph::NodeWrapper< Tnode, Tedge > Class Template Reference

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.

Protected Attributes

Tnode & node
 Node being wrapped.
Tedge * edges
 Outgoing edges for wrapped node.
NodeID index
 ID of wrapped node.

Detailed Description

template<typename Tnode, typename Tedge>
class LinkGraph::NodeWrapper< Tnode, Tedge >

Wrapper for a node (const or not) allowing retrieval, but no modification.

Template Parameters:
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 148 of file linkgraph.h.


Constructor & Destructor Documentation

template<typename Tnode, typename Tedge>
LinkGraph::NodeWrapper< Tnode, Tedge >::NodeWrapper ( Tnode &  node,
Tedge *  edges,
NodeID  index 
) [inline]

Wrap a node.

Parameters:
node Node to be wrapped.
edges Outgoing edges for node to be wrapped.
index ID of node to be wrapped.

Definition at line 162 of file linkgraph.h.


Member Function Documentation

template<typename Tnode, typename Tedge>
uint LinkGraph::NodeWrapper< Tnode, Tedge >::Demand (  )  const [inline]

Get demand of wrapped node.

Returns:
Demand.

Definition at line 175 of file linkgraph.h.

Referenced by AsymmetricScaler::AddNode(), AsymmetricScaler::EffectiveSupply(), AsymmetricScaler::HasDemandLeft(), and SymmetricScaler::HasDemandLeft().

template<typename Tnode, typename Tedge>
Date LinkGraph::NodeWrapper< Tnode, Tedge >::LastUpdate (  )  const [inline]

Get node's last update.

Returns:
Last update.

Definition at line 187 of file linkgraph.h.

template<typename Tnode, typename Tedge>
StationID LinkGraph::NodeWrapper< Tnode, Tedge >::Station (  )  const [inline]

Get ID of station belonging to wrapped node.

Returns:
ID of node's station.

Definition at line 181 of file linkgraph.h.

Referenced by FlowMapper::Run(), and LinkGraphJob::~LinkGraphJob().

template<typename Tnode, typename Tedge>
uint LinkGraph::NodeWrapper< Tnode, Tedge >::Supply (  )  const [inline]

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