Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEDetector.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18//
19/****************************************************************************/
20#include <config.h>
21
22#include <netedit/GNENet.h>
23#include <netedit/GNESegment.h>
24#include <netedit/GNEViewNet.h>
31
32#include "GNEDetector.h"
33
34
35// ===========================================================================
36// member method definitions
37// ===========================================================================
38
39GNEDetector::GNEDetector(const std::string& id, GNENet* net, GUIGlObjectType type, SumoXMLTag tag, FXIcon* icon, const double pos,
40 const SUMOTime period, const std::vector<GNELane*>& parentLanes, const std::string& filename,
41 const std::vector<std::string>& vehicleTypes, const std::vector<std::string>& nextEdges,
42 const std::string& detectPersons, const std::string& name, const bool friendlyPos,
43 const Parameterised::Map& parameters) :
44 GNEAdditional(id, net, type, tag, icon, name, {}, {}, parentLanes, {}, {}, {}),
45 Parameterised(parameters),
46 myPositionOverLane(pos),
47 myPeriod(period),
48 myFilename(filename),
49 myVehicleTypes(vehicleTypes),
50 myNextEdges(nextEdges),
51 myDetectPersons(detectPersons),
52myFriendlyPosition(friendlyPos) {
53}
54
55
56GNEDetector::GNEDetector(GNEAdditional* additionalParent, GNENet* net, GUIGlObjectType type, SumoXMLTag tag, FXIcon* icon,
57 const double pos, const SUMOTime period, const std::vector<GNELane*>& parentLanes, const std::string& filename,
58 const std::string& name, const bool friendlyPos, const Parameterised::Map& parameters) :
59 GNEAdditional(net, type, tag, icon, name, {}, {}, parentLanes, {additionalParent}, {}, {}),
60Parameterised(parameters),
61myPositionOverLane(pos),
62myPeriod(period),
63myFilename(filename),
64myFriendlyPosition(friendlyPos) {
65}
66
67
69
70
73 // check modes and detector type
75 return nullptr;
80 } else {
81 // return move operation for detectors with single position placed over shape (E1, EntryExits..)
82 return new GNEMoveOperation(this, getParentLanes().front(), myPositionOverLane,
84 }
85}
86
87
88double
92
93
94bool
96 // get edit modes
97 const auto& editModes = myNet->getViewNet()->getEditModes();
98 // check if we're in move mode
99 if (!myNet->getViewNet()->isCurrentlyMovingElements() && editModes.isCurrentSupermodeNetwork() &&
101 (editModes.networkEditMode == NetworkEditMode::NETWORK_MOVE) && myNet->getViewNet()->checkOverLockedElement(this, mySelected)) {
102 // only move the first element
104 // special case for multiple lane area detectors
106 auto segment = gViewObjectsHandler.getSelectedSegment(this);
107 if (segment && segment->getJunction()) {
108 return false;
109 } else if (segment && segment->getLane()) {
110 // ensure that is the first or the last lane
111 if (segment->getLaneIndex() == 0) {
112 return true;
113 } else if (segment->getLaneIndex() == ((int)getParentLanes().size() - 1)) {
114 return true;
115 }
116 } else {
117 // this is the start or end point
118 return true;
119 }
120 } else {
121 return true;
122 }
123 }
124 }
125 return false;
126}
127
128
129GNELane*
131 return getParentLanes().front();
132}
133
134
139
140
141void
142GNEDetector::updateCenteringBoundary(const bool /*updateGrid*/) {
143 // nothing to update
144}
145
146void
147GNEDetector::splitEdgeGeometry(const double splitPosition, const GNENetworkElement* originalElement,
148 const GNENetworkElement* newElement, GNEUndoList* undoList) {
149 // only split geometry of E2 multilane detectors
151 // obtain new list of E2 lanes
152 std::string newE2Lanes = getNewListOfParents(originalElement, newElement);
153 // update E2 Lanes
154 if (newE2Lanes.size() > 0) {
155 setAttribute(SUMO_ATTR_LANES, newE2Lanes, undoList);
156 }
157 } else if (splitPosition < myPositionOverLane) {
158 // change lane
159 setAttribute(SUMO_ATTR_LANE, newElement->getID(), undoList);
160 // now adjust start position
161 setAttribute(SUMO_ATTR_POSITION, toString(myPositionOverLane - splitPosition), undoList);
162 }
163}
164
165
166double
168 double fixedPos = myPositionOverLane;
169 const double len = getLane()->getParentEdge()->getNBEdge()->getFinalLength();
170 double length = 0;
171 GNEAdditionalHandler::fixLanePosition(fixedPos, length, len);
172 return (fixedPos * getLane()->getLengthGeometryFactor());
173}
174
175
176
177std::string
179 return getLane()->getID();
180}
181
182
187
188
189std::string
191 return getTagStr() + ": " + getID();
192}
193
194
195std::string
197 return getTagStr();
198}
199
200
201std::string
203 switch (key) {
204 case SUMO_ATTR_ID:
205 return getMicrosimID();
206 case SUMO_ATTR_LANE:
207 return getParentLanes().front()->getID();
210 case SUMO_ATTR_PERIOD:
212 return "";
213 } else {
214 return time2string(myPeriod);
215 }
216 case SUMO_ATTR_NAME:
217 return myAdditionalName;
218 case SUMO_ATTR_FILE:
219 return myFilename;
220 case SUMO_ATTR_VTYPES:
221 return toString(myVehicleTypes);
223 return toString(myNextEdges);
229 return getParametersStr();
231 return "";
232 default:
233 return getCommonAttribute(key);
234 }
235}
236
237
238double
240 switch (key) {
242 return myPositionOverLane;
243 default:
244 throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
245 }
246}
247
248
249void
250GNEDetector::setDetectorAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) {
251 switch (key) {
252 case SUMO_ATTR_ID:
253 case SUMO_ATTR_LANE:
255 case SUMO_ATTR_PERIOD:
256 case SUMO_ATTR_NAME:
257 case SUMO_ATTR_FILE:
258 case SUMO_ATTR_VTYPES:
264 GNEChange_Attribute::changeAttribute(this, key, value, undoList);
265 break;
266 default:
267 setCommonAttribute(key, value, undoList);
268 break;
269 }
270}
271
272
273
274bool
275GNEDetector::isDetectorValid(SumoXMLAttr key, const std::string& value) {
276 switch (key) {
277 case SUMO_ATTR_ID:
278 return isValidDetectorID(value);
279 case SUMO_ATTR_LANE:
280 if (myNet->getAttributeCarriers()->retrieveLane(value, false) != nullptr) {
281 return true;
282 } else {
283 return false;
284 }
286 return canParse<double>(value) && fabs(parse<double>(value)) < getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength();
287 case SUMO_ATTR_PERIOD:
288 if (value.empty()) {
289 return true;
290 } else {
291 return (canParse<double>(value) && (parse<double>(value) >= 0));
292 }
293 case SUMO_ATTR_NAME:
295 case SUMO_ATTR_FILE:
297 case SUMO_ATTR_VTYPES:
298 if (value.empty()) {
299 return true;
300 } else {
302 }
304 if (value.empty()) {
305 return true;
306 } else {
308 }
310 if (value.empty()) {
311 return true;
312 } else {
314 }
316 return canParse<bool>(value);
318 return areParametersValid(value);
319 default:
320 return isCommonValid(key, value);
321 }
322}
323
324
325void
327 if (myPeriod > 0) {
329 }
330 if (myAdditionalName.size() > 0) {
332 }
333 if (myFilename.size() > 0) {
335 }
336 if (myVehicleTypes.size() > 0) {
338 }
339 if (myNextEdges.size() > 0) {
341 }
344 }
345 if (myFriendlyPosition) {
346 device.writeAttr(SUMO_ATTR_FRIENDLY_POS, true);
347 }
348}
349
350
351void
352GNEDetector::setDetectorAttribute(SumoXMLAttr key, const std::string& value) {
353 switch (key) {
354 case SUMO_ATTR_ID:
355 // update microsimID
356 setAdditionalID(value);
357 break;
358 case SUMO_ATTR_LANE:
360 break;
362 myPositionOverLane = parse<double>(value);
363 break;
364 case SUMO_ATTR_PERIOD:
365 if (value.empty()) {
367 } else {
368 myPeriod = string2time(value);
369 }
370 break;
371 case SUMO_ATTR_FILE:
372 myFilename = value;
373 break;
374 case SUMO_ATTR_NAME:
375 myAdditionalName = value;
376 break;
377 case SUMO_ATTR_VTYPES:
378 myVehicleTypes = parse<std::vector<std::string> >(value);
379 break;
381 myNextEdges = parse<std::vector<std::string> >(value);
382 break;
384 myDetectPersons = value;
385 break;
387 myFriendlyPosition = parse<bool>(value);
388 break;
390 setParametersStr(value);
391 break;
394 break;
395 default:
396 setCommonAttribute(key, value);
397 break;
398 }
399}
400
401
402void
404 const RGBColor& mainColor, const RGBColor& secondColor) const {
405 // push matrix
407 // set line width
408 glLineWidth(1.0);
409 // translate to center geometry
410 glTranslated(myAdditionalGeometry.getShape().front().x(), myAdditionalGeometry.getShape().front().y(), 0);
411 // rotate over lane
413 // scale
414 glScaled(exaggeration, exaggeration, 1);
415 // set main color
416 GLHelper::setColor(mainColor);
417 // begin draw square
418 glBegin(GL_QUADS);
419 // draw square
420 glVertex2d(-1.0, 2);
421 glVertex2d(-1.0, -2);
422 glVertex2d(1.0, -2);
423 glVertex2d(1.0, 2);
424 // end draw square
425 glEnd();
426 // move top
427 glTranslated(0, 0, .01);
428 // begin draw line
429 glBegin(GL_LINES);
430 // draw lines
431 glVertex2d(0, 2 - .1);
432 glVertex2d(0, -2 + .1);
433 // end draw line
434 glEnd();
435 // draw center only in draw in level 2
437 // set main color
438 GLHelper::setColor(secondColor);
439 // set polygon mode
440 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
441 // begin draw square
442 glBegin(GL_QUADS);
443 // draw square
444 glVertex2f(-1.0, 2);
445 glVertex2f(-1.0, -2);
446 glVertex2f(1.0, -2);
447 glVertex2f(1.0, 2);
448 // end draw square
449 glEnd();
450 // rotate 90 degrees
451 glRotated(90, 0, 0, -1);
452 //set polygon mode
453 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
454 // begin draw line
455 glBegin(GL_LINES);
456 // draw line
457 glVertex2d(0, 1.7);
458 glVertex2d(0, -1.7);
459 // end draw line
460 glEnd();
461 //arrow
462 glTranslated(2, 0, 0);
463 GLHelper::setColor(mainColor);
464 GLHelper::drawTriangleAtEnd(Position(0, 0), Position(0.5, 0), (double) 0.5, (double) 1);
465 }
466 // pop matrix
468}
469
470
471void
473 const double exaggeration, const std::string& logo, const RGBColor& textColor) const {
474 // only draw in level 2
476 // calculate position
477 const Position pos = myAdditionalGeometry.getShape().front();
478 // calculate rotation
479 const double rot = s.getTextAngle(myAdditionalGeometry.getShapeRotations().front() + 90);
480 // Start pushing matrix
482 // Traslate to position
483 glTranslated(pos.x(), pos.y(), 0.1);
484 // scale text
485 glScaled(exaggeration, exaggeration, 1);
486 // draw E1 logo
487 GLHelper::drawText(logo + " ", Position(), .1, 1.5, textColor, rot);
488 // pop matrix
490 }
491}
492
493
494void
496 const double exaggeration, const std::string& logo, const RGBColor& textColor) const {
497 // only draw in level 2
499 // calculate middle point
500 const double middlePoint = (myAdditionalGeometry.getShape().length2D() * 0.5);
501 // calculate position
502 const Position pos = myAdditionalGeometry.getShape().positionAtOffset2D(middlePoint);
503 // calculate rotation
504 const double rot = s.getTextAngle(myAdditionalGeometry.getShape().rotationDegreeAtOffset(middlePoint) + 90);
505 // Start pushing matrix
507 // Traslate to position
508 glTranslated(pos.x(), pos.y(), 0.1);
509 // scale text
510 glScaled(exaggeration, exaggeration, 1);
511 // draw E1 logo
512 GLHelper::drawText(logo, Position(), .1, 1.5, textColor, rot);
513 // pop matrix
515 }
516}
517
518/****************************************************************************/
@ NETWORK_MOVE
mode for moving network elements
long long int SUMOTime
Definition GUI.h:36
GUIGlObjectType
GUIViewObjectsHandler gViewObjectsHandler
SUMOTime string2time(const std::string &r)
convert string to SUMOTime
Definition SUMOTime.cpp:46
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
Definition SUMOTime.cpp:69
#define SUMOTime_MAX_PERIOD
Definition SUMOTime.h:36
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ GNE_TAG_MULTI_LANE_AREA_DETECTOR
an e2 detector over multiple lanes (placed here due create Additional Frame)
@ SUMO_TAG_LANE_AREA_DETECTOR
alternative tag for e2 detector
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_LANE
@ SUMO_ATTR_NEXT_EDGES
@ SUMO_ATTR_FILE
@ SUMO_ATTR_ENDPOS
@ GNE_ATTR_PARAMETERS
parameters "key1=value1|key2=value2|...|keyN=valueN"
@ SUMO_ATTR_LANES
@ SUMO_ATTR_VTYPES
@ SUMO_ATTR_NAME
@ SUMO_ATTR_PERIOD
@ SUMO_ATTR_FRIENDLY_POS
@ SUMO_ATTR_ID
@ SUMO_ATTR_POSITION
@ GNE_ATTR_SHIFTLANEINDEX
shift lane index (only used by elements over lanes)
@ SUMO_ATTR_DETECT_PERSONS
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition ToString.h:46
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
Definition GLHelper.cpp:649
static void drawTriangleAtEnd(const Position &p1, const Position &p2, double tLength, double tWidth, const double extraOffset=0)
Draws a triangle at the end of the given line.
Definition GLHelper.cpp:624
static void popMatrix()
pop matrix
Definition GLHelper.cpp:131
static void pushMatrix()
push matrix
Definition GLHelper.cpp:118
static void drawText(const std::string &text, const Position &pos, const double layer, const double size, const RGBColor &col=RGBColor::BLACK, const double angle=0, const int align=0, double width=-1)
Definition GLHelper.cpp:751
static void fixLanePosition(double &pos, double &length, const double laneLength)
fix given position over lane
An Element which don't belong to GNENet but has influence in the simulation.
void setAdditionalID(const std::string &newID)
set additional ID
GUIGeometry myAdditionalGeometry
geometry to be precomputed in updateGeometry(...)
bool isValidDetectorID(const std::string &value) const
check if a new detector ID is valid
void replaceAdditionalParentLanes(const std::string &value)
replace additional parent lanes
void shiftLaneIndex()
shift lane index
GNEMoveOperation * getMoveOperationMultiLane(const double startPos, const double endPos)
get moveOperation for an element over multi lane
std::string myAdditionalName
name of additional
GNEMoveOperation * getMoveOperationSingleLane(const double startPos, const double endPos)
get moveOperation for an element over single lane
const std::string getID() const
get ID (all Attribute Carriers have one)
bool mySelected
boolean to check if this AC is selected (more quickly as checking GUIGlObjectStorage)
void setCommonAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
const std::string & getTagStr() const
get tag assigned to this object in string format
bool isCommonValid(SumoXMLAttr key, const std::string &value)
GNENet * myNet
pointer to net
std::string getCommonAttribute(SumoXMLAttr key) const
const GNETagProperties & myTagProperty
reference to tagProperty associated with this attribute carrier
static void changeAttribute(GNEAttributeCarrier *AC, SumoXMLAttr key, const std::string &value, GNEUndoList *undoList, const bool force=false)
change attribute
SUMOTime myPeriod
The aggregation period the values the detector collects shall be summed up.
void drawE2DetectorLogo(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const double exaggeration, const std::string &logo, const RGBColor &textColor) const
draw E2 detector Logo
std::string myFilename
The path to the output file.
double myPositionOverLane
position of detector over Lane
Position getPositionInView() const
Returns position of additional in view.
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
GNEDetector(const std::string &id, GNENet *net, GUIGlObjectType type, SumoXMLTag tag, FXIcon *icon, const double pos, const SUMOTime period, const std::vector< GNELane * > &parentLanes, const std::string &filename, const std::vector< std::string > &vehicleTypes, const std::vector< std::string > &nextEdges, const std::string &detectPersons, const std::string &name, const bool friendlyPos, const Parameterised::Map &parameters)
Constructor.
~GNEDetector()
Destructor.
bool isDetectorValid(SumoXMLAttr key, const std::string &value)
double getPositionOverLane() const
get position over lane
double getGeometryPositionOverLane() const
get position over lane that is applicable to the shape
GNELane * getLane() const
get lane
virtual double getAttributeDouble(SumoXMLAttr key) const =0
void setDetectorAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
std::vector< std::string > myNextEdges
next edges
GNEMoveOperation * getMoveOperation()
get move operation
void drawE1Shape(const GUIVisualizationSettings::Detail d, const double exaggeration, const RGBColor &mainColor, const RGBColor &secondColor) const
draw E1 shape
const Parameterised::Map & getACParametersMap() const
get parameters map
double getDetectorAttributeDouble(SumoXMLAttr key) const
bool checkDrawMoveContour() const
check if draw move contour (red)
void writeDetectorValues(OutputDevice &device) const
write additional element into a xml file
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList)
split geometry
bool myFriendlyPosition
Flag for friendly position.
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
std::string getDetectorAttribute(SumoXMLAttr key) const
std::vector< std::string > myVehicleTypes
attribute vehicle types
void drawE1DetectorLogo(const GUIVisualizationSettings &s, const GUIVisualizationSettings::Detail d, const double exaggeration, const std::string &logo, const RGBColor &textColor) const
draw E1 detector Logo
std::string myDetectPersons
detect persons
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
method for setting the attribute and letting the object perform additional changes
std::string getParentName() const
Returns the name of the parent object.
NBEdge * getNBEdge() const
returns the internal NBEdge
Definition GNEEdge.cpp:781
std::string getNewListOfParents(const GNENetworkElement *currentElement, const GNENetworkElement *newNextElement) const
if use edge/parent lanes as a list of consecutive elements, obtain a list of IDs of elements after in...
const std::vector< GNELane * > & getParentLanes() const
get parent lanes
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition GNELane.h:46
GNEEdge * getParentEdge() const
get parent edge
Definition GNELane.cpp:196
bool getAllowChangeLane() const
allow change lane
CommonModeOptions * getCommonModeOptions() const
get common mode options
move operation
GNELane * retrieveLane(const std::string &id, bool hardFail=true, bool checkVolatileChange=false) const
get lane by id
A NBNetBuilder extended by visualisation and editing capabilities.
Definition GNENet.h:42
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
Definition GNENet.cpp:127
GNEViewNet * getViewNet() const
get view net
Definition GNENet.cpp:2163
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
const GUIGlObject * getGUIGlObjectFront() const
get front GUIGLObject or a pointer to nullptr
bool isCurrentlyMovingElements() const
check if an element is being moved
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
const GNEViewNetHelper::EditNetworkElementShapes & getEditNetworkElementShapes() const
get Edit Shape module
GNEViewParent * getViewParent() const
get the net object
bool checkOverLockedElement(const GUIGlObject *GLObject, const bool isSelected) const
check if given element is locked (used for drawing select and delete contour)
const GNEViewNetHelper::ViewObjectsSelector & getViewObjectsSelector() const
get objects under cursor
GNEMoveFrame * getMoveFrame() const
get frame for move elements
static void rotateOverLane(const double rot)
rotate over lane (used by Lock icons, detector logos, etc.)
const std::vector< double > & getShapeRotations() const
The rotations of the single shape parts.
const PositionVector & getShape() const
The shape of the additional element.
const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
const GNESegment * getSelectedSegment(const GUIGlObject *GLObject) const
get segment associated with the given GLObject (if exist)
Stores the information about how to visualize structures.
double getTextAngle(double objectAngle) const
return an angle that is suitable for reading text aligned with the given angle (degrees)
double getFinalLength() const
get length that will be assigned to the lanes in the final network
Definition NBEdge.cpp:4715
Static storage of an output device and its base (abstract) implementation.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
An upper class for objects with additional parameters.
static bool areParametersValid(const std::string &value, bool report=false, const std::string kvsep="=", const std::string sep="|")
check if given string can be parsed to a parameters map "key1=value1|key2=value2|....
std::map< std::string, std::string > Map
parameters map
void setParametersStr(const std::string &paramsString, const std::string kvsep="=", const std::string sep="|")
set the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN"
const Parameterised::Map & getParametersMap() const
Returns the inner key/value map.
std::string getParametersStr(const std::string kvsep="=", const std::string sep="|") const
Returns the inner key/value map in string format "key1=value1|key2=value2|...|keyN=valueN".
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
double x() const
Returns the x-position.
Definition Position.h:55
double y() const
Returns the y-position.
Definition Position.h:60
double length2D() const
Returns the length.
Position getPolygonCenter() const
Returns the arithmetic of all corner points.
double rotationDegreeAtOffset(double pos) const
Returns the rotation at the given length.
Position positionAtOffset2D(double pos, double lateralOffset=0) const
Returns the position at the given length.
static StringBijection< PersonMode > PersonModeValues
person modes
static bool isValidListOfNetIDs(const std::string &value)
whether the given string is a valid list of id for a network (empty aren't allowed)
static bool isValidFilename(const std::string &value)
whether the given string is a valid attribute for a filename (for example, a name)
static bool isValidListOfTypeID(const std::string &value)
whether the given string is a valid list of ids for an edge or vehicle type (empty aren't allowed)
static bool isValidAttribute(const std::string &value)
whether the given string is a valid attribute for a certain key (for example, a name)
const std::string & getString(const T key) const
bool hasString(const std::string &str) const
static std::string escapeXML(const std::string &orig, const bool maskDoubleHyphen=false)
Replaces the standard escapes by their XML entities.
NetworkEditMode networkEditMode
the current Network edit mode
bool isCurrentSupermodeNetwork() const
@check if current supermode is Network
GNENetworkElement * getEditedNetworkElement() const
pointer to edited network element