Eclipse SUMO - Simulation of Urban MObility
GNEStopFrame.cpp
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 // The Widget for add Stops elements
16 /****************************************************************************/
17 
18 // ===========================================================================
19 // included modules
20 // ===========================================================================
21 #include <config.h>
22 
23 #include <netedit/GNENet.h>
24 #include <netedit/GNEViewNet.h>
30 
31 #include "GNEStopFrame.h"
32 
33 // ===========================================================================
34 // method definitions
35 // ===========================================================================
36 
37 // ---------------------------------------------------------------------------
38 // GNEStopFrame::HelpCreation - methods
39 // ---------------------------------------------------------------------------
40 
42  FXGroupBox(StopFrameParent->myContentFrame, "Help", GUIDesignGroupBoxFrame),
43  myStopFrameParent(StopFrameParent) {
44  myInformationLabel = new FXLabel(this, "", 0, GUIDesignLabelFrameInformation);
45 }
46 
47 
49 
50 
51 void
53  // first update help cration
54  updateHelpCreation();
55  // show modul
56  show();
57 }
58 
59 
60 void
62  hide();
63 }
64 
65 
66 void
68  // create information label
69  std::ostringstream information;
70  // set text depending of selected Stop type
71  switch (myStopFrameParent->myStopTagSelector->getCurrentTagProperties().getTag()) {
73  information
74  << "- Click over a bus stop\n"
75  << " to create a stop.";
76  break;
78  information
79  << "- Click over a container stop\n"
80  << " to create a stop.";
81  break;
83  information
84  << "- Click over a charging \n"
85  << " station to create a stop.";
86  break;
88  information
89  << "- Click over a parking area\n"
90  << " to create a stop.";
91  break;
92  case SUMO_TAG_STOP_LANE:
93  information
94  << "- Click over a lane to\n"
95  << " create a stop.";
96  break;
97  default:
98  information
99  << "- No stop parents in\n"
100  << " current network.";
101  break;
102  }
103  // set information label
104  myInformationLabel->setText(information.str().c_str());
105 }
106 
107 // ---------------------------------------------------------------------------
108 // GNEStopFrame - methods
109 // ---------------------------------------------------------------------------
110 
111 GNEStopFrame::GNEStopFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet) :
112  GNEFrame(horizontalFrameParent, viewNet, "Stops") {
113 
114  // Create Stop parent selector
115  myStopParentSelector = new GNEFrameModuls::DemandElementSelector(this, {GNEAttributeCarrier::TagType::TAGTYPE_PERSON, GNEAttributeCarrier::TagType::TAGTYPE_VEHICLE, GNEAttributeCarrier::TagType::TAGTYPE_ROUTE});
116 
117  // Create item Selector modul for Stops
118  myStopTagSelector = new GNEFrameModuls::TagSelector(this, GNEAttributeCarrier::TagType::TAGTYPE_STOP);
119 
120  // Create Stop parameters
122 
123  // Create Netedit parameter
125 
126  // Create Help Creation Modul
127  myHelpCreation = new HelpCreation(this);
128 
129  // refresh myStopParentMatchBox
131 }
132 
133 
135 
136 
137 void
139  // first check if stop frame moduls can be shown
140  bool validStopParent = false;
141  // check if at least there an item that supports an stop
142  for (auto i = myStopParentSelector->getAllowedTags().begin(); (i != myStopParentSelector->getAllowedTags().end()) && (validStopParent == false); i++) {
143  if (myViewNet->getNet()->getAttributeCarriers().demandElements.at(*i).size() > 0) {
144  validStopParent = true;
145  }
146  }
147  // show or hidde moduls depending of validStopParent
148  if (validStopParent) {
151  // refresh vType selector
153  // refresh item selector
155  } else {
156  // hide moduls (except help creation)
161  // show help creation modul
163  }
164  // show frame
165  GNEFrame::show();
166 }
167 
168 
169 bool
170 GNEStopFrame::addStop(const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor, bool shiftPressed) {
171  // check if we're selecting a new stop parent
172  if (shiftPressed) {
173  if (objectsUnderCursor.getDemandElementFront() &&
174  (objectsUnderCursor.getDemandElementFront()->getTagProperty().isVehicle() || objectsUnderCursor.getDemandElementFront()->getTagProperty().getTag() == SUMO_TAG_ROUTE)) {
176  WRITE_WARNING("Selected " + objectsUnderCursor.getDemandElementFront()->getTagStr() + " '" + objectsUnderCursor.getDemandElementFront()->getID() + "' as stop parent.");
177  return true;
178  } else {
179  WRITE_WARNING("Selected Stop parent isn't valid.");
180  return false;
181  }
182 
183  } else {
184  // now check if stop parent selector is valid
185  if (myStopParentSelector->getCurrentDemandElement() == nullptr) {
186  WRITE_WARNING("Current selected Stop parent isn't valid.");
187  return false;
188  }
189  // declare a Stop
190  SUMOVehicleParameter::Stop stopParameter;
191  bool friendlyPosition = false;
192  // check if stop parameters was sucesfully obtained
193  if (getStopParameter(stopParameter, friendlyPosition, myStopTagSelector->getCurrentTagProperties().getTag(),
195  objectsUnderCursor.getLaneFront(), objectsUnderCursor.getAdditionalFront())) {
196  // create it in RouteFrame
197  GNERouteHandler::buildStop(myViewNet, true, stopParameter, myStopParentSelector->getCurrentDemandElement(), friendlyPosition);
198  // stop sucesfully created, then return true
199  return true;
200  } else {
201  return false;
202  }
203  }
204 }
205 
206 bool
207 GNEStopFrame::getStopParameter(SUMOVehicleParameter::Stop& stop, bool& friendlyPosition, const SumoXMLTag stopTag,
208  GNEViewNet* viewNet, const GNEFrameAttributesModuls::AttributesCreator* stopAttributes, const GNEFrameAttributesModuls::NeteditAttributes* myNeteditAttributes,
209  const GNELane* lane, const GNEAdditional* stoppingPlace) {
210  // first check that current selected Stop is valid
211  if (stopTag == SUMO_TAG_NOTHING) {
212  WRITE_WARNING("Current selected Stop type isn't valid.");
213  return false;
214  } else if ((stopTag == SUMO_TAG_STOP_LANE) || (stopTag == SUMO_TAG_PERSONSTOP_LANE)) {
215  if (lane) {
216  stop.lane = lane->getID();
217  } else {
218  WRITE_WARNING("Click over a " + toString(SUMO_TAG_LANE) + " to create a stop placed in a " + toString(SUMO_TAG_LANE));
219  return false;
220  }
221  } else if (stoppingPlace) {
222  if (stoppingPlace->getTagProperty().getTag() == SUMO_TAG_BUS_STOP) {
223  if ((stopTag != SUMO_TAG_STOP_BUSSTOP) && (stopTag != SUMO_TAG_PERSONSTOP_BUSSTOP)) {
224  WRITE_WARNING("Invalid clicked stopping place to create a stop placed in a " + stoppingPlace->getTagProperty().getTagStr());
225  return false;
226  } else {
227  stop.busstop = stoppingPlace->getID();
228  stop.startPos = 0;
229  stop.endPos = 0;
230  }
231  } else if (stoppingPlace->getTagProperty().getTag() == SUMO_TAG_CONTAINER_STOP) {
232  if (stopTag != SUMO_TAG_STOP_CONTAINERSTOP) {
233  WRITE_WARNING("Invalid clicked stopping place to create a stop placed in a " + stoppingPlace->getTagProperty().getTagStr());
234  return false;
235  } else {
236  stop.containerstop = stoppingPlace->getID();
237  stop.startPos = 0;
238  stop.endPos = 0;
239  }
240  } else if (stoppingPlace->getTagProperty().getTag() == SUMO_TAG_CHARGING_STATION) {
241  if (stopTag != SUMO_TAG_STOP_CHARGINGSTATION) {
242  WRITE_WARNING("Invalid clicked stopping place to create a stop placed in a " + stoppingPlace->getTagProperty().getTagStr());
243  return false;
244  } else {
245  stop.chargingStation = stoppingPlace->getID();
246  stop.startPos = 0;
247  stop.endPos = 0;
248  }
249  } else if (stoppingPlace->getTagProperty().getTag() == SUMO_TAG_PARKING_AREA) {
250  if (stopTag != SUMO_TAG_STOP_PARKINGAREA) {
251  WRITE_WARNING("Invalid clicked stopping place to create a stop placed in a " + stoppingPlace->getTagProperty().getTagStr());
252  return false;
253  } else {
254  stop.parkingarea = stoppingPlace->getID();
255  stop.startPos = 0;
256  stop.endPos = 0;
257  }
258  }
259  } else {
260  if (stopTag == SUMO_TAG_STOP_BUSSTOP) {
261  WRITE_WARNING("Click over a " + toString(SUMO_TAG_STOP_BUSSTOP) + " to create a stop placed in a " + toString(SUMO_TAG_STOP_BUSSTOP));
262  } else if (stopTag != SUMO_TAG_STOP_CONTAINERSTOP) {
263  WRITE_WARNING("Click over a " + toString(SUMO_TAG_CONTAINER_STOP) + " to create a stop placed in a " + toString(SUMO_TAG_CONTAINER_STOP));
264  } else if (stopTag != SUMO_TAG_CHARGING_STATION) {
265  WRITE_WARNING("Click over a " + toString(SUMO_TAG_CHARGING_STATION) + " to create a stop placed in a " + toString(SUMO_TAG_CHARGING_STATION));
266  } else if (stopTag != SUMO_TAG_STOP_PARKINGAREA) {
267  WRITE_WARNING("Click over a " + toString(SUMO_TAG_PARKING_AREA) + " to create a stop placed in a " + toString(SUMO_TAG_PARKING_AREA));
268  } else if (stopTag == SUMO_TAG_PERSONTRIP_BUSSTOP) {
269  WRITE_WARNING("Click over a " + toString(SUMO_TAG_STOP_BUSSTOP) + " to create a person stop placed in a " + toString(SUMO_TAG_STOP_BUSSTOP));
270  }
271  return false;
272  }
273  // check if stop attributes are valid
274  if (!stopAttributes->areValuesValid()) {
275  stopAttributes->showWarningMessage();
276  return false;
277  }
278  // declare map to keep attributes from Frames from Frame
279  std::map<SumoXMLAttr, std::string> valuesMap = stopAttributes->getAttributesAndValues(false);
280  // generate ID
281  valuesMap[SUMO_ATTR_ID] = viewNet->getNet()->generateDemandElementID("", stopTag);
282  // add netedit values
283  if (!stop.lane.empty()) {
285  // check if start position can be parsed
286  if (GNEAttributeCarrier::canParse<double>(valuesMap[SUMO_ATTR_STARTPOS])) {
287  stop.startPos = GNEAttributeCarrier::parse<double>(valuesMap[SUMO_ATTR_STARTPOS]);
289  }
290  // check if end position can be parsed
291  if (GNEAttributeCarrier::canParse<double>(valuesMap[SUMO_ATTR_ENDPOS])) {
292  stop.endPos = GNEAttributeCarrier::parse<double>(valuesMap[SUMO_ATTR_ENDPOS]);
293  stop.parametersSet |= STOP_END_SET;
294  }
295  }
296  // obtain friendly position
297  if (valuesMap.count(SUMO_ATTR_FRIENDLY_POS) > 0) {
298  friendlyPosition = GNEAttributeCarrier::parse<bool>(valuesMap.at(SUMO_ATTR_FRIENDLY_POS));
299  }
300  // fill rest of parameters depending if it was edited
301  if (valuesMap.count(SUMO_ATTR_DURATION) > 0) {
302  stop.duration = string2time(valuesMap.at(SUMO_ATTR_DURATION));
303  } else {
304  stop.duration = -1;
305  }
306  if (valuesMap.count(SUMO_ATTR_UNTIL) > 0) {
307  stop.until = string2time(valuesMap[SUMO_ATTR_UNTIL]);
308  } else {
309  stop.until = -1;
310  }
311  if (valuesMap.count(SUMO_ATTR_TRIGGERED) > 0) {
312  stop.triggered = GNEAttributeCarrier::parse<bool>(valuesMap.at(SUMO_ATTR_TRIGGERED));
314  }
315  if (valuesMap.count(SUMO_ATTR_CONTAINER_TRIGGERED) > 0) {
316  stop.containerTriggered = GNEAttributeCarrier::parse<bool>(valuesMap.at(SUMO_ATTR_CONTAINER_TRIGGERED));
318  }
319  if (valuesMap.count(SUMO_ATTR_PARKING) > 0) {
320  stop.parking = GNEAttributeCarrier::parse<bool>(valuesMap.at(SUMO_ATTR_PARKING));
322  }
323  if (valuesMap.count(SUMO_ATTR_EXPECTED) > 0) {
324  stop.awaitedPersons = GNEAttributeCarrier::parse<std::set<std::string> >(valuesMap.at(SUMO_ATTR_EXPECTED));
326  }
327  if (valuesMap.count(SUMO_ATTR_EXPECTED_CONTAINERS) > 0) {
328  stop.awaitedContainers = GNEAttributeCarrier::parse<std::set<std::string> >(valuesMap.at(SUMO_ATTR_EXPECTED_CONTAINERS));
330  }
331  if (valuesMap.count(SUMO_ATTR_TRIP_ID) > 0) {
332  stop.tripId = valuesMap.at(SUMO_ATTR_TRIP_ID);
334  }
335  if (valuesMap.count(SUMO_ATTR_INDEX) > 0) {
336  if (valuesMap[SUMO_ATTR_INDEX] == "fit") {
337  stop.index = STOP_INDEX_FIT;
338  } else if (valuesMap[SUMO_ATTR_INDEX] == "end") {
339  stop.index = STOP_INDEX_END;
340  } else {
341  stop.index = GNEAttributeCarrier::parse<int>(valuesMap[SUMO_ATTR_INDEX]);
342  }
343  } else {
344  stop.index = STOP_INDEX_END;
345  }
346  // all ok, then return true
347  return true;
348 }
349 
350 // ===========================================================================
351 // protected
352 // ===========================================================================
353 
354 void
357  // show Stop type selector modul
361  } else {
362  // hide all moduls if stop parent isn't valid
366  }
367 }
368 
369 
370 void
372  // show or hidde moduls depending if current selected stop parent is valid
376  // show moduls
380  } else {
384  }
385  } else {
386  // hide moduls
391  }
392 }
393 
394 /****************************************************************************/
GNEStopFrame::HelpCreation::hideHelpCreation
void hideHelpCreation()
hide HelpCreation
Definition: GNEStopFrame.cpp:61
SUMOVehicleParameter::Stop::awaitedPersons
std::set< std::string > awaitedPersons
IDs of persons the vehicle has to wait for until departing.
Definition: SUMOVehicleParameter.h:616
GNENet::getAttributeCarriers
const AttributeCarriers & getAttributeCarriers() const
retrieve all attribute carriers of Net
Definition: GNENet.cpp:1014
GNEAdditional
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:47
SUMO_TAG_STOP_PARKINGAREA
stop placed over a parking area (used in netedit)
Definition: SUMOXMLDefinitions.h:189
GNEAdditional.h
GNEAttributeCarrier::getID
const std::string getID() const
function to support debugging
Definition: GNEAttributeCarrier.cpp:1187
WRITE_WARNING
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:239
GNEAttributeCarrier::TagProperties::getTagStr
const std::string & getTagStr() const
get Tag vinculated with this attribute Property in String Format (used to avoid multiple calls to toS...
Definition: GNEAttributeCarrier.cpp:527
SUMOVehicleParameter::Stop::lane
std::string lane
The lane to stop at.
Definition: SUMOVehicleParameter.h:580
SUMO_TAG_STOP_LANE
stop placed over a lane (used in netedit)
Definition: SUMOXMLDefinitions.h:181
SUMO_ATTR_UNTIL
Definition: SUMOXMLDefinitions.h:666
GNEFrameModuls::DemandElementSelector::setDemandElement
void setDemandElement(GNEDemandElement *demandElement)
set current demand element
Definition: GNEFrameModuls.cpp:364
GNEFrameAttributesModuls::NeteditAttributes
Definition: GNEFrameAttributesModuls.h:548
SUMO_TAG_CONTAINER_STOP
A container stop.
Definition: SUMOXMLDefinitions.h:106
SUMOVehicleParameter::Stop::busstop
std::string busstop
(Optional) bus stop if one is assigned to the stop
Definition: SUMOVehicleParameter.h:583
GNEFrameModuls::DemandElementSelector::refreshDemandElementSelector
void refreshDemandElementSelector()
refresh demand element selector
Definition: GNEFrameModuls.cpp:409
GNEFrameAttributesModuls::AttributesCreator
Definition: GNEFrameAttributesModuls.h:157
SUMOVehicleParameter::Stop::parametersSet
int parametersSet
Information for the output which parameter were set.
Definition: SUMOVehicleParameter.h:634
GNEFrameAttributesModuls::AttributesCreator::areValuesValid
bool areValuesValid() const
check if parameters of attributes are valid
Definition: GNEFrameAttributesModuls.cpp:725
SUMO_TAG_LANE
begin/end of the description of a single lane
Definition: SUMOXMLDefinitions.h:50
GNEFrameModuls::DemandElementSelector::showDemandElementSelector
void showDemandElementSelector()
show demand element selector
Definition: GNEFrameModuls.cpp:378
GNEFrame
Definition: GNEFrame.h:35
GNEViewNet
Definition: GNEViewNet.h:43
SUMO_ATTR_ID
Definition: SUMOXMLDefinitions.h:379
SUMOVehicleParameter::Stop::parkingarea
std::string parkingarea
(Optional) parking area if one is assigned to the stop
Definition: SUMOVehicleParameter.h:589
SUMO_TAG_NOTHING
invalid tag
Definition: SUMOXMLDefinitions.h:44
GUIDesigns.h
SUMO_ATTR_ENDPOS
Definition: SUMOXMLDefinitions.h:795
STOP_TRIP_ID_SET
const int STOP_TRIP_ID_SET
Definition: SUMOVehicleParameter.h:81
SUMOVehicleParameter::Stop::triggered
bool triggered
whether an arriving person lets the vehicle continue
Definition: SUMOVehicleParameter.h:607
GNEStopFrame::HelpCreation::~HelpCreation
~HelpCreation()
destructor
Definition: GNEStopFrame.cpp:48
SumoXMLTag
SumoXMLTag
Numbers representing SUMO-XML - element names.
Definition: SUMOXMLDefinitions.h:42
STOP_START_SET
const int STOP_START_SET
Definition: SUMOVehicleParameter.h:75
GNEAttributeCarrier::TagProperties::getTag
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
Definition: GNEAttributeCarrier.cpp:521
GNEStopFrame::GNEStopFrame
GNEStopFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
Definition: GNEStopFrame.cpp:111
GNEFrameAttributesModuls::AttributesCreator::showAttributesCreatorModul
void showAttributesCreatorModul(const GNEAttributeCarrier::TagProperties &myTagProperties)
show AttributesCreator modul
Definition: GNEFrameAttributesModuls.cpp:631
GNEStopFrame::tagSelected
void tagSelected()
Tag selected in TagSelector.
Definition: GNEStopFrame.cpp:355
GNEFrameAttributesModuls::AttributesCreator::hideAttributesCreatorModul
void hideAttributesCreatorModul()
hide group box
Definition: GNEFrameAttributesModuls.cpp:662
GUIDesignLabelFrameInformation
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
Definition: GUIDesigns.h:210
GNEFrameAttributesModuls::AttributesCreator::getAttributesAndValues
std::map< SumoXMLAttr, std::string > getAttributesAndValues(bool includeAll) const
get attributes and their values
Definition: GNEFrameAttributesModuls.cpp:668
GNEStopFrame::HelpCreation::showHelpCreation
void showHelpCreation()
show HelpCreation
Definition: GNEStopFrame.cpp:52
GNEViewNet::getNet
GNENet * getNet() const
get the net object
Definition: GNEViewNet.cpp:927
GNEStopFrame::myStopAttributes
GNEFrameAttributesModuls::AttributesCreator * myStopAttributes
internal Stop attributes
Definition: GNEStopFrame.h:108
GNEAttributeCarrier::TagProperties::isVehicle
bool isVehicle() const
return true if tag correspond to a vehicle element
Definition: GNEAttributeCarrier.cpp:737
SUMO_ATTR_TRIP_ID
Definition: SUMOXMLDefinitions.h:774
GNEStopFrame::demandElementSelected
void demandElementSelected()
selected demand element in DemandElementSelector
Definition: GNEStopFrame.cpp:371
SUMOVehicleParameter::Stop::tripId
std::string tripId
id of the trip within a cyclical public transport route
Definition: SUMOVehicleParameter.h:622
GNEStopFrame::HelpCreation::updateHelpCreation
void updateHelpCreation()
update HelpCreation
Definition: GNEStopFrame.cpp:67
GNEAttributeCarrier::getTagProperty
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
Definition: GNEAttributeCarrier.cpp:1171
SUMO_ATTR_STARTPOS
Definition: SUMOXMLDefinitions.h:794
SUMO_TAG_CHARGING_STATION
A Charging Station.
Definition: SUMOXMLDefinitions.h:112
GNEStopFrame::HelpCreation
Definition: GNEStopFrame.h:42
SUMO_TAG_STOP_CHARGINGSTATION
stop placed over a charging station (used in netedit)
Definition: SUMOXMLDefinitions.h:187
SUMO_TAG_PERSONSTOP_LANE
Definition: SUMOXMLDefinitions.h:314
GNEViewNetHelper::ObjectsUnderCursor
class used to group all variables related with objects under cursor after a click over view
Definition: GNEViewNetHelper.h:149
GNEFrameModuls::DemandElementSelector
Definition: GNEFrameModuls.h:114
GNEFrameModuls::TagSelector
Definition: GNEFrameModuls.h:45
SUMOVehicleParameter::Stop::until
SUMOTime until
The time at which the vehicle may continue its journey.
Definition: SUMOVehicleParameter.h:604
GNEDemandElement.h
GNEViewNet.h
STOP_INDEX_FIT
const int STOP_INDEX_FIT
Definition: SUMOVehicleParameter.h:72
SUMO_TAG_PARKING_AREA
A parking area.
Definition: SUMOXMLDefinitions.h:108
GNEFrameModuls::DemandElementSelector::getCurrentDemandElement
GNEDemandElement * getCurrentDemandElement() const
get current demand element
Definition: GNEFrameModuls.cpp:353
SUMO_ATTR_TRIGGERED
Definition: SUMOXMLDefinitions.h:796
GNEFrameModuls::DemandElementSelector::getAllowedTags
const std::vector< SumoXMLTag > & getAllowedTags() const
Definition: GNEFrameModuls.cpp:359
GNEFrame::myViewNet
GNEViewNet * myViewNet
View Net.
Definition: GNEFrame.h:120
GNEStopFrame::getStopParameter
static bool getStopParameter(SUMOVehicleParameter::Stop &stop, bool &friendlyPosition, const SumoXMLTag stopTag, GNEViewNet *viewNet, const GNEFrameAttributesModuls::AttributesCreator *stopAttributes, const GNEFrameAttributesModuls::NeteditAttributes *myNeteditAttributes, const GNELane *lane, const GNEAdditional *stoppingPlace)
get stop parameters
Definition: GNEStopFrame.cpp:207
GNEStopFrame::myStopParentSelector
GNEFrameModuls::DemandElementSelector * myStopParentSelector
Stop parent selectors.
Definition: GNEStopFrame.h:102
GUIDesignGroupBoxFrame
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
Definition: GUIDesigns.h:255
GNEFrameAttributesModuls::NeteditAttributes::showNeteditAttributesModul
void showNeteditAttributesModul(const GNEAttributeCarrier::TagProperties &tagValue)
show Netedit attributes modul
Definition: GNEFrameAttributesModuls.cpp:2036
SUMOVehicleParameter::Stop::endPos
double endPos
The stopping position end.
Definition: SUMOVehicleParameter.h:598
GNEFrameModuls::TagSelector::getCurrentTagProperties
const GNEAttributeCarrier::TagProperties & getCurrentTagProperties() const
get current type tag
Definition: GNEFrameModuls.cpp:195
SUMO_TAG_PERSONTRIP_BUSSTOP
Definition: SUMOXMLDefinitions.h:306
GNEStopFrame::show
void show()
show Frame
Definition: GNEStopFrame.cpp:138
GNENet::AttributeCarriers::demandElements
std::map< SumoXMLTag, std::map< std::string, GNEDemandElement * > > demandElements
map with the name and pointer to demand elements of net
Definition: GNENet.h:105
SUMO_ATTR_FRIENDLY_POS
Definition: SUMOXMLDefinitions.h:762
string2time
SUMOTime string2time(const std::string &r)
Definition: SUMOTime.cpp:42
GNELane.h
GNEFrameAttributesModuls::NeteditAttributes::getNeteditAttributesAndValues
bool getNeteditAttributesAndValues(std::map< SumoXMLAttr, std::string > &valuesMap, const GNELane *lane) const
fill valuesMap with netedit attributes
Definition: GNEFrameAttributesModuls.cpp:2093
SUMO_ATTR_INDEX
Definition: SUMOXMLDefinitions.h:801
SUMOVehicleParameter::Stop::startPos
double startPos
The stopping position start.
Definition: SUMOVehicleParameter.h:595
GNEFrameModuls::TagSelector::hideTagSelector
void hideTagSelector()
hide item selector
Definition: GNEFrameModuls.cpp:189
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:48
GNEStopFrame
Definition: GNEStopFrame.h:34
SUMO_TAG_BUS_STOP
A bus stop.
Definition: SUMOXMLDefinitions.h:98
SUMO_TAG_STOP_CONTAINERSTOP
stop placed over a containerStop (used in netedit)
Definition: SUMOXMLDefinitions.h:185
SUMOVehicleParameter::Stop::containerTriggered
bool containerTriggered
whether an arriving container lets the vehicle continue
Definition: SUMOVehicleParameter.h:610
SUMO_ATTR_DURATION
Definition: SUMOXMLDefinitions.h:665
GNEStopFrame::HelpCreation::myInformationLabel
FXLabel * myInformationLabel
Label with creation information.
Definition: GNEStopFrame.h:65
SUMO_ATTR_EXPECTED
Definition: SUMOXMLDefinitions.h:799
SUMOVehicleParameter::Stop::index
int index
at which position in the stops list
Definition: SUMOVehicleParameter.h:631
SUMO_ATTR_EXPECTED_CONTAINERS
Definition: SUMOXMLDefinitions.h:800
GNEFrameModuls::TagSelector::refreshTagProperties
void refreshTagProperties()
due myCurrentTagProperties is a Reference, we need to refresh it when frameParent is show
Definition: GNEFrameModuls.cpp:243
GNEViewNetHelper::ObjectsUnderCursor::getDemandElementFront
GNEDemandElement * getDemandElementFront() const
get front net element element (or a pointer to nullptr if there isn't)
Definition: GNEViewNetHelper.cpp:259
SUMO_ATTR_CONTAINER_TRIGGERED
Definition: SUMOXMLDefinitions.h:797
GNEStopFrame::addStop
bool addStop(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, bool shiftPressed)
add Stop element
Definition: GNEStopFrame.cpp:170
GNEStopFrame::myNeteditAttributes
GNEFrameAttributesModuls::NeteditAttributes * myNeteditAttributes
Netedit parameter.
Definition: GNEStopFrame.h:111
GNERouteHandler::buildStop
static void buildStop(GNEViewNet *viewNet, bool undoDemandElements, const SUMOVehicleParameter::Stop &stopParameters, GNEDemandElement *stopParent, bool friendlyPosition)
build stop
Definition: GNERouteHandler.cpp:431
GNEStopFrame::HelpCreation::HelpCreation
HelpCreation(GNEStopFrame *StopFrameParent)
constructor
Definition: GNEStopFrame.cpp:41
STOP_INDEX_END
const int STOP_INDEX_END
Definition: SUMOVehicleParameter.h:71
STOP_EXPECTED_SET
const int STOP_EXPECTED_SET
Definition: SUMOVehicleParameter.h:78
SUMO_ATTR_PARKING
Definition: SUMOXMLDefinitions.h:798
STOP_TRIGGER_SET
const int STOP_TRIGGER_SET
Definition: SUMOVehicleParameter.h:76
STOP_CONTAINER_TRIGGER_SET
const int STOP_CONTAINER_TRIGGER_SET
Definition: SUMOVehicleParameter.h:79
SUMO_TAG_ROUTE
begin/end of the description of a route
Definition: SUMOXMLDefinitions.h:126
GNEViewNetHelper::ObjectsUnderCursor::getLaneFront
GNELane * getLaneFront() const
get front lane (or a pointer to nullptr if there isn't)
Definition: GNEViewNetHelper.cpp:289
config.h
GNEStopFrame::myHelpCreation
HelpCreation * myHelpCreation
Help creation.
Definition: GNEStopFrame.h:114
GNEFrameModuls::DemandElementSelector::hideDemandElementSelector
void hideDemandElementSelector()
hide demand element selector
Definition: GNEFrameModuls.cpp:397
STOP_EXPECTED_CONTAINERS_SET
const int STOP_EXPECTED_CONTAINERS_SET
Definition: SUMOVehicleParameter.h:80
STOP_PARKING_SET
const int STOP_PARKING_SET
Definition: SUMOVehicleParameter.h:77
SUMO_TAG_STOP_BUSSTOP
stop placed over a busStop (used in netedit)
Definition: SUMOXMLDefinitions.h:183
STOP_END_SET
const int STOP_END_SET
Definition: SUMOVehicleParameter.h:74
GNEAttributeCarrier::getTagStr
const std::string & getTagStr() const
get tag assigned to this object in string format
Definition: GNEAttributeCarrier.cpp:1165
GNENet::generateDemandElementID
std::string generateDemandElementID(const std::string &prefix, SumoXMLTag type) const
generate demand element id
Definition: GNENet.cpp:2411
SUMO_TAG_PERSONSTOP_BUSSTOP
Definition: SUMOXMLDefinitions.h:313
GNEFrameModuls::TagSelector::showTagSelector
void showTagSelector()
show item selector
Definition: GNEFrameModuls.cpp:183
SUMOVehicleParameter::Stop::duration
SUMOTime duration
The stopping duration.
Definition: SUMOVehicleParameter.h:601
GNEFrameAttributesModuls::NeteditAttributes::hideNeteditAttributesModul
void hideNeteditAttributesModul()
hide Netedit attributes modul
Definition: GNEFrameAttributesModuls.cpp:2087
GNEStopFrame.h
GNEFrame::show
virtual void show()
show Frame
Definition: GNEFrame.cpp:108
SUMOVehicleParameter::Stop::awaitedContainers
std::set< std::string > awaitedContainers
IDs of containers the vehicle has to wait for until departing.
Definition: SUMOVehicleParameter.h:619
SUMOVehicleParameter::Stop::parking
bool parking
whether the vehicle is removed from the net while stopping
Definition: SUMOVehicleParameter.h:613
SUMOVehicleParameter::Stop::chargingStation
std::string chargingStation
(Optional) charging station if one is assigned to the stop
Definition: SUMOVehicleParameter.h:592
SUMOVehicleParameter::Stop::containerstop
std::string containerstop
(Optional) container stop if one is assigned to the stop
Definition: SUMOVehicleParameter.h:586
GNEStopFrame::myStopTagSelector
GNEFrameModuls::TagSelector * myStopTagSelector
stop tag selector selector (used to select diffent kind of Stops)
Definition: GNEStopFrame.h:105
GNELane
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:46
GNEFrameAttributesModuls::AttributesCreator::showWarningMessage
void showWarningMessage(std::string extra="") const
show warning message with information about non-valid attributes
Definition: GNEFrameAttributesModuls.cpp:698
GNEFrame::hide
virtual void hide()
hide Frame
Definition: GNEFrame.cpp:117
GNEViewNetHelper::ObjectsUnderCursor::getAdditionalFront
GNEAdditional * getAdditionalFront() const
get front additional element (or a pointer to nullptr if there isn't)
Definition: GNEViewNetHelper.cpp:239
GNENet.h
GNERouteHandler.h
SUMOVehicleParameter::Stop
Definition of vehicle stop (position and duration)
Definition: SUMOVehicleParameter.h:566
GNEStopFrame::~GNEStopFrame
~GNEStopFrame()
Destructor.
Definition: GNEStopFrame.cpp:134