SUMO - Simulation of Urban MObility
GNEAdditionalHandler.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-2018 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 // Builds trigger objects for netedit
16 /****************************************************************************/
17 #ifndef GNEAdditionalHandler_h
18 #define GNEAdditionalHandler_h
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 
24 #include <config.h>
25 
26 #include <string>
27 #include <vector>
29 #include <utils/geom/Position.h>
32 
33 
34 // ===========================================================================
35 // class declarations
36 // ===========================================================================
37 
38 class GNENet;
39 class GNEViewNet;
40 class GNEJunction;
41 class GNEUndoList;
42 class GNEEdge;
43 class GNELane;
44 class GNEAdditional;
45 
46 // ===========================================================================
47 // class definitions
48 // ===========================================================================
49 
53 public:
55  GNEAdditionalHandler(const std::string& file, GNEViewNet* viewNet, bool undoAdditionals = true, GNEAdditional* additionalParent = nullptr);
56 
59 
62 
68  void myStartElement(int element, const SUMOSAXAttributes& attrs);
69 
75  void myEndElement(int element);
76 
78 
84 
89  void parseAndBuildVaporizer(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag);
90 
96  void parseAndBuildVariableSpeedSign(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag);
97 
103  void parseAndBuildVariableSpeedSignStep(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag);
104 
109  void parseAndBuildRerouter(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag);
110 
115  void parseAndBuildRerouterInterval(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag);
116 
122 
128 
134 
140 
146 
151  void parseAndBuildBusStop(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag);
152 
157  void parseAndBuildAccess(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag);
158 
163  void parseAndBuildContainerStop(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag);
164 
169  void parseAndBuildChargingStation(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag);
170 
175  void parseAndBuildParkingArea(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag);
176 
181  void parseAndBuildParkingSpace(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag);
182 
187  void parseAndBuildCalibrator(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag);
188 
193  void parseAndBuildDetectorE1(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag);
194 
199  void parseAndBuildDetectorE2(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag);
200 
205  void parseAndBuildDetectorE3(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag);
206 
211  void parseAndBuildDetectorEntry(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag);
212 
217  void parseAndBuildDetectorExit(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag);
218 
223  void parseAndBuildDetectorE1Instant(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag);
224 
229  void parseAndBuildRouteProbe(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag);
230 
235  void parseAndBuildCalibratorRoute(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag);
236 
241  void parseAndBuildCalibratorVehicleType(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag);
242 
247  void parseAndBuildCalibratorFlow(const SUMOSAXAttributes& attrs, const SumoXMLTag& tag);
248 
252  void parseGenericParameter(const SUMOSAXAttributes& attrs);
253 
255 
260 
267  static GNEAdditional* buildAdditional(GNEViewNet* viewNet, bool allowUndoRedo, SumoXMLTag tag, std::map<SumoXMLAttr, std::string> values);
268 
283  static GNEAdditional* buildBusStop(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, const std::string& startPos, const std::string& endPos, const std::string& name, const std::vector<std::string>& lines, bool friendlyPosition, bool blockMovement);
284 
297  static GNEAdditional* buildAccess(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* busStop, GNELane* lane, const std::string& pos, const std::string& length, bool friendlyPos, bool blockMovement);
298 
313  static GNEAdditional* buildContainerStop(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, const std::string& startPos, const std::string& endPos, const std::string& name,
314  const std::vector<std::string>& lines, bool friendlyPosition, bool blockMovement);
315 
333  static GNEAdditional* buildChargingStation(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, const std::string& startPos, const std::string& endPos, const std::string& name,
334  double chargingPower, double efficiency, bool chargeInTransit, double chargeDelay, bool friendlyPosition, bool blockMovement);
335 
353  static GNEAdditional* buildParkingArea(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, const std::string& startPos, const std::string& endPos, const std::string& name,
354  bool friendlyPosition, int roadSideCapacity, double width, const std::string& length, double angle, bool blockMovement);
355 
370  static GNEAdditional* buildParkingSpace(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* parkingAreaParent, double x, double y, double z, double width, double length, double angle, bool blockMovement);
371 
387  static GNEAdditional* buildDetectorE1(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, double pos, double freq, const std::string& filename,
388  const std::string& vehicleTypes, const std::string& name, bool friendlyPos, bool blockMovement);
389 
409  static GNEAdditional* buildDetectorE2(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, double pos, double length, double freq, const std::string& filename,
410  const std::string& vehicleTypes, const std::string& name, const double timeThreshold, double speedThreshold, double jamThreshold, bool friendlyPos, bool blockMovement);
411 
427  static GNEAdditional* buildDetectorE3(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, Position pos, double freq, const std::string& filename, const std::string& vehicleTypes, const std::string& name, const double timeThreshold, double speedThreshold, bool blockMovement);
428 
440  static GNEAdditional* buildDetectorEntry(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* E3Parent, GNELane* lane, double pos, bool friendlyPos, bool blockMovement);
441 
453  static GNEAdditional* buildDetectorExit(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* E3Parent, GNELane* lane, double pos, bool friendlyPos, bool blockMovement);
454 
469  static GNEAdditional* buildDetectorE1Instant(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, double pos, const std::string& filename, const std::string& vehicleTypes, const std::string& name, bool friendlyPos, bool blockMovement);
470 
484  static GNEAdditional* buildCalibrator(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNELane* lane, double pos, const std::string& name, const std::string& outfile, double freq);
485 
499  static GNEAdditional* buildCalibrator(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNEEdge* edge, double pos, const std::string& name, const std::string& outfile, double freq);
500 
504  static GNEAdditional* buildCalibratorRoute(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& routeID, const std::vector<GNEEdge*>& edges, const RGBColor& color);
505 
509  static GNEAdditional* buildVehicleType(GNEViewNet* viewNet, bool allowUndoRedo, std::string vehicleTypeID,
510  double accel, double decel, double sigma, double tau, double length, double minGap, double maxSpeed,
511  double speedFactor, double speedDev, const RGBColor& color, SUMOVehicleClass vClass, const std::string& emissionClass,
512  SUMOVehicleShape shape, double width, const std::string& filename, double impatience, const std::string& laneChangeModel,
513  const std::string& carFollowModel, int personCapacity, int containerCapacity, double boardingDuration,
514  double loadingDuration, const std::string& latAlignment, double minGapLat, double maxSpeedLat);
515 
519  static GNEAdditional* buildCalibratorFlow(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* calibratorParent, GNEAdditional* route, GNEAdditional* vtype,
520  const std::string& vehsPerHour, const std::string& speed, const RGBColor& color, const std::string& departLane, const std::string& departPos,
521  const std::string& departSpeed, const std::string& arrivalLane, const std::string& arrivalPos, const std::string& arrivalSpeed,
522  const std::string& line, int personNumber, int containerNumber, bool reroute, const std::string& departPosLat,
523  const std::string& arrivalPosLat, double begin, double end);
524 
537  static GNEAdditional* buildRerouter(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, Position pos, const std::vector<GNEEdge*>& edges, double prob, const std::string& name, const std::string& file, bool off, double timeThreshold, const std::string& vTypes, bool blockMovement);
538 
547  static GNEAdditional* buildRerouterInterval(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* rerouterParent, double begin, double end);
548 
552  static GNEAdditional* buildClosingLaneReroute(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* rerouterIntervalParent, GNELane* closedLane, SVCPermissions permissions);
553 
557  static GNEAdditional* buildClosingReroute(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* rerouterIntervalParent, GNEEdge* closedEdge, SVCPermissions permissions);
558 
562  static GNEAdditional* builDestProbReroute(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* rerouterIntervalParent, GNEEdge* newEdgeDestination, double probability);
563 
567  static GNEAdditional* builParkingAreaReroute(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* rerouterIntervalParent, GNEAdditional* newParkignArea, double probability, bool visible);
568 
572  static GNEAdditional* buildRouteProbReroute(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* rerouterIntervalParent, const std::string& newRouteId, double probability);
573 
586  static GNEAdditional* buildRouteProbe(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, GNEEdge* edge, const std::string& freq, const std::string& name, const std::string& file, double begin);
587 
598  static GNEAdditional* buildVariableSpeedSign(GNEViewNet* viewNet, bool allowUndoRedo, const std::string& id, Position pos, const std::vector<GNELane*>& destLanes, const std::string& name, bool blockMovement);
599 
609  static GNEAdditional* buildVariableSpeedSignStep(GNEViewNet* viewNet, bool allowUndoRedo, GNEAdditional* VSSParent, double time, double speed);
610 
621  static GNEAdditional* buildVaporizer(GNEViewNet* viewNet, bool allowUndoRedo, GNEEdge* edge, double startTime, double end, const std::string& name);
622 
629  std::string getFileName(const SUMOSAXAttributes& attrs, const std::string& base, const bool allowEmpty = false);
630 
638  double getPosition(double pos, GNELane& lane, bool friendlyPos, const std::string& additionalID);
639 
648  static bool fixStoppinPlacePosition(std::string& startPos, std::string& endPos, const double laneLength, const double minLength, const bool friendlyPos);
649 
656  static bool checkAndFixDetectorPositionPosition(double& pos, const double laneLength, const bool friendlyPos);
657 
665  static bool fixE2DetectorPositionPosition(double& pos, double& length, const double laneLength, const bool friendlyPos);
666 
668  static bool accessCanBeCreated(GNEAdditional* busStopParent, GNEEdge& edge);
669 
671  static bool checkOverlappingRerouterIntervals(GNEAdditional* rerouter, double newBegin, double newEnd);
672 
673 private:
676 
678  void insertElement(SumoXMLTag tag);
679 
681  void commitElementInsertion(const std::string& id);
682 
684  void popElement();
685 
687  GNEAdditional* retrieveAdditionalParent(GNEViewNet* viewNet, SumoXMLTag expectedTag) const;
688 
689  private:
691  std::vector<std::pair<SumoXMLTag, std::string> > myInsertedElements;
692  };
693 
696 
699 
702 
705 
708 };
709 
710 
711 #endif
SumoXMLTag
Numbers representing SUMO-XML - element names.
static GNEAdditional * buildVehicleType(GNEViewNet *viewNet, bool allowUndoRedo, std::string vehicleTypeID, double accel, double decel, double sigma, double tau, double length, double minGap, double maxSpeed, double speedFactor, double speedDev, const RGBColor &color, SUMOVehicleClass vClass, const std::string &emissionClass, SUMOVehicleShape shape, double width, const std::string &filename, double impatience, const std::string &laneChangeModel, const std::string &carFollowModel, int personCapacity, int containerCapacity, double boardingDuration, double loadingDuration, const std::string &latAlignment, double minGapLat, double maxSpeedLat)
void parseAndBuildRerouterRouteProbReroute(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Route Prob Reroute.
void parseAndBuildRerouterParkingAreaReroute(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a parkingAreaReroute.
static bool fixStoppinPlacePosition(std::string &startPos, std::string &endPos, const double laneLength, const double minLength, const bool friendlyPos)
check if the position of an stoppingPlace over a lane is valid
void parseAndBuildDetectorE1(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a induction loop detector (E1)
static GNEAdditional * buildCalibrator(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNELane *lane, double pos, const std::string &name, const std::string &outfile, double freq)
builds a microscopic calibrator over a lane
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
void commitElementInsertion(const std::string &id)
commit element insertion (used to save ID of last correct inserted element)
static GNEAdditional * buildVariableSpeedSign(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, Position pos, const std::vector< GNELane *> &destLanes, const std::string &name, bool blockMovement)
Builds a VariableSpeedSign (lane speed trigger)
static GNEAdditional * buildDetectorE2(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNELane *lane, double pos, double length, double freq, const std::string &filename, const std::string &vehicleTypes, const std::string &name, const double timeThreshold, double speedThreshold, double jamThreshold, bool friendlyPos, bool blockMovement)
Builds a lane Area Detector (E2)
void parseAndBuildChargingStation(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a charging station.
void parseAndBuildParkingSpace(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a parking space.
const std::string & getFileName() const
returns the current file name
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
bool myUndoAdditionals
flag to check if created additionals must be undo and redo
Stack used to save the last inserted element.
static bool checkAndFixDetectorPositionPosition(double &pos, const double laneLength, const bool friendlyPos)
check if the position of a detector over a lane is valid
void parseAndBuildDetectorExit(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Exit detector.
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:80
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:47
static GNEAdditional * buildDetectorE3(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, Position pos, double freq, const std::string &filename, const std::string &vehicleTypes, const std::string &name, const double timeThreshold, double speedThreshold, bool blockMovement)
Builds a multi entry exit detector (E3)
static GNEAdditional * buildCalibratorRoute(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &routeID, const std::vector< GNEEdge *> &edges, const RGBColor &color)
GNEAdditionalHandler(const std::string &file, GNEViewNet *viewNet, bool undoAdditionals=true, GNEAdditional *additionalParent=nullptr)
Constructor.
SAX-handler base for SUMO-files.
GNEAdditional * retrieveAdditionalParent(GNEViewNet *viewNet, SumoXMLTag expectedTag) const
retrieve additional parent correspond to current status of myInsertedElements
double getPosition(double pos, GNELane &lane, bool friendlyPos, const std::string &additionalID)
extracts the position, checks whether it shall be mirrored and checks whether it is within the lane...
static GNEAdditional * buildContainerStop(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNELane *lane, const std::string &startPos, const std::string &endPos, const std::string &name, const std::vector< std::string > &lines, bool friendlyPosition, bool blockMovement)
Builds a container stop.
static GNEAdditional * buildClosingReroute(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *rerouterIntervalParent, GNEEdge *closedEdge, SVCPermissions permissions)
Builds trigger objects for GNENet (busStops, chargingStations, detectors, etc..)
void parseAndBuildVariableSpeedSign(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Variable Speed Signal (lane speed trigger)
HierarchyInsertedElements myParentElements
HierarchyInsertedElements used for insert childs.
void parseAndBuildDetectorE2(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a lane area detector (E2)
static GNEAdditional * builDestProbReroute(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *rerouterIntervalParent, GNEEdge *newEdgeDestination, double probability)
static GNEAdditional * buildDetectorE1Instant(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNELane *lane, double pos, const std::string &filename, const std::string &vehicleTypes, const std::string &name, bool friendlyPos, bool blockMovement)
Builds a Instant Induction Loop Detector (E1Instant)
static GNEAdditional * buildDetectorEntry(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *E3Parent, GNELane *lane, double pos, bool friendlyPos, bool blockMovement)
Builds a entry detector (E3)
static GNEAdditional * buildRouteProbReroute(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *rerouterIntervalParent, const std::string &newRouteId, double probability)
void parseAndBuildDetectorE1Instant(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Instant induction loop detector (E1Instant)
~GNEAdditionalHandler()
Destructor.
void parseAndBuildCalibratorVehicleType(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses vehicle type values of Calibrators.
static bool checkOverlappingRerouterIntervals(GNEAdditional *rerouter, double newBegin, double newEnd)
check if an overlapping is produced in rerouter if a interval with certain begin and end is inserted ...
void parseAndBuildRerouterInterval(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Rerouter Interval.
static GNEAdditional * buildChargingStation(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNELane *lane, const std::string &startPos, const std::string &endPos, const std::string &name, double chargingPower, double efficiency, bool chargeInTransit, double chargeDelay, bool friendlyPosition, bool blockMovement)
Builds a charging Station.
Encapsulated SAX-Attributes.
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:39
static GNEAdditional * buildAccess(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *busStop, GNELane *lane, const std::string &pos, const std::string &length, bool friendlyPos, bool blockMovement)
Builds an Access.
static GNEAdditional * buildDetectorE1(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNELane *lane, double pos, double freq, const std::string &filename, const std::string &vehicleTypes, const std::string &name, bool friendlyPos, bool blockMovement)
Builds a induction loop detector (E1)
void parseAndBuildRerouter(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a rerouter.
void parseAndBuildCalibratorRoute(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses route values of Calibrators.
static GNEAdditional * buildRerouterInterval(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *rerouterParent, double begin, double end)
builds a rerouter interval
GNEViewNet * myViewNet
pointer to View&#39;s Net
static bool accessCanBeCreated(GNEAdditional *busStopParent, GNEEdge &edge)
check if a GNEAccess can be created in a certain Edge
void parseAndBuildDetectorE3(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a multi entry exit detector (E3)
static GNEAdditional * buildRerouter(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, Position pos, const std::vector< GNEEdge *> &edges, double prob, const std::string &name, const std::string &file, bool off, double timeThreshold, const std::string &vTypes, bool blockMovement)
builds a rerouter
void parseAndBuildRouteProbe(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds routeProbe.
static GNEAdditional * buildParkingSpace(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *parkingAreaParent, double x, double y, double z, double width, double length, double angle, bool blockMovement)
Builds a Parking Space.
void parseAndBuildRerouterDestProbReroute(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Destiny Prob Reroute.
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:50
void parseAndBuildCalibrator(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a mesoscopic or microscopic calibrator.
void parseAndBuildVariableSpeedSignStep(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Variable Speed Signal Step.
void parseGenericParameter(const SUMOSAXAttributes &attrs)
Parse generic parameter and insert it in the last created additional.
static GNEAdditional * buildParkingArea(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNELane *lane, const std::string &startPos, const std::string &endPos, const std::string &name, bool friendlyPosition, int roadSideCapacity, double width, const std::string &length, double angle, bool blockMovement)
Builds a Parking Area.
void parseAndBuildBusStop(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a bus stop.
void parseAndBuildContainerStop(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a container stop.
SUMOVehicleShape
Definition of vehicle classes to differ between different appearences.
static GNEAdditional * builParkingAreaReroute(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *rerouterIntervalParent, GNEAdditional *newParkignArea, double probability, bool visible)
static bool fixE2DetectorPositionPosition(double &pos, double &length, const double laneLength, const bool friendlyPos)
check if the position of a detector over a lane is valid
An Element which don&#39;t belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:53
static GNEAdditional * buildAdditional(GNEViewNet *viewNet, bool allowUndoRedo, SumoXMLTag tag, std::map< SumoXMLAttr, std::string > values)
Build additionals.
void parseAndBuildCalibratorFlow(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses flow values of Calibrators.
GNEAdditional * myAdditionalParent
pointer to parent additional (used for loading additional childs placed in a different XML) ...
static GNEAdditional * buildVaporizer(GNEViewNet *viewNet, bool allowUndoRedo, GNEEdge *edge, double startTime, double end, const std::string &name)
Builds a vaporizer (lane speed trigger)
GNEAdditional * myLastInsertedAdditional
pointer to last inserted additional (used for generic parameters)
void parseAndBuildVaporizer(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Builds a vaporization.
std::vector< std::pair< SumoXMLTag, std::string > > myInsertedElements
vector used as stack
void parseAndBuildRerouterClosingLaneReroute(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Closing Lane reroute.
static GNEAdditional * buildRouteProbe(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNEEdge *edge, const std::string &freq, const std::string &name, const std::string &file, double begin)
builds a Route probe
void parseAndBuildParkingArea(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a parking area.
static GNEAdditional * buildCalibratorFlow(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *calibratorParent, GNEAdditional *route, GNEAdditional *vtype, const std::string &vehsPerHour, const std::string &speed, const RGBColor &color, const std::string &departLane, const std::string &departPos, const std::string &departSpeed, const std::string &arrivalLane, const std::string &arrivalPos, const std::string &arrivalSpeed, const std::string &line, int personNumber, int containerNumber, bool reroute, const std::string &departPosLat, const std::string &arrivalPosLat, double begin, double end)
void parseAndBuildAccess(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses values and adds access to the current bus stop.
static GNEAdditional * buildBusStop(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNELane *lane, const std::string &startPos, const std::string &endPos, const std::string &name, const std::vector< std::string > &lines, bool friendlyPosition, bool blockMovement)
Builds a bus stop.
void myEndElement(int element)
Called when a closing tag occurs.
static GNEAdditional * buildVariableSpeedSignStep(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *VSSParent, double time, double speed)
Builds a VariableSpeedSign Step.
void insertElement(SumoXMLTag tag)
insert new element (called only in function myStartElement)
void popElement()
pop last inserted element (used only in function myEndElement)
static GNEAdditional * buildClosingLaneReroute(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *rerouterIntervalParent, GNELane *closedLane, SVCPermissions permissions)
static GNEAdditional * buildDetectorExit(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *E3Parent, GNELane *lane, double pos, bool friendlyPos, bool blockMovement)
Builds a exit detector (E3)
void parseAndBuildDetectorEntry(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Entry detector.
void parseAndBuildRerouterClosingReroute(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Closing Reroute.