Eclipse SUMO - Simulation of Urban MObility
GNECalibratorFlow.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-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // Flow used by GNECalibrators
16 /****************************************************************************/
17 #ifndef GNECalibratorFlow_h
18 #define GNECalibratorFlow_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 
25 #include "GNEAdditional.h"
26 
27 // ===========================================================================
28 // class declaration
29 // ===========================================================================
30 
31 class GNECalibrator;
33 
34 // ===========================================================================
35 // class definitions
36 // ===========================================================================
42 
43 public:
45  GNECalibratorFlow(GNEAdditional* calibratorParent);
46 
48  GNECalibratorFlow(GNEAdditional* calibratorParent, GNEDemandElement* vehicleType, GNEDemandElement* route, const std::string& vehsPerHour, const std::string& speed,
49  const RGBColor& color, const std::string& departLane, const std::string& departPos, const std::string& departSpeed, const std::string& arrivalLane,
50  const std::string& arrivalPos, const std::string& arrivalSpeed, const std::string& line, int personNumber, int containerNumber, bool reroute,
51  const std::string& departPosLat, const std::string& arrivalPosLat, SUMOTime begin, SUMOTime end);
52 
55 
58 
61  void moveGeometry(const Position& offset);
62 
66  void commitGeometryMoving(GNEUndoList* undoList);
67 
69  void updateGeometry();
70 
73 
77 
80 
83  std::string getParentName() const;
84 
89  void drawGL(const GUIVisualizationSettings& s) const;
91 
94  /* @brief method for getting the Attribute of an XML key
95  * @param[in] key The attribute key
96  * @return string with the value associated to key
97  */
98  std::string getAttribute(SumoXMLAttr key) const;
99 
100  /* @brief method for setting the attribute and letting the object perform additional changes
101  * @param[in] key The attribute key
102  * @param[in] value The new value
103  * @param[in] undoList The undoList on which to register changes
104  * @param[in] net optionally the GNENet to inform about gui updates
105  */
106  void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList);
107 
108  /* @brief method for setting the attribute and letting the object perform additional changes
109  * @param[in] key The attribute key
110  * @param[in] value The new value
111  * @param[in] undoList The undoList on which to register changes
112  */
113  bool isValid(SumoXMLAttr key, const std::string& value);
114 
116  std::string getPopUpID() const;
117 
119  std::string getHierarchyName() const;
121 
122 protected:
125 
128 
130  std::string myVehsPerHour;
131 
133  std::string mySpeed;
134 
137 
139  std::string myDepartLane;
140 
142  std::string myDepartPos;
143 
145  std::string myDepartSpeed;
146 
148  std::string myArrivalLane;
149 
151  std::string myArrivalPos;
152 
154  std::string myArrivalSpeed;
155 
157  std::string myLine;
158 
161 
164 
166  bool myReroute;
167 
169  std::string myDepartPosLat;
170 
172  std::string myArrivalPosLat;
173 
178 
182 
183 private:
185  void setAttribute(SumoXMLAttr key, const std::string& value);
186 
188  GNECalibratorFlow(const GNECalibratorFlow&) = delete;
189 
192 };
193 
194 #endif
195 /****************************************************************************/
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
void updateGeometry()
update pre-computed geometry information
Position getPositionInView() const
Returns position of additional in view.
GNEDemandElement * myVehicleType
type of flow
GNEDemandElement * myRoute
route in which this flow is used
long long int SUMOTime
Definition: SUMOTime.h:35
RGBColor myColor
color of flow
GNECalibratorFlow(GNEAdditional *calibratorParent)
default constructor (used only in GNECalibratorDialog)
~GNECalibratorFlow()
destructor
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their conrrespond attribute are valids
std::string myLine
line of bus/container stop
Stores the information about how to visualize structures.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
SUMOTime myEnd
time step end
std::string myDepartPosLat
departPosLat
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:42
bool myReroute
reroute
std::string myArrivalPos
arrival pos
std::string getParentName() const
Returns the name of the parent object.
std::string myArrivalPosLat
std::string getAttribute(SumoXMLAttr key) const
inherited from GNEAttributeCarrier
int myPersonNumber
number of person
std::string myDepartPos
depart position
GNECalibratorFlow & operator=(const GNECalibratorFlow &)=delete
Invalidated assignment operator.
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
std::string myDepartLane
depart lane
void commitGeometryMoving(GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:39
std::string myArrivalLane
arrival lane
std::string mySpeed
flow speed (String instead float because can be empty)
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
int myContainerNumber
number of container
Dialog for edit calibrators.
void moveGeometry(const Position &offset)
change the position of the element geometry without saving in undoList
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:47
std::string myArrivalSpeed
arrival speed
std::string myDepartSpeed
depart speed
std::string myVehsPerHour
flows per hour (String instead float because can be empty)
An Element which don't belongs to GNENet but has influency in the simulation.