SUMO - Simulation of Urban MObility
NLEdgeControlBuilder.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 // Interface for building edges
20 /****************************************************************************/
21 #ifndef NLEdgeControlBuilder_h
22 #define NLEdgeControlBuilder_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 <string>
35 #include <vector>
36 #include <microsim/MSEdge.h>
38 
39 
40 // ===========================================================================
41 // class declarations
42 // ===========================================================================
43 class MSEdgeControl;
44 class MSLane;
45 class MSNet;
46 class OutputDevice;
47 
48 
49 // ===========================================================================
50 // class definitions
51 // ===========================================================================
64 
65 public:
68 
69 
71  virtual ~NLEdgeControlBuilder();
72 
73 
86  void beginEdgeParsing(const std::string& id, const SumoXMLEdgeFunc function,
87  const std::string& streetName, const std::string& edgeType, int priority);
88 
89 
103  virtual MSLane* addLane(const std::string& id, double maxSpeed,
104  double length, const PositionVector& shape,
105  double width, SVCPermissions permissions, int index, bool isRampAccel);
106 
107 
113  virtual void addNeigh(const std::string id);
114 
115 
118  virtual MSEdge* closeEdge();
119 
121  MSEdgeControl* build();
122 
123 
133  virtual MSEdge* buildEdge(const std::string& id, const SumoXMLEdgeFunc function,
134  const std::string& streetName, const std::string& edgeType, const int priority);
135 
140  virtual void addCrossingEdges(const std::vector<std::string>&);
141 
142 protected:
145 
148 
151 
154 
156  std::vector<MSLane*>* myLaneStorage;
157 
158 private:
161 
164 
165 };
166 
167 
168 #endif
169 
170 /****************************************************************************/
171 
virtual MSEdge * closeEdge()
Closes the building of an edge; The edge is completely described by now and may not be opened again...
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
MSEdgeVector myEdges
Temporary, internal storage for built edges.
virtual MSEdge * buildEdge(const std::string &id, const SumoXMLEdgeFunc function, const std::string &streetName, const std::string &edgeType, const int priority)
Builds an edge instance (MSEdge in this case)
MSEdge * myActiveEdge
pointer to the currently chosen edge
The simulated network and simulation perfomer.
Definition: MSNet.h:90
A road/street connecting two junctions.
Definition: MSEdge.h:80
NLEdgeControlBuilder & operator=(const NLEdgeControlBuilder &s)
invalidated assignment operator
MSEdgeControl * build()
builds the MSEdgeControl-class which holds all edges
A list of positions.
std::vector< MSLane * > * myLaneStorage
pointer to a temporary lane storage
NLEdgeControlBuilder()
Constructor.
Stores edges and lanes, performs moving of vehicle.
Definition: MSEdgeControl.h:73
virtual ~NLEdgeControlBuilder()
Destructor.
int myCurrentNumericalEdgeID
A running number for edge numbering.
virtual void addNeigh(const std::string id)
Adds a neighbor to the current lane.
virtual MSLane * addLane(const std::string &id, double maxSpeed, double length, const PositionVector &shape, double width, SVCPermissions permissions, int index, bool isRampAccel)
Adds a lane to the current edge.
SumoXMLEdgeFunc
Numbers representing special SUMO-XML-attribute values for representing edge functions used in netbui...
void beginEdgeParsing(const std::string &id, const SumoXMLEdgeFunc function, const std::string &streetName, const std::string &edgeType, int priority)
Begins building of an MSEdge.
int myCurrentNumericalLaneID
A running number for lane numbering.
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:70
virtual void addCrossingEdges(const std::vector< std::string > &)
add the crossingEdges in a crossing edge if present
std::vector< MSEdge * > MSEdgeVector
Definition: MSEdge.h:77
Representation of a lane in the micro simulation.
Definition: MSLane.h:77
Interface for building edges.