|
SUMO - Simulation of Urban MObility
|
A netgen-representation of an edge. More...
#include <NGEdge.h>
Public Member Functions | |
| NBEdge * | buildNBEdge (NBNetBuilder &nb) const throw (ProcessError) |
| Builds and returns this link's netbuild-representation. | |
| NGNode * | getEndNode () throw () |
| Returns this link's end node. | |
| const std::string & | getID () const throw () |
| Returns this link's id. | |
| NGNode * | getStartNode () throw () |
| Returns this link's start node. | |
| NGEdge (const std::string &id, NGNode *startNode, NGNode *endNode) throw () | |
| Constructor. | |
| ~NGEdge () throw () | |
| Destructor. | |
Private Attributes | |
| NGNode * | myEndNode |
| The node the edge ends at. | |
| std::string | myID |
| The id of the edge. | |
| NGNode * | myStartNode |
| The node the edge starts at. | |
A netgen-representation of an edge.
Please note that the edge makes itself known to the from- and the to-nodes on initialisation and removes this information from the nodes when being deleted. This implicates that nodes have to be deleted after the edges.
Constructor.
Adds itself to the start and the end node's lists of connections.
| [in] | id | The id of the link |
| [in] | StarNGNode | The begin node |
| [in] | EndNode | The end node |
Definition at line 57 of file NGEdge.cpp.
| NGEdge::~NGEdge | ( | ) | throw () |
Destructor.
Removes itself from the start and the end node's lists of connections.
Definition at line 64 of file NGEdge.cpp.
References myEndNode, myStartNode, and NGNode::removeLink().
| NBEdge * NGEdge::buildNBEdge | ( | NBNetBuilder & | nb | ) | const throw (ProcessError) |
Builds and returns this link's netbuild-representation.
Returns an edge built using the known values. Other values, such as the number of lanes, are gathered from defaults. The starting and the ending node must have been built in prior.
| [in] | nb | The netbuilder to retrieve the referenced nodes from |
Definition at line 71 of file NGEdge.cpp.
| NGNode* NGEdge::getEndNode | ( | ) | throw () [inline] |
| const std::string& NGEdge::getID | ( | ) | const throw () [inline] |
| NGNode* NGEdge::getStartNode | ( | ) | throw () [inline] |
Returns this link's start node.
Definition at line 91 of file NGEdge.h.
References myStartNode.
NGNode* NGEdge::myEndNode [private] |
The node the edge ends at.
Definition at line 125 of file NGEdge.h.
Referenced by getEndNode(), and ~NGEdge().
std::string NGEdge::myID [private] |
NGNode* NGEdge::myStartNode [private] |
The node the edge starts at.
Definition at line 122 of file NGEdge.h.
Referenced by getStartNode(), and ~NGEdge().