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