SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
NGEdge.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // A netgen-representation of an edge
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
12 // Copyright (C) 2001-2016 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
21 /****************************************************************************/
22 #ifndef NGNetElements_h
23 #define NGNetElements_h
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
35 #include <list>
36 #include <utils/common/Named.h>
38 #include <utils/geom/Position.h>
39 #include <utils/geom/GeomHelper.h>
40 
41 
42 // ===========================================================================
43 // class declarations
44 // ===========================================================================
45 class NGNode;
46 class NBNode;
47 class NBEdge;
48 class NBNetBuilder;
49 
50 
51 // ===========================================================================
52 // class definitions
53 // ===========================================================================
62 class NGEdge : public Named {
63 public:
72  NGEdge(const std::string& id, NGNode* startNode, NGNode* endNode);
73 
74 
79  ~NGEdge();
80 
81 
87  return myStartNode;
88  };
89 
90 
96  return myEndNode;
97  };
98 
99 
109  NBEdge* buildNBEdge(NBNetBuilder& nb) const;
110 
111 
112 private:
115 
118 
119 };
120 
121 
126 typedef std::list<NGEdge*> NGEdgeList;
127 
128 #endif
129 
130 /****************************************************************************/
131 
NGNode * getStartNode()
Returns this link's start node.
Definition: NGEdge.h:86
~NGEdge()
Destructor.
Definition: NGEdge.cpp:68
A netgen-representation of an edge.
Definition: NGEdge.h:62
The representation of a single edge during network building.
Definition: NBEdge.h:71
NGEdge(const std::string &id, NGNode *startNode, NGNode *endNode)
Constructor.
Definition: NGEdge.cpp:61
std::list< NGEdge * > NGEdgeList
A list of edges (edge pointers)
Definition: NGEdge.h:126
NGNode * getEndNode()
Returns this link's end node.
Definition: NGEdge.h:95
Base class for objects which have an id.
Definition: Named.h:46
NBEdge * buildNBEdge(NBNetBuilder &nb) const
Builds and returns this link's netbuild-representation.
Definition: NGEdge.cpp:75
NGNode * myEndNode
The node the edge ends at.
Definition: NGEdge.h:117
Instance responsible for building networks.
Definition: NBNetBuilder.h:112
Represents a single node (junction) during network building.
Definition: NBNode.h:74
A netgen-representation of a node.
Definition: NGNode.h:58
NGNode * myStartNode
The node the edge starts at.
Definition: NGEdge.h:114