Eclipse SUMO - Simulation of Urban MObility
GNEDetectorE3.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-2022 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 <netedit/GNENet.h>
21 #include <netedit/GNEUndoList.h>
23 
24 #include "GNEDetectorE3.h"
25 
26 
27 // ===========================================================================
28 // member method definitions
29 // ===========================================================================
30 
33 {}, {}, {}, {}, {}, {}),
34 myPeriod(0),
35 myFilename(""),
36 myTimeThreshold(0),
37 mySpeedThreshold(0) {
38  // reset default values
39  resetDefaultValues();
40 }
41 
42 
43 GNEDetectorE3::GNEDetectorE3(const std::string& id, GNENet* net, const Position pos, const SUMOTime freq, const std::string& filename,
44  const std::vector<std::string>& vehicleTypes, const std::string& name, SUMOTime timeThreshold, double speedThreshold,
45  const Parameterised::Map& parameters) :
47 {}, {}, {}, {}, {}, {}),
48 Parameterised(parameters),
49 myPosition(pos),
50 myPeriod(freq),
51 myFilename(filename),
52 myVehicleTypes(vehicleTypes),
53 myTimeThreshold(timeThreshold),
54 mySpeedThreshold(speedThreshold) {
55  // update centering boundary without updating grid
56  updateCenteringBoundary(false);
57 }
58 
59 
61 
62 
65  // return move operation for additional placed in view
66  return new GNEMoveOperation(this, myPosition);
67 }
68 
69 
70 void
72  bool entry = false;
73  bool exit = false;
74  // first check if E3 has at least one entry and one exit
75  for (const auto& additionalChild : getChildAdditionals()) {
76  if (additionalChild->getTagProperty().getTag() == SUMO_TAG_DET_ENTRY) {
77  entry = true;
78  } else if (additionalChild->getTagProperty().getTag() == SUMO_TAG_DET_EXIT) {
79  exit = true;
80  }
81  }
82  // check entry/exits
83  if (entry && exit) {
84  device.openTag(getTagProperty().getTag());
85  device.writeAttr(SUMO_ATTR_ID, getID());
86  if (!myAdditionalName.empty()) {
88  }
90  if (getAttribute(SUMO_ATTR_PERIOD).size() > 0) {
92  }
93  if (myFilename.size() > 0) {
95  }
96  if (myVehicleTypes.size() > 0) {
98  }
101  }
104  }
105  // write all entry/exits
106  for (const auto& access : getChildAdditionals()) {
107  access->writeAdditional(device);
108  }
109  // write parameters (Always after children to avoid problems with additionals.xsd)
110  writeParams(device);
111  device.closeTag();
112  } else {
113  WRITE_WARNING(myTagProperty.getTagStr() + " '" + getID() + "' needs at least one entry and one exit");
114  }
115 }
116 
117 
118 void
120  // update additional geometry
122 }
123 
124 
125 Position
127  return myPosition;
128 }
129 
130 
131 void
133  // remove additional from grid
134  if (updateGrid) {
136  }
137  // now update geometry
138  updateGeometry();
139  // add shape boundary
141  // add positions of all childrens
142  for (const auto& additionalChildren : getChildAdditionals()) {
143  myAdditionalBoundary.add(additionalChildren->getPositionInView());
144  }
145  // grow
147  // add additional into RTREE again
148  if (updateGrid) {
149  myNet->addGLObjectIntoGrid(this);
150  }
151 }
152 
153 
154 void
155 GNEDetectorE3::splitEdgeGeometry(const double /*splitPosition*/, const GNENetworkElement* /*originalElement*/, const GNENetworkElement* /*newElement*/, GNEUndoList* /*undoList*/) {
156  // geometry of this element cannot be splitted
157 }
158 
159 
160 std::string
162  return myNet->getMicrosimID();
163 }
164 
165 
166 void
168  // draw parent and child lines
170  // draw E3
172 }
173 
174 
175 std::string
177  switch (key) {
178  case SUMO_ATTR_ID:
179  return getMicrosimID();
180  case SUMO_ATTR_POSITION:
181  return toString(myPosition);
182  case SUMO_ATTR_PERIOD:
183  if (myPeriod == SUMOTime_MAX_PERIOD) {
184  return "";
185  } else {
186  return time2string(myPeriod);
187  }
188  case SUMO_ATTR_NAME:
189  return myAdditionalName;
190  case SUMO_ATTR_FILE:
191  return myFilename;
192  case SUMO_ATTR_VTYPES:
193  return toString(myVehicleTypes);
197  return toString(mySpeedThreshold);
198  case GNE_ATTR_SELECTED:
200  case GNE_ATTR_PARAMETERS:
201  return getParametersStr();
202  default:
203  throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
204  }
205 }
206 
207 
208 double
210  throw InvalidArgument(getTagStr() + " doesn't have a double attribute of type '" + toString(key) + "'");
211 }
212 
213 
214 const Parameterised::Map&
216  return getParametersMap();
217 }
218 
219 
220 void
221 GNEDetectorE3::setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) {
222  if (value == getAttribute(key)) {
223  return; //avoid needless changes, later logic relies on the fact that attributes have changed
224  }
225  switch (key) {
226  case SUMO_ATTR_ID:
227  case SUMO_ATTR_PERIOD:
228  case SUMO_ATTR_POSITION:
229  case SUMO_ATTR_NAME:
230  case SUMO_ATTR_FILE:
231  case SUMO_ATTR_VTYPES:
234  case GNE_ATTR_SELECTED:
235  case GNE_ATTR_PARAMETERS:
236  undoList->changeAttribute(new GNEChange_Attribute(this, key, value));
237  break;
238  default:
239  throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
240  }
241 }
242 
243 
244 bool
245 GNEDetectorE3::isValid(SumoXMLAttr key, const std::string& value) {
246  switch (key) {
247  case SUMO_ATTR_ID:
248  return isValidDetectorID(value);
249  case SUMO_ATTR_POSITION:
250  return canParse<Position>(value);
251  case SUMO_ATTR_PERIOD:
252  if (value.empty()) {
253  return true;
254  } else {
255  return (canParse<double>(value) && (parse<double>(value) >= 0));
256  }
257  case SUMO_ATTR_NAME:
259  case SUMO_ATTR_FILE:
261  case SUMO_ATTR_VTYPES:
262  if (value.empty()) {
263  return true;
264  } else {
266  }
268  return canParse<SUMOTime>(value);
270  return canParse<double>(value) && (parse<double>(value) >= 0);
271  case GNE_ATTR_SELECTED:
272  return canParse<bool>(value);
273  case GNE_ATTR_PARAMETERS:
274  return areParametersValid(value);
275  default:
276  throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
277  }
278 }
279 
280 
281 bool
283  int numEntrys = 0;
284  int numExits = 0;
285  // iterate over additional chidls and obtain number of entrys and exits
286  for (auto i : getChildAdditionals()) {
287  if (i->getTagProperty().getTag() == SUMO_TAG_DET_ENTRY) {
288  numEntrys++;
289  } else if (i->getTagProperty().getTag() == SUMO_TAG_DET_EXIT) {
290  numExits++;
291  }
292  }
293  // write warnings
294  if (numEntrys == 0) {
295  WRITE_WARNING("An " + toString(SUMO_TAG_E3DETECTOR) + " need at least one " + toString(SUMO_TAG_DET_ENTRY) + " detector");
296  }
297  if (numExits == 0) {
298  WRITE_WARNING("An " + toString(SUMO_TAG_E3DETECTOR) + " need at least one " + toString(SUMO_TAG_DET_EXIT) + " detector");
299  }
300  // return false depending of number of Entrys and Exits
301  return ((numEntrys != 0) && (numExits != 0));
302 }
303 
304 
305 std::string
307  return getTagStr() + ":" + getID();
308 }
309 
310 
311 std::string
313  return getTagStr();
314 }
315 
316 // ===========================================================================
317 // private
318 // ===========================================================================
319 
320 void
321 GNEDetectorE3::setAttribute(SumoXMLAttr key, const std::string& value) {
322  switch (key) {
323  case SUMO_ATTR_ID:
324  // update microsimID
325  setMicrosimID(value);
326  // Change IDs of all Entry/Exits children
327  for (const auto& entryExit : getChildAdditionals()) {
328  entryExit->setMicrosimID(getID());
329  }
330  break;
331  case SUMO_ATTR_POSITION:
332  myPosition = parse<Position>(value);
333  // update boundary (except for template)
334  if (getID().size() > 0) {
336  }
337  break;
338  case SUMO_ATTR_PERIOD:
339  if (value.empty()) {
341  } else {
342  myPeriod = string2time(value);
343  }
344  break;
345  case SUMO_ATTR_NAME:
346  myAdditionalName = value;
347  break;
348  case SUMO_ATTR_FILE:
349  myFilename = value;
350  break;
351  case SUMO_ATTR_VTYPES:
352  myVehicleTypes = parse<std::vector<std::string> >(value);
353  break;
355  myTimeThreshold = parse<SUMOTime>(value);
356  break;
358  mySpeedThreshold = parse<double>(value);
359  break;
360  case GNE_ATTR_SELECTED:
361  if (parse<bool>(value)) {
363  } else {
365  }
366  break;
367  case GNE_ATTR_PARAMETERS:
368  setParametersStr(value);
369  break;
370  default:
371  throw InvalidArgument(getTagStr() + " doesn't have an attribute of type '" + toString(key) + "'");
372  }
373 }
374 
375 
376 void
378  // update position
379  myPosition = moveResult.shapeToUpdate.front();
380  // update geometry
381  updateGeometry();
382 }
383 
384 
385 void
387  undoList->begin(GUIIcon::E3, "position of " + getTagStr());
388  undoList->changeAttribute(new GNEChange_Attribute(this, SUMO_ATTR_POSITION, toString(moveResult.shapeToUpdate.front())));
389  undoList->end();
390 }
391 
392 
393 /****************************************************************************/
SUMOXMLDefinitions::isValidAttribute
static bool isValidAttribute(const std::string &value)
whether the given string is a valid attribute for a certain key (for example, a name)
Definition: SUMOXMLDefinitions.cpp:1288
GNENet::removeGLObjectFromGrid
void removeGLObjectFromGrid(GNEAttributeCarrier *AC)
add GL Object into net
Definition: GNENet.cpp:1205
Parameterised::getParametersStr
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".
Definition: Parameterised.cpp:132
GNEDetectorE3::drawGL
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Definition: GNEDetectorE3.cpp:167
SUMOTime_MAX_PERIOD
#define SUMOTime_MAX_PERIOD
Definition: SUMOTime.h:35
GNEAdditional
An Element which don't belong to GNENet but has influence in the simulation.
Definition: GNEAdditional.h:48
SUMO_ATTR_HALTING_SPEED_THRESHOLD
@ SUMO_ATTR_HALTING_SPEED_THRESHOLD
Definition: SUMOXMLDefinitions.h:1077
GNEDetectorE3::checkChildAdditionalRestriction
bool checkChildAdditionalRestriction() const
check restriction with the number of children
Definition: GNEDetectorE3.cpp:282
GNEAttributeCarrier::getID
const std::string getID() const
get ID (all Attribute Carriers have one)
Definition: GNEAttributeCarrier.cpp:62
WRITE_WARNING
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:280
Parameterised
An upper class for objects with additional parameters.
Definition: Parameterised.h:41
GNEMoveOperation
move operation
Definition: GNEMoveElement.h:39
SUMOTime
long long int SUMOTime
Definition: GUI.h:35
GNEAttributeCarrier::getTagProperty
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
Definition: GNEAttributeCarrier.cpp:596
SUMOXMLDefinitions::isValidFilename
static bool isValidFilename(const std::string &value)
whether the given string is a valid attribute for a filename (for example, a name)
Definition: SUMOXMLDefinitions.cpp:1294
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:61
GNEAttributeCarrier::myTagProperty
const GNETagProperties & myTagProperty
reference to tagProperty associated with this attribute carrier
Definition: GNEAttributeCarrier.h:289
GNEAdditional::myAdditionalGeometry
GUIGeometry myAdditionalGeometry
geometry to be precomputed in updateGeometry(...)
Definition: GNEAdditional.h:305
GNENet
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:42
GUIGeometry::getShape
const PositionVector & getShape() const
The shape of the additional element.
Definition: GUIGeometry.cpp:202
Parameterised::getParametersMap
const Parameterised::Map & getParametersMap() const
Returns the inner key/value map.
Definition: Parameterised.cpp:126
SUMO_ATTR_PERIOD
@ SUMO_ATTR_PERIOD
Definition: SUMOXMLDefinitions.h:938
GNEMoveResult
move result
Definition: GNEMoveElement.h:179
GNEDetectorE3::updateGeometry
void updateGeometry()
update pre-computed geometry information
Definition: GNEDetectorE3.cpp:119
GNEDetectorE3::myPosition
Position myPosition
position of E3 in view
Definition: GNEDetectorE3.h:134
Parameterised::areParametersValid
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|....
Definition: Parameterised.cpp:197
GNEDetectorE3::mySpeedThreshold
double mySpeedThreshold
The speed-based threshold that describes how slow a vehicle has to be to be recognized as halting.
Definition: GNEDetectorE3.h:149
Parameterised::Map
std::map< std::string, std::string > Map
parameters map
Definition: Parameterised.h:45
GUIVisualizationAdditionalSettings::connectionColor
static const RGBColor connectionColor
connection color
Definition: GUIVisualizationSettings.h:362
SUMO_ATTR_ID
@ SUMO_ATTR_ID
Definition: SUMOXMLDefinitions.h:544
SUMO_TAG_DET_ENTRY
@ SUMO_TAG_DET_ENTRY
an e3 entry point
Definition: SUMOXMLDefinitions.h:97
GNETagProperties::getTagStr
const std::string & getTagStr() const
get Tag vinculated with this attribute Property in String Format (used to avoid multiple calls to toS...
Definition: GNETagProperties.cpp:85
SUMO_ATTR_FILE
@ SUMO_ATTR_FILE
Definition: SUMOXMLDefinitions.h:958
PositionVector::getBoxBoundary
Boundary getBoxBoundary() const
Returns a boundary enclosing this list of lines.
Definition: PositionVector.cpp:391
Parameterised::writeParams
void writeParams(OutputDevice &device) const
write Params in the given outputdevice
Definition: Parameterised.cpp:185
OutputDevice::closeTag
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
Definition: OutputDevice.cpp:271
GNEAttributeCarrier::myNet
GNENet * myNet
pointer to net
Definition: GNEAttributeCarrier.h:292
GNEDetectorE3::GNEDetectorE3
GNEDetectorE3(GNENet *net)
default constructor
Definition: GNEDetectorE3.cpp:31
GNEAttributeCarrier::GNEChange_Attribute
friend class GNEChange_Attribute
declare friend class
Definition: GNEAttributeCarrier.h:51
OutputDevice::writeAttr
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
Definition: OutputDevice.h:251
GNEDetectorE3::getParentName
std::string getParentName() const
Returns the name of the parent object (if any)
Definition: GNEDetectorE3.cpp:161
GUIGlObject::setMicrosimID
virtual void setMicrosimID(const std::string &newID)
Changes the microsimID of the object.
Definition: GUIGlObject.cpp:198
GNEDetectorE3.h
GNEAdditional::isValidDetectorID
bool isValidDetectorID(const std::string &newID) const
check if a new detector ID is valid
Definition: GNEAdditional.cpp:242
GNEDetectorE3::myPeriod
SUMOTime myPeriod
period of E3 detector
Definition: GNEDetectorE3.h:137
GNEDetectorE3::writeAdditional
void writeAdditional(OutputDevice &device) const
write additional element into a xml file
Definition: GNEDetectorE3.cpp:71
GUIVisualizationSettings::detectorSettings
GUIVisualizationDetectorSettings detectorSettings
Detector settings.
Definition: GUIVisualizationSettings.h:1012
GNEDetectorE3::getPopUpID
std::string getPopUpID() const
get PopPup ID (Used in AC Hierarchy)
Definition: GNEDetectorE3.cpp:306
GNEDetectorE3::getAttributeDouble
double getAttributeDouble(SumoXMLAttr key) const
Definition: GNEDetectorE3.cpp:209
GNEDetectorE3::myTimeThreshold
SUMOTime myTimeThreshold
The time-based threshold that describes how much time has to pass until a vehicle is recognized as ha...
Definition: GNEDetectorE3.h:146
GNEUndoList::changeAttribute
void changeAttribute(GNEChange_Attribute *change)
special method for change attributes, avoid empty changes, always execute
Definition: GNEUndoList.cpp:367
StringUtils::escapeXML
static std::string escapeXML(const std::string &orig, const bool maskDoubleHyphen=false)
Replaces the standard escapes by their XML entities.
Definition: StringUtils.cpp:240
GUITexture::E3_SELECTED
@ E3_SELECTED
GNE_ATTR_PARAMETERS
@ GNE_ATTR_PARAMETERS
parameters "key1=value1|key2=value2|...|keyN=valueN"
Definition: SUMOXMLDefinitions.h:1331
GUIVisualizationSettings::additionalSettings
GUIVisualizationAdditionalSettings additionalSettings
Additional settings.
Definition: GUIVisualizationSettings.h:1009
Parameterised::setParametersStr
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"
Definition: Parameterised.cpp:170
GNEDetectorE3::getHierarchyName
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
Definition: GNEDetectorE3.cpp:312
GNEDetectorE3::updateCenteringBoundary
void updateCenteringBoundary(const bool updateGrid)
update centering boundary (implies change in RTREE)
Definition: GNEDetectorE3.cpp:132
GNEDetectorE3::isValid
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their correspondent attribute are valids
Definition: GNEDetectorE3.cpp:245
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37
Boundary::add
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
Definition: Boundary.cpp:78
time2string
std::string time2string(SUMOTime t)
convert SUMOTime to string
Definition: SUMOTime.cpp:68
GNEAdditional::drawParentChildLines
void drawParentChildLines(const GUIVisualizationSettings &s, const RGBColor &color, const bool onlySymbols=false) const
draw parent and child lines
Definition: GNEAdditional.cpp:627
GNEDetectorE3::commitMoveShape
void commitMoveShape(const GNEMoveResult &moveResult, GNEUndoList *undoList)
commit move shape
Definition: GNEDetectorE3.cpp:386
GNEDetectorE3::myVehicleTypes
std::vector< std::string > myVehicleTypes
attribute vehicle types
Definition: GNEDetectorE3.h:143
GNEAdditional::myAdditionalName
std::string myAdditionalName
name of additional
Definition: GNEAdditional.h:308
GNEDetectorE3::setMoveShape
void setMoveShape(const GNEMoveResult &moveResult)
set move shape
Definition: GNEDetectorE3.cpp:377
GNENet::addGLObjectIntoGrid
void addGLObjectIntoGrid(GNEAttributeCarrier *AC)
add GL Object into net
Definition: GNENet.cpp:1193
GNEDetectorE3::getACParametersMap
const Parameterised::Map & getACParametersMap() const
get parameters map
Definition: GNEDetectorE3.cpp:215
string2time
SUMOTime string2time(const std::string &r)
convert string to SUMOTime
Definition: SUMOTime.cpp:45
SUMO_ATTR_POSITION
@ SUMO_ATTR_POSITION
Definition: SUMOXMLDefinitions.h:526
GNEAdditional::drawSquaredAdditional
void drawSquaredAdditional(const GUIVisualizationSettings &s, const Position &pos, const double size, GUITexture texture, GUITexture selectedTexture) const
draw squared additional
Definition: GNEAdditional.cpp:371
GNEDetectorE3::getMoveOperation
GNEMoveOperation * getMoveOperation()
get move operation
Definition: GNEDetectorE3.cpp:64
GNEAdditional::myAdditionalBoundary
Boundary myAdditionalBoundary
Additional Boundary.
Definition: GNEAdditional.h:302
GLO_E3DETECTOR
@ GLO_E3DETECTOR
a E3 detector
Definition: GUIGlObjectTypes.h:92
GNEUndoList::end
void end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
Definition: GNEUndoList.cpp:235
OutputDevice::openTag
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
Definition: OutputDevice.cpp:257
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:46
GUIVisualizationDetectorSettings::E3Size
static const double E3Size
E3 detector size.
Definition: GUIVisualizationSettings.h:418
SUMO_ATTR_HALTING_TIME_THRESHOLD
@ SUMO_ATTR_HALTING_TIME_THRESHOLD
Definition: SUMOXMLDefinitions.h:1076
SUMO_ATTR_VTYPES
@ SUMO_ATTR_VTYPES
Definition: SUMOXMLDefinitions.h:923
GNEAttributeCarrier::isAttributeCarrierSelected
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
Definition: GNEAttributeCarrier.cpp:96
GUIIcon::E3
@ E3
InvalidArgument
Definition: UtilExceptions.h:54
GNEDetectorE3::setAttribute
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes
Definition: GNEDetectorE3.cpp:221
GNEHierarchicalElement::getChildAdditionals
const std::vector< GNEAdditional * > & getChildAdditionals() const
return child additionals
Definition: GNEHierarchicalElement.cpp:165
GNEMoveResult::shapeToUpdate
PositionVector shapeToUpdate
shape to update (edited in moveElement)
Definition: GNEMoveElement.h:192
GNEDetectorE3::myFilename
std::string myFilename
fielname of E3 detector
Definition: GNEDetectorE3.h:140
GUITexture::E3
@ E3
GNEAttributeCarrier::selectAttributeCarrier
void selectAttributeCarrier(const bool changeFlag=true)
select attribute carrier using GUIGlobalSelection
Definition: GNEAttributeCarrier.cpp:74
GUIGlObject::getMicrosimID
const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
Definition: GUIGlObject.h:133
GNENetworkElement
Definition: GNENetworkElement.h:41
SUMO_TAG_E3DETECTOR
@ SUMO_TAG_E3DETECTOR
an e3 detector
Definition: SUMOXMLDefinitions.h:89
GNEUndoList::begin
void begin(GUIIcon icon, const std::string &description)
Begin undo command sub-group with current supermode. This begins a new group of commands that are tre...
Definition: GNEUndoList.cpp:205
GNE_ATTR_SELECTED
@ GNE_ATTR_SELECTED
element is selected
Definition: SUMOXMLDefinitions.h:1315
Boundary::grow
Boundary & grow(double by)
extends the boundary by the given amount
Definition: Boundary.cpp:300
GNETagProperties::getDefaultValue
const std::string & getDefaultValue(SumoXMLAttr attr) const
return the default value of the attribute of an element
Definition: GNETagProperties.cpp:144
GNEAttributeCarrier::getTagStr
const std::string & getTagStr() const
get tag assigned to this object in string format
Definition: GNEAttributeCarrier.cpp:569
SUMOXMLDefinitions::isValidListOfTypeID
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)
Definition: SUMOXMLDefinitions.cpp:1317
SUMO_ATTR_NAME
@ SUMO_ATTR_NAME
Definition: SUMOXMLDefinitions.h:546
GNEUndoList
Definition: GNEUndoList.h:42
GUIVisualizationSettings
Stores the information about how to visualize structures.
Definition: GUIVisualizationSettings.h:583
SumoXMLAttr
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
Definition: SUMOXMLDefinitions.h:466
GNEDetectorE3::splitEdgeGeometry
void splitEdgeGeometry(const double splitPosition, const GNENetworkElement *originalElement, const GNENetworkElement *newElement, GNEUndoList *undoList)
split geometry
Definition: GNEDetectorE3.cpp:155
GNEAttributeCarrier::unselectAttributeCarrier
void unselectAttributeCarrier(const bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
Definition: GNEAttributeCarrier.cpp:85
SUMO_TAG_DET_EXIT
@ SUMO_TAG_DET_EXIT
an e3 exit point
Definition: SUMOXMLDefinitions.h:99
GUIGeometry::updateSinglePosGeometry
void updateSinglePosGeometry(const Position &position, const double rotation)
update position and rotation
Definition: GUIGeometry.cpp:174
GNEDetectorE3::~GNEDetectorE3
~GNEDetectorE3()
GNEDetectorE3 Destructor.
Definition: GNEDetectorE3.cpp:60
GNEChange_Attribute.h
GNENet.h
GNEUndoList.h
GNEDetectorE3::getAttribute
std::string getAttribute(SumoXMLAttr key) const
Definition: GNEDetectorE3.cpp:176
GNEDetectorE3::getPositionInView
Position getPositionInView() const
Returns position of additional in view.
Definition: GNEDetectorE3.cpp:126