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-2016 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 <string>
35 #include <utility>
38 
39 #include "GNEAttributeCarrier.h"
40 
41 
42 // ===========================================================================
43 // class declarations
44 // ===========================================================================
45 class GeoConvHelper;
46 
47 // ===========================================================================
48 // class definitions
49 // ===========================================================================
58 
59  //friend class GNEChange_POI;
60 
61 public:
64  GNEPOI(const std::string& id, const std::string& type,
65  const RGBColor& color, SUMOReal layer, SUMOReal angle, const std::string& imgFile,
66  const Position& pos, SUMOReal width, SUMOReal height);
67 
68 
70  virtual ~GNEPOI() ;
71 
72 
78  //void move(Position pos);
79 
80 
82  //void registerMove(GNEUndoList *undoList);
83 
84 
85  //@name inherited from GNEAttributeCarrier
87  std::string getAttribute(SumoXMLAttr key) const;
88 
89  /* @brief method for setting the attribute and letting the object perform additional changes
90  * @param[in] key The attribute key
91  * @param[in] value The new value
92  * @param[in] undoList The undoList on which to register changes
93  */
94  void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
95 
96  bool isValid(SumoXMLAttr key, const std::string& value);
98 
100  static void saveToFile(const std::string& file);
101 
102 private:
104  GNEPOI(const GNEPOI&);
105 
107  GNEPOI& operator=(const GNEPOI&);
108 
109  void setAttribute(SumoXMLAttr key, const std::string& value);
110 
111 };
112 
113 
114 #endif
115 
116 /****************************************************************************/
117 
Definition: GNEPOI.h:57
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
Definition: GNEPOI.cpp:129
virtual ~GNEPOI()
Destructor.
Definition: GNEPOI.cpp:81
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::string getAttribute(SumoXMLAttr key) const
reposition the node at pos and informs the edges
Definition: GNEPOI.cpp:111
static methods for processing the coordinates conversion for the current net
Definition: GeoConvHelper.h:60
bool isValid(SumoXMLAttr key, const std::string &value)
Definition: GNEPOI.cpp:165
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:46
GNEPOI & operator=(const GNEPOI &)
Invalidated assignment operator.
static void saveToFile(const std::string &file)
save POIs to file
Definition: GNEPOI.cpp:183
#define SUMOReal
Definition: config.h:213
GNEPOI(const std::string &id, const std::string &type, const RGBColor &color, SUMOReal layer, SUMOReal angle, const std::string &imgFile, const Position &pos, SUMOReal width, SUMOReal height)
Constructor.
Definition: GNEPOI.cpp:73