SUMO - Simulation of Urban MObility
GNECrossing.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // A class for visualizing Inner Lanes (used when editing traffic lights)
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
10 // Copyright (C) 2001-2015 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software: you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation, either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 #ifndef GNECrossing_h
21 #define GNECrossing_h
22 
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <string>
36 #include <netbuild/NBNode.h>
37 #include "GNEAttributeCarrier.h"
38 
39 // ===========================================================================
40 // class declarations
41 // ===========================================================================
43 class PositionVector;
44 class GNEJunction;
45 
46 // ===========================================================================
47 // class definitions
48 // ===========================================================================
56 
57 public:
58 
65  GNECrossing(GNEJunction& parentJunction, const std::string& id);
66 
68  virtual ~GNECrossing() ;
69 
71 
72 
81  GUISUMOAbstractView& parent) ;
82 
91  GUISUMOAbstractView& parent) ;
92 
99 
104  void drawGL(const GUIVisualizationSettings& s) const ;
106 
107  //@name inherited from GNEAttributeCarrier
109  std::string getAttribute(SumoXMLAttr key) const;
110 
111  /* @brief method for setting the attribute and letting the object perform additional changes
112  * @param[in] key The attribute key
113  * @param[in] value The new value
114  * @param[in] undoList The undoList on which to register changes
115  */
116  void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
117 
118  bool isValid(SumoXMLAttr key, const std::string& value);
120 
121 
122 private:
125 
128 
131 
133 
134  std::vector<SUMOReal> myShapeRotations;
136 
138  std::vector<SUMOReal> myShapeLengths;
140 
143 
144  /* @brief method for setting the attribute and nothing else
145  * (used in GNEChange_Attribute)
146  * */
147  void setAttribute(SumoXMLAttr key, const std::string& value);
148 
149 private:
150 
152  GNECrossing(const GNECrossing&);
153 
156 
157 };
158 
159 
160 #endif
161 
162 /****************************************************************************/
163 
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
GNECrossing(GNEJunction &parentJunction, const std::string &id)
Constructor.
Definition: GNECrossing.cpp:66
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition: GNECrossing.cpp:90
std::vector< SUMOReal > myShapeLengths
The lengths of the shape parts.
Definition: GNECrossing.h:138
Stores the information about how to visualize structures.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::string getAttribute(SumoXMLAttr key) const
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:48
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
Definition: GNECrossing.h:55
A list of positions.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
GNECrossing & operator=(const GNECrossing &)
Invalidated assignment operator.
GNEJunction & myParentJunction
the parent junction of this crossing
Definition: GNECrossing.h:124
GUIGLObjectPopupMenu * myPopup
the created popup
Definition: GNECrossing.h:142
NBNode::Crossing myCrossing
the data for this crossing
Definition: GNECrossing.h:127
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
The popup menu of a globject.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
virtual ~GNECrossing()
Destructor.
Definition: GNECrossing.cpp:86
A definition of a pedestrian crossing.
Definition: NBNode.h:132
bool isValid(SumoXMLAttr key, const std::string &value)
const PositionVector myShape
the shape of the edge
Definition: GNECrossing.h:130
A window containing a gl-object&#39;s parameter.
std::vector< SUMOReal > myShapeRotations
The rotations of the shape parts.
Definition: GNECrossing.h:135