SUMO - Simulation of Urban MObility
NGEdge.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
19 // A netgen-representation of an edge
20 /****************************************************************************/
21 #ifndef NGNetElements_h
22 #define NGNetElements_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <list>
35 #include <utils/common/Named.h>
37 #include <utils/geom/Position.h>
38 #include <utils/geom/GeomHelper.h>
39 
40 
41 // ===========================================================================
42 // class declarations
43 // ===========================================================================
44 class NGNode;
45 class NBNode;
46 class NBEdge;
47 class NBNetBuilder;
48 
49 
50 // ===========================================================================
51 // class definitions
52 // ===========================================================================
61 class NGEdge : public Named {
62 public:
71  NGEdge(const std::string& id, NGNode* startNode, NGNode* endNode);
72 
73 
78  ~NGEdge();
79 
80 
86  return myStartNode;
87  };
88 
89 
95  return myEndNode;
96  };
97 
98 
108  NBEdge* buildNBEdge(NBNetBuilder& nb) const;
109 
110 
111 private:
114 
117 
118 };
119 
120 
125 typedef std::list<NGEdge*> NGEdgeList;
126 
127 #endif
128 
129 /****************************************************************************/
130 
NGNode * getStartNode()
Returns this link&#39;s start node.
Definition: NGEdge.h:85
~NGEdge()
Destructor.
Definition: NGEdge.cpp:63
A netgen-representation of an edge.
Definition: NGEdge.h:61
NBEdge * buildNBEdge(NBNetBuilder &nb) const
Builds and returns this link&#39;s netbuild-representation.
Definition: NGEdge.cpp:70
The representation of a single edge during network building.
Definition: NBEdge.h:70
NGEdge(const std::string &id, NGNode *startNode, NGNode *endNode)
Constructor.
Definition: NGEdge.cpp:56
std::list< NGEdge * > NGEdgeList
A list of edges (edge pointers)
Definition: NGEdge.h:125
NGNode * getEndNode()
Returns this link&#39;s end node.
Definition: NGEdge.h:94
Base class for objects which have an id.
Definition: Named.h:45
NGNode * myEndNode
The node the edge ends at.
Definition: NGEdge.h:116
Instance responsible for building networks.
Definition: NBNetBuilder.h:115
Represents a single node (junction) during network building.
Definition: NBNode.h:74
A netgen-representation of a node.
Definition: NGNode.h:57
NGNode * myStartNode
The node the edge starts at.
Definition: NGEdge.h:113