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 /****************************************************************************/
16 // A netgen-representation of an edge
17 /****************************************************************************/
18 #ifndef NGNetElements_h
19 #define NGNetElements_h
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include <list>
28 #include <utils/common/Named.h>
30 #include <utils/geom/Position.h>
31 #include <utils/geom/GeomHelper.h>
32 
33 
34 // ===========================================================================
35 // class declarations
36 // ===========================================================================
37 class NGNode;
38 class NBNode;
39 class NBEdge;
40 class NBNetBuilder;
41 
42 
43 // ===========================================================================
44 // class definitions
45 // ===========================================================================
54 class NGEdge : public Named {
55 public:
64  NGEdge(const std::string& id, NGNode* startNode, NGNode* endNode);
65 
66 
71  ~NGEdge();
72 
73 
79  return myStartNode;
80  };
81 
82 
88  return myEndNode;
89  };
90 
91 
101  NBEdge* buildNBEdge(NBNetBuilder& nb, const std::string& type) const;
102 
103 
104 private:
107 
110 
111 };
112 
113 
118 typedef std::list<NGEdge*> NGEdgeList;
119 
120 #endif
121 
122 /****************************************************************************/
123 
NGEdge::getEndNode
NGNode * getEndNode()
Returns this link's end node.
Definition: NGEdge.h:87
Named
Base class for objects which have an id.
Definition: Named.h:56
NBNetBuilder
Instance responsible for building networks.
Definition: NBNetBuilder.h:109
NGEdge
A netgen-representation of an edge.
Definition: NGEdge.h:54
NGEdge::myStartNode
NGNode * myStartNode
The node the edge starts at.
Definition: NGEdge.h:106
NBEdge
The representation of a single edge during network building.
Definition: NBEdge.h:91
NGEdge::getStartNode
NGNode * getStartNode()
Returns this link's start node.
Definition: NGEdge.h:78
NGEdge::myEndNode
NGNode * myEndNode
The node the edge ends at.
Definition: NGEdge.h:109
NGEdge::buildNBEdge
NBEdge * buildNBEdge(NBNetBuilder &nb, const std::string &type) const
Builds and returns this link's netbuild-representation.
Definition: NGEdge.cpp:64
Named.h
UtilExceptions.h
NGEdge::NGEdge
NGEdge(const std::string &id, NGNode *startNode, NGNode *endNode)
Constructor.
Definition: NGEdge.cpp:50
Position.h
NGEdgeList
std::list< NGEdge * > NGEdgeList
A list of edges (edge pointers)
Definition: NGEdge.h:118
config.h
GeomHelper.h
NBNode
Represents a single node (junction) during network building.
Definition: NBNode.h:67
NGNode
A netgen-representation of a node.
Definition: NGNode.h:50
NGEdge::~NGEdge
~NGEdge()
Destructor.
Definition: NGEdge.cpp:57