Eclipse 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-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
17 // A netgen-representation of an edge
18 /****************************************************************************/
19 #ifndef NGNetElements_h
20 #define NGNetElements_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 #include <list>
29 #include <utils/common/Named.h>
31 #include <utils/geom/Position.h>
32 #include <utils/geom/GeomHelper.h>
33 
34 
35 // ===========================================================================
36 // class declarations
37 // ===========================================================================
38 class NGNode;
39 class NBNode;
40 class NBEdge;
41 class NBNetBuilder;
42 
43 
44 // ===========================================================================
45 // class definitions
46 // ===========================================================================
55 class NGEdge : public Named {
56 public:
65  NGEdge(const std::string& id, NGNode* startNode, NGNode* endNode);
66 
67 
72  ~NGEdge();
73 
74 
80  return myStartNode;
81  };
82 
83 
89  return myEndNode;
90  };
91 
92 
102  NBEdge* buildNBEdge(NBNetBuilder& nb) const;
103 
104 
105 private:
108 
111 
112 };
113 
114 
119 typedef std::list<NGEdge*> NGEdgeList;
120 
121 #endif
122 
123 /****************************************************************************/
124 
NGNode * getStartNode()
Returns this link&#39;s start node.
Definition: NGEdge.h:79
~NGEdge()
Destructor.
Definition: NGEdge.cpp:58
A netgen-representation of an edge.
Definition: NGEdge.h:55
NBEdge * buildNBEdge(NBNetBuilder &nb) const
Builds and returns this link&#39;s netbuild-representation.
Definition: NGEdge.cpp:65
The representation of a single edge during network building.
Definition: NBEdge.h:86
NGEdge(const std::string &id, NGNode *startNode, NGNode *endNode)
Constructor.
Definition: NGEdge.cpp:51
std::list< NGEdge * > NGEdgeList
A list of edges (edge pointers)
Definition: NGEdge.h:119
NGNode * getEndNode()
Returns this link&#39;s end node.
Definition: NGEdge.h:88
Base class for objects which have an id.
Definition: Named.h:57
NGNode * myEndNode
The node the edge ends at.
Definition: NGEdge.h:110
Instance responsible for building networks.
Definition: NBNetBuilder.h:110
Represents a single node (junction) during network building.
Definition: NBNode.h:68
A netgen-representation of a node.
Definition: NGNode.h:51
NGNode * myStartNode
The node the edge starts at.
Definition: NGEdge.h:107