SUMO - Simulation of Urban MObility
GNECalibratorRoute.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 /****************************************************************************/
17 // Route used by GNECalibrators
18 /****************************************************************************/
19 #ifndef GNECalibratorRoute_h
20 #define GNECalibratorRoute_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #ifdef _MSC_VER
27 #include <windows_config.h>
28 #else
29 #include <config.h>
30 #endif
31 
34 #include <utils/common/RGBColor.h>
35 
36 #include "GNEAttributeCarrier.h"
37 
38 // ===========================================================================
39 // class declaration
40 // ===========================================================================
41 
42 class GNECalibrator;
43 class GNEEdge;
45 
46 // ===========================================================================
47 // class definitions
48 // ===========================================================================
54 
55 public:
57  GNECalibratorRoute(GNECalibratorDialog* calibratorDialog);
58 
60  GNECalibratorRoute(GNECalibrator* calibratorParent, const std::string& routeID, const std::vector<GNEEdge*>& edges, const RGBColor& color);
61 
64 
66  void writeRoute(OutputDevice& device);
67 
70 
72  const std::vector<GNEEdge*>& getGNEEdges() const;
73 
76  /* @brief method for getting the Attribute of an XML key
77  * @param[in] key The attribute key
78  * @return string with the value associated to key
79  */
80  std::string getAttribute(SumoXMLAttr key) const;
81 
82  /* @brief method for setting the attribute and letting the object perform additional changes
83  * @param[in] key The attribute key
84  * @param[in] value The new value
85  * @param[in] undoList The undoList on which to register changes
86  * @param[in] net optionally the GNENet to inform about gui updates
87  */
88  void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
89 
90  /* @brief method for setting the attribute and letting the object perform additional changes
91  * @param[in] key The attribute key
92  * @param[in] value The new value
93  * @param[in] undoList The undoList on which to register changes
94  */
95  bool isValid(SumoXMLAttr key, const std::string& value);
97 
98 protected:
101 
103  std::string myRouteID;
104 
106  std::vector<GNEEdge*> myEdges;
107 
110 
111 private:
113  void setAttribute(SumoXMLAttr key, const std::string& value);
114 
117 
120 };
121 
122 #endif
123 /****************************************************************************/
GNECalibratorRoute & operator=(GNECalibratorRoute *)=delete
Invalidated assignment operator.
const std::vector< GNEEdge * > & getGNEEdges() const
get GNEEdges of Calibrator ROute
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
GNECalibratorRoute(GNECalibratorDialog *calibratorDialog)
default constructor (used only in GNECalibratorDialog)
std::vector< GNEEdge * > myEdges
edges of route
std::string myRouteID
route in which this flow is used
GNECalibrator * myCalibratorParent
pointer to calibrator parent
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
void writeRoute(OutputDevice &device)
write Route values into a XML
RGBColor myColor
color of ROute
~GNECalibratorRoute()
destructor
std::string getAttribute(SumoXMLAttr key) const
inherited from GNEAttributeCarrier
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:56
Dialog for edit calibrators.
bool isValid(SumoXMLAttr key, const std::string &value)
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:70
GNECalibrator * getCalibratorParent() const
get pointer to calibrator parent