Eclipse SUMO - Simulation of Urban MObility
GNEAttributeCarrier.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-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // Abstract Base class for gui objects which carry attributes
16 /****************************************************************************/
17 #ifndef GNEAttributeCarrier_h
18 #define GNEAttributeCarrier_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
27 #include <utils/common/ToString.h>
33 
34 #include "GNEReferenceCounter.h"
35 
36 
37 // ===========================================================================
38 // class declarations
39 // ===========================================================================
40 class GNENet;
41 class GNEUndoList;
42 class GNELane;
43 class GNEEdge;
44 
45 // ===========================================================================
46 // class definitions
47 // ===========================================================================
55 
57  friend class GNEChange_Attribute;
59 
60 public:
61 
62  // @brief declare class TagProperties
63  class TagProperties;
64 
66  enum AttrProperty {
67  ATTRPROPERTY_INT = 1 << 0, // Attribute is an integer (Including Zero)
68  ATTRPROPERTY_FLOAT = 1 << 1, // Attribute is a float
69  ATTRPROPERTY_SUMOTIME = 1 << 2, // Attribute is a SUMOTime
70  ATTRPROPERTY_BOOL = 1 << 3, // Attribute is boolean (0/1, true/false)
71  ATTRPROPERTY_STRING = 1 << 4, // Attribute is a string
72  ATTRPROPERTY_POSITION = 1 << 5, // Attribute is a position defined by doubles (x,y or x,y,z)
73  ATTRPROPERTY_COLOR = 1 << 6, // Attribute is a color defined by a specifically word (Red, green) or by a special format (XXX,YYY,ZZZ)
74  ATTRPROPERTY_VCLASS = 1 << 7, // Attribute is a VClass (passenger, bus, motorcicle...)
75  ATTRPROPERTY_POSITIVE = 1 << 8, // Attribute is positive (Including Zero)
76  ATTRPROPERTY_NOTZERO = 1 << 9, // Attribute cannot be 0 (only for numerical attributes)
77  ATTRPROPERTY_UNIQUE = 1 << 10, // Attribute is unique (cannot be edited in a selection of similar elements (ID, Position...)
78  ATTRPROPERTY_FILENAME = 1 << 11, // Attribute is a filename (string that cannot contains certain characters)
79  ATTRPROPERTY_NONEDITABLE = 1 << 12, // Attribute is non editable (index of a lane)
80  ATTRPROPERTY_DISCRETE = 1 << 13, // Attribute is discrete (only certain values are allowed)
81  ATTRPROPERTY_PROBABILITY = 1 << 14, // Attribute is probability (only allowed values between 0 and 1, including both)
82  ATTRPROPERTY_ANGLE = 1 << 15, // Attribute is an angle (only takes values between 0 and 360, including both, another value will be automatically reduced
83  ATTRPROPERTY_LIST = 1 << 16, // Attribute is a list of other elements separated by spaces
84  ATTRPROPERTY_SECUENCIAL = 1 << 17, // Attribute is a special sequence of elements (for example: secuencial lanes in Multi Lane E2 detectors)
85  ATTRPROPERTY_WRITEXMLOPTIONAL = 1 << 18, // Attribute will not be written in XML file if current value is the same of their default Static/Mutable value
86  ATTRPROPERTY_DEFAULTVALUESTATIC = 1 << 19, // Attribute owns a static default value
87  ATTRPROPERTY_DEFAULTVALUEMUTABLE = 1 << 20, // Attribute owns a mutable default value (Default value depends of value of other attribute)
88  ATTRPROPERTY_COMBINABLE = 1 << 21, // Attribute is combinable with other attribute (example: Allow/disallow VClasses)
89  ATTRPROPERTY_SYNONYM = 1 << 22, // Attribute will be written with a different name in der XML
90  ATTRPROPERTY_RANGE = 1 << 23, // Attribute only accept a range of elements (example: Probability [0,1]
91  ATTRPROPERTY_EXTENDED = 1 << 24, // Attribute is extended (in Frame will not be shown, see VType attributes)
92  ATTRPROPERTY_UPDATEGEOMETRY = 1 << 25, // Attribute requiere update geometry at the end of function setAttribute(...)
93  ATTRPROPERTY_OPTIONAL = 1 << 26, // Attribute is optional, i.e. can be enabled/disabled using a checkbox in frame
94  ATTRPROPERTY_COMPLEX = 1 << 27, // Attribute is complex: Requiere a special function to check if their given value is valid
95  ATTRPROPERTY_ENABLITABLE = 1 << 28, // Attribute is enablitable: Can be enabled or disabled.
96  };
97 
100 
101  public:
104 
106  AttributeProperties(const SumoXMLAttr attribute, const int attributeProperty, const std::string& definition, std::string defaultValue = "");
107 
110 
113 
115  void setDiscreteValues(const std::vector<std::string>& discreteValues);
116 
118  void setSynonym(const SumoXMLAttr synonym);
119 
121  void setRange(const double minimum, const double maximum);
122 
124  void setTagPropertyParent(TagProperties* tagPropertyParent);
125 
127  SumoXMLAttr getAttr() const;
128 
130  const std::string& getAttrStr() const;
131 
133  const TagProperties& getTagPropertyParent() const;
134 
136  int getPositionListed() const;
137 
139  const std::string& getDefinition() const;
140 
142  const std::string& getDefaultValue() const;
143 
145  std::string getDescription() const;
146 
148  const std::vector<std::string>& getDiscreteValues() const;
149 
151  SumoXMLAttr getAttrSynonym() const;
152 
154  double getMinimumRange() const;
155 
157  double getMaximumRange() const;
158 
160  bool hasStaticDefaultValue() const;
161 
163  bool hasMutableDefaultValue() const;
164 
166  bool hasAttrSynonym() const;
167 
169  bool hasAttrRange() const;
170 
172  bool isInt() const;
173 
175  bool isFloat() const;
176 
178  bool isSUMOTime() const;
179 
181  bool isBool() const;
182 
184  bool isString() const;
185 
187  bool isposition() const;
188 
190  bool isProbability() const;
191 
193  bool isNumerical() const;
194 
196  bool isPositive() const;
197 
199  bool cannotBeZero() const;
200 
202  bool isColor() const;
203 
205  bool isFilename() const;
206 
208  bool isVClass() const;
209 
211  bool isSVCPermission() const;
212 
214  bool isList() const;
215 
217  bool isSecuential() const;
218 
220  bool isUnique() const;
221 
223  bool isWriteXMLOptional() const;
224 
226  bool isDiscrete() const;
227 
229  bool isCombinable() const;
230 
232  bool isNonEditable() const;
233 
235  bool isExtended() const;
236 
238  bool requiereUpdateGeometry() const;
239 
241  bool isOptional() const;
242 
244  bool isComplex() const;
245 
247  bool isEnablitable() const;
248 
249  private:
252 
255 
257  std::string myAttrStr;
258 
261 
263  std::string myDefinition;
264 
266  std::string myDefaultValue;
267 
269  std::vector<std::string> myDiscreteValues;
270 
273 
276 
279  };
280 
281  enum TagType {
282  TAGTYPE_NETELEMENT = 1 << 0, // Edges, Junctions, Lanes...
283  TAGTYPE_ADDITIONAL = 1 << 1, // Bus Stops, Charging Stations, Detectors...
284  TAGTYPE_SHAPE = 1 << 2, // POIs, Polygons
285  TAGTYPE_DEMANDELEMENT = 1 << 3, // Routes, Vehicles, Trips...
286  TAGTYPE_TAZ = 1 << 4, // Traffic Assignment Zones
287  TAGTYPE_STOPPINGPLACE = 1 << 5, // StoppingPlaces (BusStops, ChargingStations...)
288  TAGTYPE_DETECTOR = 1 << 6, // Detectors (E1, E2...)
289  TAGTYPE_VTYPE = 1 << 7, // Vehicle types (vType and pTye)
290  TAGTYPE_VEHICLE = 1 << 8, // Vehicles (Flows, trips...)
291  TAGTYPE_ROUTE = 1 << 9, // Routes and embedded routes
292  TAGTYPE_STOP = 1 << 10, // Stops
293  TAGTYPE_PERSON = 1 << 11, // Persons
294  TAGTYPE_PERSONPLAN = 1 << 12, // Person plans (Walks, rides, ...)
295  TAGTYPE_PERSONTRIP = 1 << 13, // Walks
296  TAGTYPE_WALK = 1 << 14, // Walks
297  TAGTYPE_RIDE = 1 << 15, // Rides
298  TAGTYPE_PERSONSTOP = 1 << 16, // Person stops
299  };
300 
301  enum TAGProperty {
302  TAGPROPERTY_DRAWABLE = 1 << 0, // Element can be drawed in view
303  TAGPROPERTY_BLOCKMOVEMENT = 1 << 1, // Element can block their movement
304  TAGPROPERTY_BLOCKSHAPE = 1 << 2, // Element can block their shape
305  TAGPROPERTY_CLOSESHAPE = 1 << 3, // Element can close their shape
306  TAGPROPERTY_GEOPOSITION = 1 << 4, // Element's position can be defined using a GEO position
307  TAGPROPERTY_GEOSHAPE = 1 << 5, // Element's shape acn be defined using a GEO Shape
308  TAGPROPERTY_DIALOG = 1 << 6, // Element can be edited using a dialog (GNECalibratorDialog, GNERerouterDialog...)
309  TAGPROPERTY_PARENT = 1 << 7, // Element will be writed in XML as child of another element (E3Entry -> E3Detector...)
310  TAGPROPERTY_MINIMUMCHILDREN = 1 << 8, // Element will be only writed in XML if has a minimum number of children
311  TAGPROPERTY_REPARENT = 1 << 9, // Element can be reparent
312  TAGPROPERTY_SYNONYM = 1 << 10, // Element will be written with a different name in der XML
313  TAGPROPERTY_AUTOMATICSORTING = 1 << 11, // Element sort automatic their Children (used by Additionals)
314  TAGPROPERTY_SELECTABLE = 1 << 12, // Element is selectable
315  TAGPROPERTY_MASKSTARTENDPOS = 1 << 13, // Element mask attributes StartPos and EndPos as "lenght" (Only used in the appropiate GNEFrame)
316  TAGPROPERTY_MASKXYZPOSITION = 1 << 14, // Element mask attributes X, Y and Z as "Position"
317  TAGPROPERTY_WRITECHILDRENSEPARATE = 1 << 15, // Element writes their children in a separated filename
318  TAGPROPERTY_NOGENERICPARAMETERS = 1 << 16, // Element doesn't accept Generic Parameters (by default all tags supports generic parameters)
319  TAGPROPERTY_RTREE = 1 << 17, // Element is placed in RTREE
320  TAGPROPERTY_SORTINGCHILDREN = 1 << 18, // Element can be sorted in their parent element manually (in ACHierarchy)
321  };
322 
325  public:
327  TagProperties();
328 
330  TagProperties(SumoXMLTag tag, int tagType, int tagProperty, GUIIcon icon, SumoXMLTag parentTag = SUMO_TAG_NOTHING, SumoXMLTag tagSynonym = SUMO_TAG_NOTHING);
331 
333  ~TagProperties();
334 
336  SumoXMLTag getTag() const;
337 
339  const std::string& getTagStr() const;
340 
342  void checkTagIntegrity() const;
343 
345  void addAttribute(const AttributeProperties& attributeProperty);
346 
349 
352 
354  std::vector<AttributeProperties>::const_iterator begin() const;
355 
357  std::vector<AttributeProperties>::const_iterator end() const;
358 
360  int getNumberOfAttributes() const;
361 
363  const std::string& getDefaultValue(SumoXMLAttr attr) const;
364 
366  GUIIcon getGUIIcon() const;
367 
369  SumoXMLTag getParentTag() const;
370 
372  SumoXMLTag getTagSynonym() const;
373 
375  bool hasAttribute(SumoXMLAttr attr) const;
376 
378  bool isNetElement() const;
379 
381  bool isAdditional() const;
382 
384  bool isShape() const;
385 
387  bool isTAZ() const;
388 
390  bool isDemandElement() const;
391 
393  bool isStoppingPlace() const;
394 
396  bool isDetector() const;
397 
399  bool isVehicleType() const;
400 
402  bool isVehicle() const;
403 
405  bool isRoute() const;
406 
408  bool isStop() const;
409 
411  bool isPerson() const;
412 
414  bool isPersonPlan() const;
415 
417  bool isPersonTrip() const;
418 
420  bool isWalk() const;
421 
423  bool isRide() const;
424 
426  bool isPersonStop() const;
427 
429  bool isDrawable() const;
430 
432  bool isSelectable() const;
433 
435  bool canBlockMovement() const;
436 
438  bool canBlockShape() const;
439 
441  bool canCloseShape() const;
442 
444  bool hasGEOPosition() const;
445 
447  bool hasGEOShape() const;
448 
450  bool hasParent() const;
451 
453  bool hasTagSynonym() const;
454 
456  bool hasDialog() const;
457 
459  bool hasMinimumNumberOfChildren() const;
460 
462  bool hasGenericParameters() const;
463 
465  bool isPlacedInRTree() const;
466 
468  bool canBeSortedManually() const;
469 
471  bool canBeReparent() const;
472 
474  bool canAutomaticSortChildren() const;
475 
477  bool canWriteChildrenSeparate() const;
478 
480  bool canMaskStartEndPos() const;
481 
483  bool canMaskXYZPositions() const;
484 
486  bool isAttributeDeprecated(SumoXMLAttr attr) const;
487 
488  private:
491 
493  std::string myTagStr;
494 
497 
500 
502  std::vector<AttributeProperties> myAttributeProperties;
503 
506 
509 
512 
514  std::vector<SumoXMLAttr> myDeprecatedAttributes;
515  };
516 
521  GNEAttributeCarrier(const SumoXMLTag tag);
522 
524  virtual ~GNEAttributeCarrier();
525 
527  virtual void updateGeometry() = 0;
528 
532  virtual void selectAttributeCarrier(bool changeFlag = true) = 0;
533 
535  virtual void unselectAttributeCarrier(bool changeFlag = true) = 0;
536 
538  virtual bool isAttributeCarrierSelected() const = 0;
539 
541  virtual bool drawUsingSelectColor() const = 0;
542 
543  /* @brief method for getting the Attribute of an XML key
544  * @param[in] key The attribute key
545  * @return string with the value associated to key
546  */
547  virtual std::string getAttribute(SumoXMLAttr key) const = 0;
548 
549  /* @brief method for setting the attribute and letting the object perform additional changes
550  * @param[in] key The attribute key
551  * @param[in] value The new value
552  * @param[in] undoList The undoList on which to register changes
553  */
554  virtual void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) = 0;
555 
556  /* @brief method for check if new value for certain attribute is valid
557  * @param[in] key The attribute key
558  * @param[in] value The new value
559  */
560  virtual bool isValid(SumoXMLAttr key, const std::string& value) = 0;
561 
562  /* @brief method for enabling attribute
563  * @param[in] key The attribute key
564  * @param[in] undoList The undoList on which to register changes
565  * @note only certain attributes can be enabled, and can produce the disabling of other attributes
566  */
567  virtual void enableAttribute(SumoXMLAttr key, GNEUndoList* undoList) = 0;
568 
569  /* @brief method for check if the value for certain attribute is set
570  * @param[in] key The attribute key
571  */
572  virtual bool isAttributeEnabled(SumoXMLAttr key) const = 0;
573 
575  virtual std::string getPopUpID() const = 0;
576 
578  virtual std::string getHierarchyName() const = 0;
580 
584  static const std::string FEATURE_LOADED;
585 
587  static const std::string FEATURE_GUESSED;
588 
590  static const std::string FEATURE_MODIFIED;
591 
593  static const std::string FEATURE_APPROVED;
595 
597  static const size_t MAXNUMBEROFATTRIBUTES;
598 
600  static const double INVALID_POSITION;
601 
603  virtual std::string getAttributeForSelection(SumoXMLAttr key) const;
604 
606  const std::string& getTagStr() const;
607 
609  const TagProperties& getTagProperty() const;
610 
612  FXIcon* getIcon() const;
613 
615  const std::string getID() const;
616 
618  static const TagProperties& getTagProperties(SumoXMLTag tag);
619 
621  static std::vector<SumoXMLTag> allowedTags(bool onlyDrawables);
622 
624  static std::vector<SumoXMLTag> allowedTagsByCategory(int tagPropertyCategory, bool onlyDrawables);
625 
628 
630  virtual std::string getGenericParametersStr() const = 0;
631 
633  virtual std::vector<std::pair<std::string, std::string> > getGenericParameters() const = 0;
634 
636  virtual void setGenericParametersStr(const std::string& value) = 0;
637 
639 
641  static bool isGenericParametersValid(const std::string& value);
642 
644  template<typename T>
645  static bool canParse(const std::string& string) {
646  try {
647  parse<T>(string);
648  } catch (NumberFormatException&) {
649  return false;
650  } catch (EmptyData&) {
651  return false;
652  } catch (BoolFormatException&) {
653  return false;
654  }
655  return true;
656  }
657 
659  template<typename T>
660  static T parse(const std::string& string);
661 
663  template<typename T>
664  static bool canParse(GNENet* net, const std::string& value, bool report) {
665  try {
666  parse<T>(net, value);
667  } catch (FormatException& exception) {
668  if (report) {
669  WRITE_WARNING(exception.what())
670  }
671  return false;
672  }
673  return true;
674  }
675 
677  template<typename T>
678  static T parse(GNENet* net, const std::string& value);
679 
681  template<typename T>
682  static std::string parseIDs(const std::vector<T>& ACs);
683 
685  static bool lanesConsecutives(const std::vector<GNELane*>& lanes);
686 
688  template <typename T>
689  static T parseAttributeFromXML(const SUMOSAXAttributes& attrs, const std::string& objectID, const SumoXMLTag tag, const SumoXMLAttr attribute, bool& abort) {
690  bool parsedOk = true;
691  // declare string values
692  std::string defaultValue, parsedAttribute, warningMessage;
693  // obtain tag properties
694  const auto& tagProperties = getTagProperties(tag);
695  // first check if attribute is deprecated
696  if (tagProperties.isAttributeDeprecated(attribute)) {
697  // show warning if deprecateda ttribute is in the SUMOSAXAttributes
698  if (attrs.hasAttribute(attribute)) {
699  WRITE_WARNING("Attribute " + toString(attribute) + "' of " + tagProperties.getTagStr() + " is deprecated and will not be loaded.");
700  }
701  // return a dummy value
702  return parse<T>("");
703  }
704  // now check if we're obtaining attribute of an object with an already parsed ID
705  if (objectID != "") {
706  warningMessage = tagProperties.getTagStr() + " with ID '" + objectID + "'";
707  } else {
708  warningMessage = tagProperties.getTagStr();
709  }
710  // check if we're parsing block movement
711  if (attribute == GNE_ATTR_BLOCK_MOVEMENT) {
712  // first check if we can parse
713  if (tagProperties.canBlockMovement()) {
714  // First check if attribute can be parsed to bool
715  parsedAttribute = attrs.get<std::string>(attribute, objectID.c_str(), parsedOk, false);
716  // check that sucesfully parsed attribute can be converted to type double
717  if (!canParse<bool>(parsedAttribute)) {
718  abort = true;
719  // return default value
720  return parse<T>("0");
721  } else {
722  // return readed value
723  return parse<T>(parsedAttribute);
724  }
725  } else {
726  throw ProcessError("Trying to parsing block movement attribute in an AC that cannot be moved");
727  }
728  }
729  // now check if we're parsing a GEO Attribute
730  if (tagProperties.hasGEOPosition() && ((attribute == SUMO_ATTR_LON) || (attribute == SUMO_ATTR_LAT))) {
731  // first check if GEO Attribute is defined
732  if (attrs.hasAttribute(attribute)) {
733  // First check if attribute can be parsed to string
734  parsedAttribute = attrs.get<std::string>(attribute, objectID.c_str(), parsedOk, false);
735  // check that sucesfully parsed attribute can be converted to type double
736  if (!canParse<double>(parsedAttribute)) {
737  WRITE_WARNING("Format of GEO attribute '" + toString(attribute) + "' of " +
738  warningMessage + " is invalid; Cannot be parsed to float; " + tagProperties.getTagStr() + " cannot be created");
739  // return default value
740  return parse<T>("0");
741  } else {
742  // return readed value
743  return parse<T>(parsedAttribute);
744  }
745  }
746  parsedOk = false;
747  // return default value
748  return parse<T>("0");
749  }
750  // obtain attribute properties (Only for improving efficiency)
751  const auto& attrProperties = tagProperties.getAttributeProperties(attribute);
752  // set a special default value for numerical and boolean attributes (To avoid errors parsing)
753  if (attrProperties.isNumerical() || attrProperties.isBool()) {
754  defaultValue = "0";
755  } else if (attrProperties.isColor()) {
756  defaultValue = "black";
757  } else if (attrProperties.isposition()) {
758  defaultValue = "0,0";
759  }
760  // first check that attribute exists in XML
761  if (attrs.hasAttribute(attribute)) {
762  // First check if attribute can be parsed to string
763  parsedAttribute = attrs.get<std::string>(attribute, objectID.c_str(), parsedOk, false);
764  // check parsed attribute
765  if (!checkParsedAttribute(tagProperties, attrProperties, attribute, defaultValue, parsedAttribute, warningMessage)) {
766  abort = true;
767  }
768  } else if (tagProperties.canMaskXYZPositions() && (attribute == SUMO_ATTR_POSITION)) {
769  // obtain masked position attribute
770  if (!parseMaskedPositionAttribute(attrs, objectID, tagProperties, attrProperties, parsedAttribute, warningMessage)) {
771  abort = true;
772  }
773  } else {
774  // if attribute is optional and has a default value, obtain it. In other case, abort.
775  if (attrProperties.isWriteXMLOptional()) {
776  parsedAttribute = attrProperties.getDefaultValue();
777  } else {
778  WRITE_WARNING("Essential " + attrProperties.getDescription() + " attribute '" + toString(attribute) + "' of " +
779  warningMessage + " is missing; " + tagProperties.getTagStr() + " cannot be created");
780  // abort parsing (and creation) of element
781  abort = true;
782  // set default value (To avoid errors in parse<T>(parsedAttribute))
783  parsedAttribute = defaultValue;
784  }
785  }
786  // return parsed attribute
787  return parse<T>(parsedAttribute);
788  }
789 
790 protected:
793 
796 
799 
800 private:
802  virtual void setAttribute(SumoXMLAttr key, const std::string& value) = 0;
803 
805  virtual void setEnabledAttribute(const int enabledAttributes) = 0;
806 
808  static void fillAttributeCarriers();
809 
811  static void fillNetElements();
812 
814  static void fillAdditionals();
815 
817  static void fillShapes();
818 
820  static void fillDemandElements();
821 
823  static void fillVehicleElements();
824 
826  static void fillStopElements();
827 
829  static void fillPersonElements();
830 
832  static void fillPersonStopElements();
833 
835  static void fillCommonVehicleAttributes(SumoXMLTag currentTag);
836 
838  static void fillCommonFlowAttributes(SumoXMLTag currentTag);
839 
841  static void fillCarFollowingModelAttributes(SumoXMLTag currentTag);
842 
844  static void fillJunctionModelAttributes(SumoXMLTag currentTag);
845 
847  static void fillLaneChangingModelAttributes(SumoXMLTag currentTag);
848 
850  static void fillCommonPersonAttributes(SumoXMLTag currentTag);
851 
853  static void fillCommonStopAttributes(SumoXMLTag currentTag);
854 
856  static bool checkParsedAttribute(const TagProperties& tagProperties, const AttributeProperties& attrProperties, const SumoXMLAttr attribute,
857  std::string& defaultValue, std::string& parsedAttribute, std::string& warningMessage);
858 
860  static bool parseMaskedPositionAttribute(const SUMOSAXAttributes& attrs, const std::string& objectID, const TagProperties& tagProperties,
861  const AttributeProperties& attrProperties, std::string& parsedAttribute, std::string& warningMessage);
862 
864  static std::map<SumoXMLTag, TagProperties> myTagProperties;
865 
867  GNEAttributeCarrier(const GNEAttributeCarrier&) = delete;
868 
870  GNEAttributeCarrier& operator=(const GNEAttributeCarrier& src) = delete;
871 };
872 
873 #endif
874 
875 /****************************************************************************/
876 
GNEAttributeCarrier::TagProperties::hasGenericParameters
bool hasGenericParameters() const
return true if Tag correspond to an element that supports generic parameters
Definition: GNEAttributeCarrier.cpp:856
GNEAttributeCarrier::AttributeProperties::setSynonym
void setSynonym(const SumoXMLAttr synonym)
set synonim
Definition: GNEAttributeCarrier.cpp:138
GNEAttributeCarrier::TAGPROPERTY_WRITECHILDRENSEPARATE
Definition: GNEAttributeCarrier.h:317
GNEAttributeCarrier::TagProperties::myTag
SumoXMLTag myTag
Sumo XML Tag vinculated wit this tag Property.
Definition: GNEAttributeCarrier.h:490
GNEAttributeCarrier::AttributeProperties::isProbability
bool isProbability() const
return true if atribute is a probability
Definition: GNEAttributeCarrier.cpp:374
GNEAttributeCarrier::fillAttributeCarriers
static void fillAttributeCarriers()
fill Attribute Carriers
Definition: GNEAttributeCarrier.cpp:1387
GNEAttributeCarrier::TagProperties::isPerson
bool isPerson() const
return true if tag correspond to a person element
Definition: GNEAttributeCarrier.cpp:754
GNEAttributeCarrier::TAGPROPERTY_SELECTABLE
Definition: GNEAttributeCarrier.h:314
GNEAttributeCarrier::getIcon
FXIcon * getIcon() const
get FXIcon associated to this AC
Definition: GNEAttributeCarrier.cpp:1177
ToString.h
GNEAttributeCarrier::GNEAttributeCarrier
GNEAttributeCarrier(const SumoXMLTag tag)
Constructor.
Definition: GNEAttributeCarrier.cpp:913
SUMOSAXAttributes::hasAttribute
virtual bool hasAttribute(int id) const =0
Returns the information whether the named (by its enum-value) attribute is within the current list.
GNEAttributeCarrier::AttributeProperties::isSUMOTime
bool isSUMOTime() const
return true if atribute is a SUMOTime
Definition: GNEAttributeCarrier.cpp:350
GNEAttributeCarrier::TagProperties
struct with the attribute Properties
Definition: GNEAttributeCarrier.h:324
GNEAttributeCarrier::TagProperties::myTagSynonym
SumoXMLTag myTagSynonym
Tag written in XML (If is SUMO_TAG_NOTHING), original Tag name will be written)
Definition: GNEAttributeCarrier.h:511
GNEAttributeCarrier::dummyTagProperty
static TagProperties dummyTagProperty
dummy TagProperty used for reference some elements (for Example, dummyEdge)
Definition: GNEAttributeCarrier.h:798
GNEAttributeCarrier::ATTRPROPERTY_INT
Definition: GNEAttributeCarrier.h:67
GNEAttributeCarrier::mySelected
bool mySelected
boolean to check if this AC is selected (instead of GUIGlObjectStorage)
Definition: GNEAttributeCarrier.h:795
GNEAttributeCarrier::checkParsedAttribute
static bool checkParsedAttribute(const TagProperties &tagProperties, const AttributeProperties &attrProperties, const SumoXMLAttr attribute, std::string &defaultValue, std::string &parsedAttribute, std::string &warningMessage)
parse and check attribute (note: This function is only to improve legilibility)
Definition: GNEAttributeCarrier.cpp:4403
GNEAttributeCarrier::TagProperties::addDeprecatedAttribute
void addDeprecatedAttribute(SumoXMLAttr attr)
add deprecated Attribute
Definition: GNEAttributeCarrier.cpp:608
GNEAttributeCarrier::getID
const std::string getID() const
function to support debugging
Definition: GNEAttributeCarrier.cpp:1187
GNEAttributeCarrier::updateGeometry
virtual void updateGeometry()=0
update pre-computed geometry information
WRITE_WARNING
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:239
GNEAttributeCarrier::TAGTYPE_VTYPE
Definition: GNEAttributeCarrier.h:289
GNEAttributeCarrier::TagProperties::isAdditional
bool isAdditional() const
return true if tag correspond to an additional
Definition: GNEAttributeCarrier.cpp:696
GNEAttributeCarrier::AttributeProperties::checkAttributeIntegrity
void checkAttributeIntegrity()
check Attribute integrity (For example, throw an exception if tag has a Float default value,...
Definition: GNEAttributeCarrier.cpp:103
GNEAttributeCarrier::AttributeProperties::isposition
bool isposition() const
return true if atribute is a position
Definition: GNEAttributeCarrier.cpp:368
GNEAttributeCarrier::TagProperties::getTagStr
const std::string & getTagStr() const
get Tag vinculated with this attribute Property in String Format (used to avoid multiple calls to toS...
Definition: GNEAttributeCarrier.cpp:527
GNEAttributeCarrier::ATTRPROPERTY_COMPLEX
Definition: GNEAttributeCarrier.h:94
GNEAttributeCarrier::TagProperties::isPlacedInRTree
bool isPlacedInRTree() const
return true if Tag correspond to an element that has has to be placed in RTREE
Definition: GNEAttributeCarrier.cpp:863
GNEAttributeCarrier::TagProperties::isTAZ
bool isTAZ() const
return true if tag correspond to a TAZ
Definition: GNEAttributeCarrier.cpp:707
GNEAttributeCarrier::ATTRPROPERTY_UNIQUE
Definition: GNEAttributeCarrier.h:77
GNEAttributeCarrier::TagProperties::canMaskStartEndPos
bool canMaskStartEndPos() const
return true if tag correspond to an element that can mask the attributes "start" and "end" position a...
Definition: GNEAttributeCarrier.cpp:893
GNEAttributeCarrier::ATTRPROPERTY_EXTENDED
Definition: GNEAttributeCarrier.h:91
GNEAttributeCarrier::TAGPROPERTY_SYNONYM
Definition: GNEAttributeCarrier.h:312
GNEAttributeCarrier::TagProperties::isStoppingPlace
bool isStoppingPlace() const
return true if tag correspond to a detector (Only used to group all stoppingPlaces in the output XML)
Definition: GNEAttributeCarrier.cpp:719
GNEAttributeCarrier::AttributeProperties::isOptional
bool isOptional() const
return true if atribute is optional
Definition: GNEAttributeCarrier.cpp:476
GNEAttributeCarrier::ATTRPROPERTY_DEFAULTVALUEMUTABLE
Definition: GNEAttributeCarrier.h:87
GNEAttributeCarrier::parseIDs
static std::string parseIDs(const std::vector< T > &ACs)
parses a list of specific Attribute Carriers into a string of IDs
GNEAttributeCarrier::fillCommonFlowAttributes
static void fillCommonFlowAttributes(SumoXMLTag currentTag)
fill common flow attributes (used by flows, routeFlows and personFlows)
Definition: GNEAttributeCarrier.cpp:3929
GNEAttributeCarrier::parseAttributeFromXML
static T parseAttributeFromXML(const SUMOSAXAttributes &attrs, const std::string &objectID, const SumoXMLTag tag, const SumoXMLAttr attribute, bool &abort)
Parse attribute from XML and show warnings if there are problems parsing it.
Definition: GNEAttributeCarrier.h:689
GNENet
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:78
GNEAttributeCarrier::TagProperties::isNetElement
bool isNetElement() const
return true if tag correspond to a netElement
Definition: GNEAttributeCarrier.cpp:690
SUMOSAXAttributes::get
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
Definition: SUMOSAXAttributes.h:493
GNEAttributeCarrier::ATTRPROPERTY_DISCRETE
Definition: GNEAttributeCarrier.h:80
GNEAttributeCarrier::ATTRPROPERTY_ENABLITABLE
Definition: GNEAttributeCarrier.h:95
MsgHandler.h
GNEAttributeCarrier::AttributeProperties::isPositive
bool isPositive() const
return true if atribute is positive
Definition: GNEAttributeCarrier.cpp:386
GNEAttributeCarrier::fillPersonStopElements
static void fillPersonStopElements()
fill PersonStop elements
Definition: GNEAttributeCarrier.cpp:3801
GNEAttributeCarrier::TagProperties::canBeSortedManually
bool canBeSortedManually() const
return true if Tag correspond to an element that can be sorted within their parent
Definition: GNEAttributeCarrier.cpp:869
GNEAttributeCarrier::TAGTYPE_DEMANDELEMENT
Definition: GNEAttributeCarrier.h:285
GNEAttributeCarrier::fillShapes
static void fillShapes()
fill Shapes
Definition: GNEAttributeCarrier.cpp:2845
GNEAttributeCarrier::TagProperties::begin
std::vector< AttributeProperties >::const_iterator begin() const
get begin of attribute values (used for iterate)
Definition: GNEAttributeCarrier.cpp:634
GNEAttributeCarrier::isGenericParametersValid
static bool isGenericParametersValid(const std::string &value)
check if given string can be parsed to a map/list of generic parameters
Definition: GNEAttributeCarrier.cpp:1354
GNEAttributeCarrier::TAGPROPERTY_DIALOG
Definition: GNEAttributeCarrier.h:308
GNEAttributeCarrier::TagProperties::isRoute
bool isRoute() const
return true if tag correspond to a route element
Definition: GNEAttributeCarrier.cpp:742
GNEAttributeCarrier::AttributeProperties::isUnique
bool isUnique() const
return true if atribute is unique
Definition: GNEAttributeCarrier.cpp:434
GNEAttributeCarrier::AttributeProperties::getDefinition
const std::string & getDefinition() const
get default value
Definition: GNEAttributeCarrier.cpp:194
GNEAttributeCarrier::selectAttributeCarrier
virtual void selectAttributeCarrier(bool changeFlag=true)=0
GNEAttributeCarrier::AttributeProperties::isFloat
bool isFloat() const
return true if atribute is a float
Definition: GNEAttributeCarrier.cpp:344
GNEAttributeCarrier::TAGTYPE_ADDITIONAL
Definition: GNEAttributeCarrier.h:283
GNEAttributeCarrier::AttributeProperties::setDiscreteValues
void setDiscreteValues(const std::vector< std::string > &discreteValues)
set discrete values
Definition: GNEAttributeCarrier.cpp:128
GNEAttributeCarrier::TagProperties::myTagProperty
int myTagProperty
Attribute properties.
Definition: GNEAttributeCarrier.h:499
EmptyData
Definition: UtilExceptions.h:69
GNEAttributeCarrier::TagProperties::isStop
bool isStop() const
return true if tag correspond to a stop element
Definition: GNEAttributeCarrier.cpp:748
GNEAttributeCarrier::TagProperties::end
std::vector< AttributeProperties >::const_iterator end() const
get end of attribute values (used for iterate)
Definition: GNEAttributeCarrier.cpp:640
GNEAttributeCarrier::TagProperties::isShape
bool isShape() const
return true if tag correspond to a shape
Definition: GNEAttributeCarrier.cpp:701
GNEAttributeCarrier::ATTRPROPERTY_VCLASS
Definition: GNEAttributeCarrier.h:74
GNEAttributeCarrier::TagProperties::isVehicleType
bool isVehicleType() const
return true if tag correspond to a vehicle type element
Definition: GNEAttributeCarrier.cpp:731
GNEAttributeCarrier::TAGPROPERTY_MASKSTARTENDPOS
Definition: GNEAttributeCarrier.h:315
GNEAttributeCarrier::ATTRPROPERTY_OPTIONAL
Definition: GNEAttributeCarrier.h:93
GUIVisualizationSettings.h
SUMO_TAG_NOTHING
invalid tag
Definition: SUMOXMLDefinitions.h:44
GNEAttributeCarrier::TagProperties::TagProperties
TagProperties()
default constructor
Definition: GNEAttributeCarrier.cpp:496
GNEAttributeCarrier::TagProperties::hasGEOShape
bool hasGEOShape() const
return true if tag correspond to an element that can use a geo shape
Definition: GNEAttributeCarrier.cpp:826
GNEAttributeCarrier::ATTRPROPERTY_UPDATEGEOMETRY
Definition: GNEAttributeCarrier.h:92
GNEAttributeCarrier::TagProperties::checkTagIntegrity
void checkTagIntegrity() const
check Tag integrity (this include all their attributes)
Definition: GNEAttributeCarrier.cpp:533
GNEAttributeCarrier::TagProperties::hasMinimumNumberOfChildren
bool hasMinimumNumberOfChildren() const
return true if tag correspond to an element that only have a limited number of children
Definition: GNEAttributeCarrier.cpp:850
GNEAttributeCarrier::TagProperties::myTagStr
std::string myTagStr
Sumo XML Tag vinculated wit this tag Property in String format.
Definition: GNEAttributeCarrier.h:493
GNEAttributeCarrier::fillAdditionals
static void fillAdditionals()
fill Additionals
Definition: GNEAttributeCarrier.cpp:1778
GNEAttributeCarrier::drawUsingSelectColor
virtual bool drawUsingSelectColor() const =0
check if attribute carrier must be drawn using selecting color.
GNEAttributeCarrier::TagProperties::canWriteChildrenSeparate
bool canWriteChildrenSeparate() const
return true if tag correspond to an element that can sort their children automatic
Definition: GNEAttributeCarrier.cpp:887
GNEAttributeCarrier::ATTRPROPERTY_PROBABILITY
Definition: GNEAttributeCarrier.h:81
GNEAttributeCarrier::isValid
virtual bool isValid(SumoXMLAttr key, const std::string &value)=0
SumoXMLTag
SumoXMLTag
Numbers representing SUMO-XML - element names.
Definition: SUMOXMLDefinitions.h:42
GNEAttributeCarrier::AttributeProperties::myDefaultValue
std::string myDefaultValue
default value (by default empty)
Definition: GNEAttributeCarrier.h:266
GNEAttributeCarrier::fillDemandElements
static void fillDemandElements()
fill Demand Elements
Definition: GNEAttributeCarrier.cpp:3053
GNEAttributeCarrier::AttributeProperties::myAttrStr
std::string myAttrStr
string with the Attribute in text format (to avoid unnecesaries toStrings(...) calls)
Definition: GNEAttributeCarrier.h:257
GNEAttributeCarrier::TAGPROPERTY_MASKXYZPOSITION
Definition: GNEAttributeCarrier.h:316
GNEAttributeCarrier::ATTRPROPERTY_FLOAT
Definition: GNEAttributeCarrier.h:68
GNEAttributeCarrier::TagProperties::getTag
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
Definition: GNEAttributeCarrier.cpp:521
GNEAttributeCarrier::AttributeProperties::isList
bool isList() const
return true if atribute is a list
Definition: GNEAttributeCarrier.cpp:422
GNEAttributeCarrier::ATTRPROPERTY_DEFAULTVALUESTATIC
Definition: GNEAttributeCarrier.h:86
GNEAttributeCarrier::TAGTYPE_PERSONTRIP
Definition: GNEAttributeCarrier.h:295
GNEAttributeCarrier::setEnabledAttribute
virtual void setEnabledAttribute(const int enabledAttributes)=0
method for enabling the attribute and nothing else (used in GNEChange_EnableAttribute)
GNEAttributeCarrier::parseMaskedPositionAttribute
static bool parseMaskedPositionAttribute(const SUMOSAXAttributes &attrs, const std::string &objectID, const TagProperties &tagProperties, const AttributeProperties &attrProperties, std::string &parsedAttribute, std::string &warningMessage)
parse and check masked (note: This function is only to improve legilibility)
Definition: GNEAttributeCarrier.cpp:4585
GNEAttributeCarrier::TagProperties::hasAttribute
bool hasAttribute(SumoXMLAttr attr) const
check if current TagProperties owns the attribute attr
Definition: GNEAttributeCarrier.cpp:678
GNEAttributeCarrier::AttributeProperties::cannotBeZero
bool cannotBeZero() const
return true if atribute cannot be zero
Definition: GNEAttributeCarrier.cpp:392
GNEEdge
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:50
GNEAttributeCarrier::ATTRPROPERTY_SYNONYM
Definition: GNEAttributeCarrier.h:89
GNEAttributeCarrier::TagProperties::canAutomaticSortChildren
bool canAutomaticSortChildren() const
return true if tag correspond to an element that can sort their children automatic
Definition: GNEAttributeCarrier.cpp:881
GNEAttributeCarrier::getHierarchyName
virtual std::string getHierarchyName() const =0
get Hierarchy Name (Used in AC Hierarchy)
GNEAttributeCarrier::TagProperties::getTagSynonym
SumoXMLTag getTagSynonym() const
get tag synonym
Definition: GNEAttributeCarrier.cpp:668
GNEAttributeCarrier::TAGTYPE_VEHICLE
Definition: GNEAttributeCarrier.h:290
NumberFormatException
Definition: UtilExceptions.h:96
GNEAttributeCarrier::TagProperties::isVehicle
bool isVehicle() const
return true if tag correspond to a vehicle element
Definition: GNEAttributeCarrier.cpp:737
GNEAttributeCarrier::FEATURE_GUESSED
static const std::string FEATURE_GUESSED
feature has been reguessed (may still be unchanged be we can't tell (yet)
Definition: GNEAttributeCarrier.h:587
GNEAttributeCarrier::fillCommonVehicleAttributes
static void fillCommonVehicleAttributes(SumoXMLTag currentTag)
fill common vehicle attributes (used by vehicles, trips, routeFlows and flows)
Definition: GNEAttributeCarrier.cpp:3851
GNEAttributeCarrier::AttributeProperties::AttributeProperties
AttributeProperties()
default constructor
Definition: GNEAttributeCarrier.cpp:58
GNEAttributeCarrier::ATTRPROPERTY_POSITION
Definition: GNEAttributeCarrier.h:72
GNEAttributeCarrier::TagProperties::isAttributeDeprecated
bool isAttributeDeprecated(SumoXMLAttr attr) const
return true if attribute of this tag is deprecated
Definition: GNEAttributeCarrier.cpp:905
GNEAttributeCarrier::TagProperties::canBlockShape
bool canBlockShape() const
return true if tag correspond to an element that can block their shape
Definition: GNEAttributeCarrier.cpp:808
GNEAttributeCarrier::operator=
GNEAttributeCarrier & operator=(const GNEAttributeCarrier &src)=delete
Invalidated assignment operator.
GNEAttributeCarrier::AttributeProperties::isFilename
bool isFilename() const
return true if atribute is a filename
Definition: GNEAttributeCarrier.cpp:404
GNEAttributeCarrier::getTagProperty
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
Definition: GNEAttributeCarrier.cpp:1171
GNEAttributeCarrier::fillStopElements
static void fillStopElements()
fill Stop elements
Definition: GNEAttributeCarrier.cpp:3497
GNEAttributeCarrier::AttributeProperties::myAttrSynonym
SumoXMLAttr myAttrSynonym
Attribute written in XML (If is SUMO_ATTR_NOTHING), original Attribute will be written)
Definition: GNEAttributeCarrier.h:272
GNEAttributeCarrier::ATTRPROPERTY_RANGE
Definition: GNEAttributeCarrier.h:90
GNEAttributeCarrier::lanesConsecutives
static bool lanesConsecutives(const std::vector< GNELane * > &lanes)
check if lanes are consecutives
Definition: GNEAttributeCarrier.cpp:1128
GNEAttributeCarrier::AttributeProperties
struct with the attribute Properties
Definition: GNEAttributeCarrier.h:99
GNEAttributeCarrier::AttributeProperties::isColor
bool isColor() const
return true if atribute is a color
Definition: GNEAttributeCarrier.cpp:398
GNEAttributeCarrier::allowedTagsByCategory
static std::vector< SumoXMLTag > allowedTagsByCategory(int tagPropertyCategory, bool onlyDrawables)
get tags of all editable element types using TagProperty Type (TAGTYPE_NETELEMENT,...
Definition: GNEAttributeCarrier.cpp:1231
GNEAttributeCarrier::AttributeProperties::isEnablitable
bool isEnablitable() const
return true if atribute is enablitable
Definition: GNEAttributeCarrier.cpp:488
GNEAttributeCarrier::TAGPROPERTY_GEOSHAPE
Definition: GNEAttributeCarrier.h:307
GNEAttributeCarrier::TAGPROPERTY_RTREE
Definition: GNEAttributeCarrier.h:319
GNEAttributeCarrier::fillPersonElements
static void fillPersonElements()
fill Person Elements
Definition: GNEAttributeCarrier.cpp:3586
GNEAttributeCarrier::AttrProperty
AttrProperty
struct with the tag Properties
Definition: GNEAttributeCarrier.h:66
GNEAttributeCarrier::TagProperties::isDemandElement
bool isDemandElement() const
return true if tag correspond to a demand element
Definition: GNEAttributeCarrier.cpp:713
GNEAttributeCarrier::TagProperties::hasGEOPosition
bool hasGEOPosition() const
return true if tag correspond to an element that can use a geo position
Definition: GNEAttributeCarrier.cpp:820
GNEAttributeCarrier::AttributeProperties::isWriteXMLOptional
bool isWriteXMLOptional() const
return true if atribute is write XML optional
Definition: GNEAttributeCarrier.cpp:440
GNEAttributeCarrier::TAGTYPE_ROUTE
Definition: GNEAttributeCarrier.h:291
GNEAttributeCarrier::canParse
static bool canParse(GNENet *net, const std::string &value, bool report)
true if a value of type T can be parsed from string
Definition: GNEAttributeCarrier.h:664
GNEAttributeCarrier::AttributeProperties::myMaximumRange
double myMaximumRange
maxium Range
Definition: GNEAttributeCarrier.h:278
GNEAttributeCarrier::ATTRPROPERTY_LIST
Definition: GNEAttributeCarrier.h:83
GNEAttributeCarrier::TAGTYPE_TAZ
Definition: GNEAttributeCarrier.h:286
GNEAttributeCarrier::ATTRPROPERTY_SUMOTIME
Definition: GNEAttributeCarrier.h:69
GNEAttributeCarrier::TAGPROPERTY_AUTOMATICSORTING
Definition: GNEAttributeCarrier.h:313
GNEAttributeCarrier::TagProperties::getParentTag
SumoXMLTag getParentTag() const
if Tag owns a parent, return parent tag
Definition: GNEAttributeCarrier.cpp:658
GNEAttributeCarrier::TAGPROPERTY_GEOPOSITION
Definition: GNEAttributeCarrier.h:306
ProcessError
Definition: UtilExceptions.h:40
GNEAttributeCarrier::TagProperties::addAttribute
void addAttribute(const AttributeProperties &attributeProperty)
add attribute (duplicated attributed aren't allowed)
Definition: GNEAttributeCarrier.cpp:588
GNEAttributeCarrier::AttributeProperties::setTagPropertyParent
void setTagPropertyParent(TagProperties *tagPropertyParent)
set tag property parent
Definition: GNEAttributeCarrier.cpp:159
GNEAttributeCarrier::myTagProperties
static std::map< SumoXMLTag, TagProperties > myTagProperties
map with the tags properties
Definition: GNEAttributeCarrier.h:864
GNEAttributeCarrier::AttributeProperties::getAttrStr
const std::string & getAttrStr() const
get XML Attribute
Definition: GNEAttributeCarrier.cpp:171
GNEAttributeCarrier::myTagProperty
const TagProperties & myTagProperty
the xml tag to which this attribute carrier corresponds
Definition: GNEAttributeCarrier.h:792
GNEChange_EnableAttribute
the function-object for an editing operation (abstract base)
Definition: GNEChange_EnableAttribute.h:45
GNEAttributeCarrier::AttributeProperties::getDefaultValue
const std::string & getDefaultValue() const
get default value
Definition: GNEAttributeCarrier.cpp:200
GNEAttributeCarrier::ATTRPROPERTY_STRING
Definition: GNEAttributeCarrier.h:71
GNEAttributeCarrier::TAGPROPERTY_MINIMUMCHILDREN
Definition: GNEAttributeCarrier.h:310
GUIIcons.h
GNEAttributeCarrier::TagProperties::canBeReparent
bool canBeReparent() const
return true if tag correspond to an element that can be reparent
Definition: GNEAttributeCarrier.cpp:875
UtilExceptions.h
GNEAttributeCarrier::AttributeProperties::getMinimumRange
double getMinimumRange() const
get minimum range
Definition: GNEAttributeCarrier.cpp:295
GNEAttributeCarrier::TagProperties::isWalk
bool isWalk() const
return true if tag correspond to a walk element
Definition: GNEAttributeCarrier.cpp:772
GNEAttributeCarrier::TagProperties::myDeprecatedAttributes
std::vector< SumoXMLAttr > myDeprecatedAttributes
List with the deprecated Attributes.
Definition: GNEAttributeCarrier.h:514
GNEAttributeCarrier::ATTRPROPERTY_ANGLE
Definition: GNEAttributeCarrier.h:82
GNEAttributeCarrier::AttributeProperties::~AttributeProperties
~AttributeProperties()
destructor
Definition: GNEAttributeCarrier.cpp:99
GNEAttributeCarrier::fillVehicleElements
static void fillVehicleElements()
fill vehicle elements
Definition: GNEAttributeCarrier.cpp:3348
GNEAttributeCarrier::AttributeProperties::getAttr
SumoXMLAttr getAttr() const
get XML Attribute
Definition: GNEAttributeCarrier.cpp:165
FormatException
Definition: UtilExceptions.h:82
GUIIcon
GUIIcon
An enumeration of icons used by the gui applications.
Definition: GUIIcons.h:36
GNEAttributeCarrier::AttributeProperties::isSecuential
bool isSecuential() const
return true if atribute is sequential
Definition: GNEAttributeCarrier.cpp:428
GNEAttributeCarrier::AttributeProperties::isVClass
bool isVClass() const
return true if atribute is a VehicleClass
Definition: GNEAttributeCarrier.cpp:410
GNEAttributeCarrier::AttributeProperties::getMaximumRange
double getMaximumRange() const
get maximum range
Definition: GNEAttributeCarrier.cpp:305
GNEAttributeCarrier::TAGPROPERTY_BLOCKSHAPE
Definition: GNEAttributeCarrier.h:304
GNEAttributeCarrier::TAGTYPE_DETECTOR
Definition: GNEAttributeCarrier.h:288
GNEAttributeCarrier::AttributeProperties::getTagPropertyParent
const TagProperties & getTagPropertyParent() const
get reference to tagProperty parent
Definition: GNEAttributeCarrier.cpp:177
GNEAttributeCarrier::TAGPROPERTY_NOGENERICPARAMETERS
Definition: GNEAttributeCarrier.h:318
GNEAttributeCarrier::canParse
static bool canParse(const std::string &string)
true if a value of type T can be parsed from string
Definition: GNEAttributeCarrier.h:645
GNEAttributeCarrier::TagProperties::myAttributeProperties
std::vector< AttributeProperties > myAttributeProperties
vector with the attribute values vinculated with this Tag
Definition: GNEAttributeCarrier.h:502
GNEAttributeCarrier::TAGPROPERTY_PARENT
Definition: GNEAttributeCarrier.h:309
GNEAttributeCarrier::ATTRPROPERTY_SECUENCIAL
Definition: GNEAttributeCarrier.h:84
SUMO_ATTR_POSITION
Definition: SUMOXMLDefinitions.h:658
GNEAttributeCarrier::ATTRPROPERTY_WRITEXMLOPTIONAL
Definition: GNEAttributeCarrier.h:85
GNEAttributeCarrier::AttributeProperties::hasMutableDefaultValue
bool hasMutableDefaultValue() const
return true if attribute owns a mutable default value
Definition: GNEAttributeCarrier.cpp:321
GNEAttributeCarrier::AttributeProperties::myTagPropertyParent
TagProperties * myTagPropertyParent
pointer to tagProperty parent
Definition: GNEAttributeCarrier.h:254
GNEAttributeCarrier::AttributeProperties::hasStaticDefaultValue
bool hasStaticDefaultValue() const
return true if attribute owns a static default value
Definition: GNEAttributeCarrier.cpp:315
GNEAttributeCarrier::TagProperties::~TagProperties
~TagProperties()
destructor
Definition: GNEAttributeCarrier.cpp:517
GNEAttributeCarrier::ATTRPROPERTY_FILENAME
Definition: GNEAttributeCarrier.h:78
GNEAttributeCarrier::INVALID_POSITION
static const double INVALID_POSITION
invalid double position
Definition: GNEAttributeCarrier.h:600
BoolFormatException
Definition: UtilExceptions.h:109
GNEAttributeCarrier::parse
static T parse(const std::string &string)
parses a value of type T from string (used for basic types: int, double, bool, etc....
GNEAttributeCarrier::isAttributeCarrierSelected
virtual bool isAttributeCarrierSelected() const =0
check if attribute carrier is selected
GNEAttributeCarrier::AttributeProperties::isDiscrete
bool isDiscrete() const
return true if atribute is discrete
Definition: GNEAttributeCarrier.cpp:446
GNEAttributeCarrier::getPopUpID
virtual std::string getPopUpID() const =0
get PopPup ID (Used in AC Hierarchy)
GNEAttributeCarrier::TagProperties::isPersonTrip
bool isPersonTrip() const
return true if tag correspond to a person trip
Definition: GNEAttributeCarrier.cpp:766
GNEAttributeCarrier::enableAttribute
virtual void enableAttribute(SumoXMLAttr key, GNEUndoList *undoList)=0
GNEAttributeCarrier::TAGTYPE_STOP
Definition: GNEAttributeCarrier.h:292
GNEAttributeCarrier::fillCommonStopAttributes
static void fillCommonStopAttributes(SumoXMLTag currentTag)
fill stop person attributes (used by stops and personStps)
Definition: GNEAttributeCarrier.cpp:4339
GNEAttributeCarrier::TAGPROPERTY_BLOCKMOVEMENT
Definition: GNEAttributeCarrier.h:303
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:48
GNEAttributeCarrier::fillCarFollowingModelAttributes
static void fillCarFollowingModelAttributes(SumoXMLTag currentTag)
fill Car Following Model of Vehicle/Person Types
Definition: GNEAttributeCarrier.cpp:3972
GNEAttributeCarrier::TagProperties::isPersonPlan
bool isPersonPlan() const
return true if tag correspond to a person plan
Definition: GNEAttributeCarrier.cpp:760
GNEAttributeCarrier::TagType
TagType
Definition: GNEAttributeCarrier.h:281
GNEAttributeCarrier::TagProperties::isSelectable
bool isSelectable() const
return true if tag correspond to a selectable element
Definition: GNEAttributeCarrier.cpp:796
GNEAttributeCarrier::TagProperties::getDefaultValue
const std::string & getDefaultValue(SumoXMLAttr attr) const
return the default value of the attribute of an element
Definition: GNEAttributeCarrier.cpp:572
GNEAttributeCarrier::allowedTags
static std::vector< SumoXMLTag > allowedTags(bool onlyDrawables)
get tags of all editable element types
Definition: GNEAttributeCarrier.cpp:1214
GNEAttributeCarrier::TAGTYPE_PERSONPLAN
Definition: GNEAttributeCarrier.h:294
GNEAttributeCarrier::AttributeProperties::getDiscreteValues
const std::vector< std::string > & getDiscreteValues() const
get discrete values
Definition: GNEAttributeCarrier.cpp:279
GNEAttributeCarrier::TAGProperty
TAGProperty
Definition: GNEAttributeCarrier.h:301
GNEAttributeCarrier::TagProperties::isPersonStop
bool isPersonStop() const
return true if tag correspond to a person stop element
Definition: GNEAttributeCarrier.cpp:784
GNEAttributeCarrier::TagProperties::hasTagSynonym
bool hasTagSynonym() const
return true if tag correspond to an element that will be written in XML with another tag
Definition: GNEAttributeCarrier.cpp:838
GNEAttributeCarrier::TAGTYPE_PERSONSTOP
Definition: GNEAttributeCarrier.h:298
GNEAttributeCarrier::TagProperties::myIcon
GUIIcon myIcon
icon associated to this Tag
Definition: GNEAttributeCarrier.h:505
GNEAttributeCarrier::~GNEAttributeCarrier
virtual ~GNEAttributeCarrier()
Destructor.
Definition: GNEAttributeCarrier.cpp:919
GNEAttributeCarrier::AttributeProperties::isBool
bool isBool() const
return true if atribute is boolean
Definition: GNEAttributeCarrier.cpp:356
GNEAttributeCarrier::fillLaneChangingModelAttributes
static void fillLaneChangingModelAttributes(SumoXMLTag currentTag)
fill Junction Model Attributes of Vehicle/Person Types
Definition: GNEAttributeCarrier.cpp:4186
GNEAttributeCarrier::FEATURE_MODIFIED
static const std::string FEATURE_MODIFIED
feature has been manually modified (implies approval)
Definition: GNEAttributeCarrier.h:590
GNEAttributeCarrier::AttributeProperties::hasAttrSynonym
bool hasAttrSynonym() const
return true if Attr correspond to an element that will be written in XML with another name
Definition: GNEAttributeCarrier.cpp:327
SUMO_ATTR_LAT
Definition: SUMOXMLDefinitions.h:812
GNEAttributeCarrier::TagProperties::canBlockMovement
bool canBlockMovement() const
return true if tag correspond to an element that can block their movement
Definition: GNEAttributeCarrier.cpp:802
GNE_ATTR_BLOCK_MOVEMENT
block movement of a graphic element
Definition: SUMOXMLDefinitions.h:978
GNEAttributeCarrier::getAttribute
virtual std::string getAttribute(SumoXMLAttr key) const =0
GNEAttributeCarrier::AttributeProperties::isNumerical
bool isNumerical() const
return true if atribute is numerical (int or float)
Definition: GNEAttributeCarrier.cpp:380
GNEAttributeCarrier::TAGTYPE_RIDE
Definition: GNEAttributeCarrier.h:297
GNEAttributeCarrier::AttributeProperties::myMinimumRange
double myMinimumRange
minimun Range
Definition: GNEAttributeCarrier.h:275
GNEAttributeCarrier::TagProperties::isDrawable
bool isDrawable() const
return true if tag correspond to a drawable element
Definition: GNEAttributeCarrier.cpp:790
GNEAttributeCarrier::TagProperties::isDetector
bool isDetector() const
return true if tag correspond to a shape (Only used to group all detectors in the XML)
Definition: GNEAttributeCarrier.cpp:725
SUMOSAXAttributes.h
GNEAttributeCarrier::ATTRPROPERTY_COLOR
Definition: GNEAttributeCarrier.h:73
GNEAttributeCarrier::TAGTYPE_STOPPINGPLACE
Definition: GNEAttributeCarrier.h:287
GNEAttributeCarrier::TagProperties::hasDialog
bool hasDialog() const
return true if tag correspond to an element that can be edited using a dialog
Definition: GNEAttributeCarrier.cpp:844
GNEAttributeCarrier::AttributeProperties::requiereUpdateGeometry
bool requiereUpdateGeometry() const
return true if atribute requieres a update geometry in setAttribute(...)
Definition: GNEAttributeCarrier.cpp:470
GNEAttributeCarrier::TAGTYPE_NETELEMENT
Definition: GNEAttributeCarrier.h:282
GNEReferenceCounter
Definition: GNEReferenceCounter.h:38
GNEAttributeCarrier::FEATURE_APPROVED
static const std::string FEATURE_APPROVED
feature has been approved but not changed (i.e. after being reguessed)
Definition: GNEAttributeCarrier.h:593
GNEAttributeCarrier::TagProperties::getGUIIcon
GUIIcon getGUIIcon() const
get GUI icon associated to this Tag
Definition: GNEAttributeCarrier.cpp:652
GNEAttributeCarrier::getAttributeForSelection
virtual std::string getAttributeForSelection(SumoXMLAttr key) const
method for getting the attribute in the context of object selection
Definition: GNEAttributeCarrier.cpp:1159
GNEAttributeCarrier::AttributeProperties::getPositionListed
int getPositionListed() const
get position in list (used in frames for listing attributes with certain sort)
Definition: GNEAttributeCarrier.cpp:183
GNEAttributeCarrier::TagProperties::getAttributeProperties
const AttributeProperties & getAttributeProperties(SumoXMLAttr attr) const
get attribute (throw error if doesn't exist)
Definition: GNEAttributeCarrier.cpp:621
config.h
GNEAttributeCarrier::getTagProperties
static const TagProperties & getTagProperties(SumoXMLTag tag)
get Tag Properties
Definition: GNEAttributeCarrier.cpp:1196
GNEAttributeCarrier::setAttribute
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
GNEAttributeCarrier::AttributeProperties::isCombinable
bool isCombinable() const
return true if atribute is combinable with other Attribute
Definition: GNEAttributeCarrier.cpp:452
GNEAttributeCarrier::AttributeProperties::isNonEditable
bool isNonEditable() const
return true if atribute isn't editable
Definition: GNEAttributeCarrier.cpp:458
GNEAttributeCarrier::ATTRPROPERTY_POSITIVE
Definition: GNEAttributeCarrier.h:75
GNEAttributeCarrier::AttributeProperties::myAttribute
SumoXMLAttr myAttribute
XML Attribute.
Definition: GNEAttributeCarrier.h:251
GNEAttributeCarrier::TagProperties::canCloseShape
bool canCloseShape() const
return true if tag correspond to an element that can close their shape
Definition: GNEAttributeCarrier.cpp:814
GNEAttributeCarrier::TAGPROPERTY_SORTINGCHILDREN
Definition: GNEAttributeCarrier.h:320
GNEAttributeCarrier::AttributeProperties::isExtended
bool isExtended() const
return true if atribute is extended
Definition: GNEAttributeCarrier.cpp:464
GNEChange_Attribute
the function-object for an editing operation (abstract base)
Definition: GNEChange_Attribute.h:48
GNEAttributeCarrier::TagProperties::hasParent
bool hasParent() const
return true if tag correspond to an element that can had another element as parent
Definition: GNEAttributeCarrier.cpp:832
GNEAttributeCarrier::TAGPROPERTY_DRAWABLE
Definition: GNEAttributeCarrier.h:302
GNEAttributeCarrier::ATTRPROPERTY_BOOL
Definition: GNEAttributeCarrier.h:70
GNEAttributeCarrier::AttributeProperties::isInt
bool isInt() const
return true if atribute is an integer
Definition: GNEAttributeCarrier.cpp:338
GNEAttributeCarrier::AttributeProperties::getAttrSynonym
SumoXMLAttr getAttrSynonym() const
get tag synonym
Definition: GNEAttributeCarrier.cpp:285
GNEAttributeCarrier::TagProperties::isRide
bool isRide() const
return true if tag correspond to a ride element
Definition: GNEAttributeCarrier.cpp:778
GNEAttributeCarrier::getTagStr
const std::string & getTagStr() const
get tag assigned to this object in string format
Definition: GNEAttributeCarrier.cpp:1165
GNEAttributeCarrier::AttributeProperties::myDefinition
std::string myDefinition
text with a definition of attribute
Definition: GNEAttributeCarrier.h:263
GNEUndoList
Definition: GNEUndoList.h:49
GNEAttributeCarrier::TAGPROPERTY_REPARENT
Definition: GNEAttributeCarrier.h:311
GNEAttributeCarrier::AttributeProperties::hasAttrRange
bool hasAttrRange() const
return true if Attr correspond to an element that only accept a range of values
Definition: GNEAttributeCarrier.cpp:332
GNEAttributeCarrier::AttributeProperties::isSVCPermission
bool isSVCPermission() const
return true if atribute is a VehicleClass
Definition: GNEAttributeCarrier.cpp:416
GNEAttributeCarrier::isAttributeEnabled
virtual bool isAttributeEnabled(SumoXMLAttr key) const =0
GNEAttributeCarrier::fillJunctionModelAttributes
static void fillJunctionModelAttributes(SumoXMLTag currentTag)
fill Junction Model Attributes of Vehicle/Person Types
Definition: GNEAttributeCarrier.cpp:4120
SUMO_ATTR_LON
Definition: SUMOXMLDefinitions.h:811
GNEAttributeCarrier::TagProperties::myTagType
int myTagType
Attribute Type.
Definition: GNEAttributeCarrier.h:496
GNEAttributeCarrier::getGenericParameters
virtual std::vector< std::pair< std::string, std::string > > getGenericParameters() const =0
return generic parameters as vector of pairs format
GNEAttributeCarrier::TAGTYPE_WALK
Definition: GNEAttributeCarrier.h:296
GNEAttributeCarrier::FEATURE_LOADED
static const std::string FEATURE_LOADED
Definition: GNEAttributeCarrier.h:584
GNEReferenceCounter.h
GNEAttributeCarrier::AttributeProperties::isString
bool isString() const
return true if atribute is a string
Definition: GNEAttributeCarrier.cpp:362
GNEAttributeCarrier::AttributeProperties::isComplex
bool isComplex() const
return true if atribute is complex
Definition: GNEAttributeCarrier.cpp:482
GNEAttributeCarrier::ATTRPROPERTY_NONEDITABLE
Definition: GNEAttributeCarrier.h:79
SumoXMLAttr
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
Definition: SUMOXMLDefinitions.h:373
SUMOSAXAttributes
Encapsulated SAX-Attributes.
Definition: SUMOSAXAttributes.h:57
GNEAttributeCarrier::setGenericParametersStr
virtual void setGenericParametersStr(const std::string &value)=0
set generic parameters in string format
GNEAttributeCarrier::AttributeProperties::myAttributeProperty
int myAttributeProperty
Property of attribute.
Definition: GNEAttributeCarrier.h:260
GNEAttributeCarrier::getGenericParametersStr
virtual std::string getGenericParametersStr() const =0
return generic parameters in string format
GNELane
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:46
GNEAttributeCarrier::TAGTYPE_SHAPE
Definition: GNEAttributeCarrier.h:284
GNEAttributeCarrier::fillNetElements
static void fillNetElements()
fill Net Elements
Definition: GNEAttributeCarrier.cpp:1405
GNEAttributeCarrier::fillCommonPersonAttributes
static void fillCommonPersonAttributes(SumoXMLTag currentTag)
fill common person attributes (used by person and personFlows)
Definition: GNEAttributeCarrier.cpp:4309
GNEAttributeCarrier
Definition: GNEAttributeCarrier.h:54
SUMOXMLDefinitions.h
GNEAttributeCarrier::TagProperties::myParentTag
SumoXMLTag myParentTag
parent tag
Definition: GNEAttributeCarrier.h:508
GNEAttributeCarrier::AttributeProperties::myDiscreteValues
std::vector< std::string > myDiscreteValues
discrete values that can take this Attribute (by default empty)
Definition: GNEAttributeCarrier.h:269
GNEAttributeCarrier::TagProperties::canMaskXYZPositions
bool canMaskXYZPositions() const
return true if tag correspond to an element that can mask the attributes "X", "Y" and "Z" position as...
Definition: GNEAttributeCarrier.cpp:899
GNEAttributeCarrier::TAGPROPERTY_CLOSESHAPE
Definition: GNEAttributeCarrier.h:305
GNEAttributeCarrier::MAXNUMBEROFATTRIBUTES
static const size_t MAXNUMBEROFATTRIBUTES
max number of attributes allowed for every tag
Definition: GNEAttributeCarrier.h:597
GNEAttributeCarrier::TagProperties::getNumberOfAttributes
int getNumberOfAttributes() const
get number of attributes
Definition: GNEAttributeCarrier.cpp:646
GNEAttributeCarrier::unselectAttributeCarrier
virtual void unselectAttributeCarrier(bool changeFlag=true)=0
unselect attribute carrier using GUIGlobalSelection
GNEAttributeCarrier::AttributeProperties::getDescription
std::string getDescription() const
return a description of attribute
Definition: GNEAttributeCarrier.cpp:206
GNEAttributeCarrier::ATTRPROPERTY_NOTZERO
Definition: GNEAttributeCarrier.h:76
GNEAttributeCarrier::AttributeProperties::setRange
void setRange(const double minimum, const double maximum)
set range
Definition: GNEAttributeCarrier.cpp:148
GNEAttributeCarrier::TAGTYPE_PERSON
Definition: GNEAttributeCarrier.h:293
GNEAttributeCarrier::ATTRPROPERTY_COMBINABLE
Definition: GNEAttributeCarrier.h:88