SUMO - Simulation of Urban MObility
GNEPOI.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // A class for visualizing and editing POIS in netedit (adapted from
8 // GUIPointOfInterest and NLHandler)
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
11 // Copyright (C) 2001-2017 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 #ifndef GNEPOI_h
22 #define GNEPOI_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 "GNEShape.h"
35 
36 // ===========================================================================
37 // class declarations
38 // ===========================================================================
39 class GeoConvHelper;
40 class GNELane;
41 
42 // ===========================================================================
43 // class definitions
44 // ===========================================================================
52 class GNEPOI : public GUIPointOfInterest, public GNEShape {
53 
54 public:
56  using GNEShape::getID;
57 
71  GNEPOI(GNENet* net, const std::string& id, const std::string& type, const RGBColor& color, double layer, double angle,
72  const std::string& imgFile, const Position& pos, double width, double height, bool movementBlocked);
73 
75  ~GNEPOI();
76 
81  void moveGeometry(const Position& newPosition);
82 
87  void commitGeometryMoving(const Position& oldPos, GNEUndoList* undoList);
88 
91 
94  void writeShape(OutputDevice& device);
95 
99 
102 
105  const std::string& getParentName() const;
106 
115 
124 
127 
132  void drawGL(const GUIVisualizationSettings& s) const;
134 
137 
141  std::string getAttribute(SumoXMLAttr key) const;
142 
148  void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
149 
155  bool isValid(SumoXMLAttr key, const std::string& value);
157 
158 protected:
159 
162 
165 
166 private:
168  void setAttribute(SumoXMLAttr key, const std::string& value);
169 
171  GNEPOI(const GNEPOI&) = delete;
172 
174  GNEPOI& operator=(const GNEPOI&) = delete;
175 };
176 
177 
178 #endif
179 
180 /****************************************************************************/
181 
Definition: GNEPOI.h:52
Stores the information about how to visualize structures.
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
Definition: GNEPOI.cpp:182
GNEPOI & operator=(const GNEPOI &)=delete
Invalidated assignment operator.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
Definition: GNEPOI.cpp:117
~GNEPOI()
Destructor.
Definition: GNEPOI.cpp:75
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:92
GNEPOI(GNENet *net, const std::string &id, const std::string &type, const RGBColor &color, double layer, double angle, const std::string &imgFile, const Position &pos, double width, double height, bool movementBlocked)
Constructor.
Definition: GNEPOI.cpp:65
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:54
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition: GNEPOI.cpp:135
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::string getAttribute(SumoXMLAttr key) const
method for getting the Attribute of an XML key
Definition: GNEPOI.cpp:143
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:48
void moveGeometry(const Position &newPosition)
change the position of the element geometry without saving in undoList
Definition: GNEPOI.cpp:84
void commitGeometryMoving(const Position &oldPos, GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
Definition: GNEPOI.cpp:93
static methods for processing the coordinates conversion for the current net
Definition: GeoConvHelper.h:60
double myPositionOverLane
position over lane
Definition: GNEPOI.h:164
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their correspond attribute are valids
Definition: GNEPOI.cpp:207
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
GNELane * myLane
lane in which this POI can be placed
Definition: GNEPOI.h:161
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
Definition: GNEPOI.cpp:129
const std::string & getParentName() const
Returns the name of the parent object.
Definition: GNEPOI.cpp:111
const std::string getID() const
function to support debugging
Position getPositionInView() const
Returns position of additional in view.
Definition: GNEPOI.cpp:105
The popup menu of a globject.
void writeShape(OutputDevice &device)
writte shape element into a xml file
Definition: GNEPOI.cpp:78
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:71
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
Definition: GNEPOI.cpp:123
A window containing a gl-object&#39;s parameter.