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 /****************************************************************************/
14 // Abstract Base class for gui objects which carry attributes
15 /****************************************************************************/
16 #ifndef GNEAttributeCarrier_h
17 #define GNEAttributeCarrier_h
18 
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 #include <config.h>
24 
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_UNIQUE = 1 << 9, // Attribute is unique (cannot be edited in a selection of similar elements (ID, Position...)
77  ATTRPROPERTY_FILENAME = 1 << 10, // Attribute is a filename (string that cannot contains certain characters)
78  ATTRPROPERTY_DISCRETE = 1 << 11, // Attribute is discrete (only certain values are allowed)
79  ATTRPROPERTY_PROBABILITY = 1 << 12, // Attribute is probability (only allowed values between 0 and 1, including both)
80  ATTRPROPERTY_ANGLE = 1 << 13, // Attribute is an angle (only takes values between 0 and 360, including both, another value will be automatically reduced
81  ATTRPROPERTY_LIST = 1 << 14, // Attribute is a list of other elements separated by spaces
82  ATTRPROPERTY_SECUENCIAL = 1 << 15, // Attribute is a special sequence of elements (for example: secuencial lanes in Multi Lane E2 detectors)
83  ATTRPROPERTY_OPTIONAL = 1 << 16, // Attribute will not be written in XML file if current value is the same of his default Static/Mutable value
84  ATTRPROPERTY_DEFAULTVALUESTATIC = 1 << 17, // Attribute owns a static default value
85  ATTRPROPERTY_DEFAULTVALUEMUTABLE = 1 << 18, // Attribute owns a mutable default value (Default value depends of value of other attribute)
86  ATTRPROPERTY_VCLASSES = 1 << 19, // Attribute is a combination of VClasses (allow/disallow)
87  ATTRPROPERTY_SYNONYM = 1 << 20, // Attribute will be written with a different name in der XML
88  ATTRPROPERTY_RANGE = 1 << 21, // Attribute only accept a range of elements (example: Probability [0,1])
89  ATTRPROPERTY_EXTENDED = 1 << 22, // Attribute is extended (in Frame will not be shown, but is editable in a Dialog, see VType attributes)
90  ATTRPROPERTY_UPDATEGEOMETRY = 1 << 23, // Attribute require update geometry at the end of function setAttribute(...)
91  ATTRPROPERTY_ACTIVATABLE = 1 << 24, // Attribute can be switch on/off using a checkbox in frame
92  ATTRPROPERTY_COMPLEX = 1 << 25, // Attribute is complex: Requiere a special function to check if the given value is valid
93  ATTRPROPERTY_FLOWDEFINITION = 1 << 26, // Attribute is part of a flow definition (Number, vehsPerHour...)
94  };
95 
98 
99  public:
102 
104  AttributeProperties(const SumoXMLAttr attribute, const int attributeProperty, const std::string& definition, std::string defaultValue = "");
105 
108 
111 
113  void setDiscreteValues(const std::vector<std::string>& discreteValues);
114 
116  void setSynonym(const SumoXMLAttr synonym);
117 
119  void setRange(const double minimum, const double maximum);
120 
122  void setTagPropertyParent(TagProperties* tagPropertyParent);
123 
125  SumoXMLAttr getAttr() const;
126 
128  const std::string& getAttrStr() const;
129 
131  const TagProperties& getTagPropertyParent() const;
132 
134  int getPositionListed() const;
135 
137  const std::string& getDefinition() const;
138 
140  const std::string& getDefaultValue() const;
141 
143  std::string getDescription() const;
144 
146  const std::vector<std::string>& getDiscreteValues() const;
147 
149  SumoXMLAttr getAttrSynonym() const;
150 
152  double getMinimumRange() const;
153 
155  double getMaximumRange() const;
156 
158  bool hasStaticDefaultValue() const;
159 
161  bool hasMutableDefaultValue() const;
162 
164  bool hasAttrSynonym() const;
165 
167  bool hasAttrRange() const;
168 
170  bool isInt() const;
171 
173  bool isFloat() const;
174 
176  bool isSUMOTime() const;
177 
179  bool isBool() const;
180 
182  bool isString() const;
183 
185  bool isposition() const;
186 
188  bool isProbability() const;
189 
191  bool isNumerical() const;
192 
194  bool isPositive() const;
195 
197  bool isColor() const;
198 
200  bool isFilename() const;
201 
203  bool isVClass() const;
204 
206  bool isSVCPermission() const;
207 
209  bool isList() const;
210 
212  bool isSecuential() const;
213 
215  bool isUnique() const;
216 
218  bool isOptional() const;
219 
221  bool isDiscrete() const;
222 
224  bool isVClasses() const;
225 
227  bool isExtended() const;
228 
230  bool requireUpdateGeometry() const;
231 
233  bool isActivatable() const;
234 
236  bool isComplex() const;
237 
239  bool isFlowDefinition() const;
240 
241  private:
244 
247 
249  std::string myAttrStr;
250 
253 
255  std::string myDefinition;
256 
258  std::string myDefaultValue;
259 
261  std::vector<std::string> myDiscreteValues;
262 
265 
268 
271  };
272 
273  enum TagType {
274  TAGTYPE_NETELEMENT = 1 << 0, // Edges, Junctions, Lanes...
275  TAGTYPE_ADDITIONAL = 1 << 1, // Bus Stops, Charging Stations, Detectors...
276  TAGTYPE_SHAPE = 1 << 2, // POIs, Polygons
277  TAGTYPE_DEMANDELEMENT = 1 << 3, // Routes, Vehicles, Trips...
278  TAGTYPE_TAZ = 1 << 4, // Traffic Assignment Zones
279  TAGTYPE_STOPPINGPLACE = 1 << 5, // StoppingPlaces (BusStops, ChargingStations...)
280  TAGTYPE_DETECTOR = 1 << 6, // Detectors (E1, E2...)
281  TAGTYPE_VTYPE = 1 << 7, // Vehicle types (vType and pTye)
282  TAGTYPE_VEHICLE = 1 << 8, // Vehicles (Flows, trips...)
283  TAGTYPE_ROUTE = 1 << 9, // Routes and embedded routes
284  TAGTYPE_STOP = 1 << 10, // Stops
285  TAGTYPE_PERSON = 1 << 11, // Persons
286  TAGTYPE_PERSONPLAN = 1 << 12, // Person plans (Walks, rides, ...)
287  TAGTYPE_PERSONTRIP = 1 << 13, // Walks
288  TAGTYPE_WALK = 1 << 14, // Walks
289  TAGTYPE_RIDE = 1 << 15, // Rides
290  TAGTYPE_PERSONSTOP = 1 << 16, // Person stops
291  };
292 
293  enum TAGProperty {
294  TAGPROPERTY_DRAWABLE = 1 << 0, // Element can be drawed in view
295  TAGPROPERTY_BLOCKMOVEMENT = 1 << 1, // Element can block their movement
296  TAGPROPERTY_BLOCKSHAPE = 1 << 2, // Element can block their shape
297  TAGPROPERTY_CLOSESHAPE = 1 << 3, // Element can close their shape
298  TAGPROPERTY_GEOPOSITION = 1 << 4, // Element's position can be defined using a GEO position
299  TAGPROPERTY_GEOSHAPE = 1 << 5, // Element's shape acn be defined using a GEO Shape
300  TAGPROPERTY_DIALOG = 1 << 6, // Element can be edited using a dialog (GNECalibratorDialog, GNERerouterDialog...)
301  TAGPROPERTY_PARENT = 1 << 7, // Element will be writed in XML as child of another element (E3Entry -> E3Detector...)
302  TAGPROPERTY_MINIMUMCHILDREN = 1 << 8, // Element will be only writed in XML if has a minimum number of children
303  TAGPROPERTY_REPARENT = 1 << 9, // Element can be reparent
304  TAGPROPERTY_SYNONYM = 1 << 10, // Element will be written with a different name in der XML
305  TAGPROPERTY_AUTOMATICSORTING = 1 << 11, // Element sort automatic their Children (used by Additionals)
306  TAGPROPERTY_SELECTABLE = 1 << 12, // Element is selectable
307  TAGPROPERTY_MASKSTARTENDPOS = 1 << 13, // Element mask attributes StartPos and EndPos as "length" (Only used in the appropiate GNEFrame)
308  TAGPROPERTY_MASKXYZPOSITION = 1 << 14, // Element mask attributes X, Y and Z as "Position"
309  TAGPROPERTY_WRITECHILDRENSEPARATE = 1 << 15, // Element writes their children in a separated filename
310  TAGPROPERTY_NOPARAMETERS = 1 << 16, // Element doesn't accept parameters "key1=value1|key2=value2|...|keyN=valueN" (by default all tags supports parameters)
311  TAGPROPERTY_RTREE = 1 << 17, // Element is placed in RTREE
312  TAGPROPERTY_SORTINGCHILDREN = 1 << 18, // Element can be sorted in their parent element manually (in ACHierarchy)
313  TAGPROPERTY_CENTERAFTERCREATION = 1 << 19, // Camera is moved after element creation
314  };
315 
318  public:
320  TagProperties();
321 
323  TagProperties(SumoXMLTag tag, int tagType, int tagProperty, GUIIcon icon, SumoXMLTag parentTag = SUMO_TAG_NOTHING, SumoXMLTag tagSynonym = SUMO_TAG_NOTHING);
324 
326  ~TagProperties();
327 
329  SumoXMLTag getTag() const;
330 
332  const std::string& getTagStr() const;
333 
335  void checkTagIntegrity() const;
336 
338  void addAttribute(const AttributeProperties& attributeProperty);
339 
342 
345 
347  std::vector<AttributeProperties>::const_iterator begin() const;
348 
350  std::vector<AttributeProperties>::const_iterator end() const;
351 
353  int getNumberOfAttributes() const;
354 
356  const std::string& getDefaultValue(SumoXMLAttr attr) const;
357 
359  GUIIcon getGUIIcon() const;
360 
362  SumoXMLTag getParentTag() const;
363 
365  SumoXMLTag getTagSynonym() const;
366 
368  bool hasAttribute(SumoXMLAttr attr) const;
369 
371  bool isNetElement() const;
372 
374  bool isAdditional() const;
375 
377  bool isShape() const;
378 
380  bool isTAZ() const;
381 
383  bool isDemandElement() const;
384 
386  bool isStoppingPlace() const;
387 
389  bool isDetector() const;
390 
392  bool isVehicleType() const;
393 
395  bool isVehicle() const;
396 
398  bool isRoute() const;
399 
401  bool isStop() const;
402 
404  bool isPerson() const;
405 
407  bool isPersonPlan() const;
408 
410  bool isPersonTrip() const;
411 
413  bool isWalk() const;
414 
416  bool isRide() const;
417 
419  bool isPersonStop() const;
420 
422  bool isDrawable() const;
423 
425  bool isSelectable() const;
426 
428  bool canBlockMovement() const;
429 
431  bool canBlockShape() const;
432 
434  bool canCloseShape() const;
435 
437  bool hasGEOPosition() const;
438 
440  bool hasGEOShape() const;
441 
443  bool hasParent() const;
444 
446  bool hasTagSynonym() const;
447 
449  bool hasDialog() const;
450 
452  bool hasMinimumNumberOfChildren() const;
453 
455  bool hasParameters() const;
456 
458  bool isPlacedInRTree() const;
459 
461  bool canBeSortedManually() const;
462 
464  bool canBeReparent() const;
465 
467  bool canAutomaticSortChildren() const;
468 
470  bool canWriteChildrenSeparate() const;
471 
473  bool canMaskStartEndPos() const;
474 
476  bool canMaskXYZPositions() const;
477 
479  bool canCenterCameraAfterCreation() const;
480 
482  bool isAttributeDeprecated(SumoXMLAttr attr) const;
483 
484  private:
487 
489  std::string myTagStr;
490 
493 
496 
498  std::vector<AttributeProperties> myAttributeProperties;
499 
502 
505 
508 
510  std::vector<SumoXMLAttr> myDeprecatedAttributes;
511  };
512 
517  GNEAttributeCarrier(const SumoXMLTag tag);
518 
520  virtual ~GNEAttributeCarrier();
521 
523  virtual void updateGeometry() = 0;
524 
528  virtual void selectAttributeCarrier(bool changeFlag = true) = 0;
529 
531  virtual void unselectAttributeCarrier(bool changeFlag = true) = 0;
532 
534  virtual bool isAttributeCarrierSelected() const = 0;
535 
537  virtual bool drawUsingSelectColor() const = 0;
538 
539  /* @brief method for getting the Attribute of an XML key
540  * @param[in] key The attribute key
541  * @return string with the value associated to key
542  */
543  virtual std::string getAttribute(SumoXMLAttr key) const = 0;
544 
545  /* @brief method for setting the attribute and letting the object perform additional changes
546  * @param[in] key The attribute key
547  * @param[in] value The new value
548  * @param[in] undoList The undoList on which to register changes
549  */
550  virtual void setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) = 0;
551 
552  /* @brief method for check if new value for certain attribute is valid
553  * @param[in] key The attribute key
554  * @param[in] value The new value
555  */
556  virtual bool isValid(SumoXMLAttr key, const std::string& value) = 0;
557 
558  /* @brief method for enable attribute
559  * @param[in] key The attribute key
560  * @param[in] undoList The undoList on which to register changes
561  * @note certain attributes can be only enabled, and can produce the disabling of other attributes
562  */
563  virtual void enableAttribute(SumoXMLAttr key, GNEUndoList* undoList) = 0;
564 
565  /* @brief method for disable attribute
566  * @param[in] key The attribute key
567  * @param[in] undoList The undoList on which to register changes
568  * @note certain attributes can be only enabled, and can produce the disabling of other attributes
569  */
570  virtual void disableAttribute(SumoXMLAttr key, GNEUndoList* undoList) = 0;
571 
572  /* @brief method for check if the value for certain attribute is set
573  * @param[in] key The attribute key
574  */
575  virtual bool isAttributeEnabled(SumoXMLAttr key) const = 0;
576 
578  virtual std::string getPopUpID() const = 0;
579 
581  virtual std::string getHierarchyName() const = 0;
583 
584  /* @brief method for return an alternative value for disabled attributes. Used only in GNEFrames
585  * @param[in] key The attribute key
586  */
588 
592  static const std::string FEATURE_LOADED;
593 
595  static const std::string FEATURE_GUESSED;
596 
598  static const std::string FEATURE_MODIFIED;
599 
601  static const std::string FEATURE_APPROVED;
603 
605  static const size_t MAXNUMBEROFATTRIBUTES;
606 
608  static const double INVALID_POSITION;
609 
611  virtual std::string getAttributeForSelection(SumoXMLAttr key) const;
612 
614  const std::string& getTagStr() const;
615 
617  const TagProperties& getTagProperty() const;
618 
620  FXIcon* getIcon() const;
621 
623  const std::string getID() const;
624 
626  static const TagProperties& getTagProperties(SumoXMLTag tag);
627 
629  static std::vector<SumoXMLTag> allowedTags(bool onlyDrawables);
630 
632  static std::vector<SumoXMLTag> allowedTagsByCategory(int tagPropertyCategory, bool onlyDrawables);
633 
635  template<typename T>
636  static bool canParse(const std::string& string) {
637  try {
638  parse<T>(string);
639  } catch (NumberFormatException&) {
640  return false;
641  } catch (TimeFormatException&) {
642  return false;
643  } catch (EmptyData&) {
644  return false;
645  } catch (BoolFormatException&) {
646  return false;
647  }
648  return true;
649  }
650 
652  template<typename T>
653  static T parse(const std::string& string);
654 
656  template<typename T>
657  static bool canParse(GNENet* net, const std::string& value, bool report) {
658  try {
659  parse<T>(net, value);
660  } catch (FormatException& exception) {
661  if (report) {
662  WRITE_WARNING(exception.what())
663  }
664  return false;
665  }
666  return true;
667  }
668 
670  template<typename T>
671  static T parse(GNENet* net, const std::string& value);
672 
674  template<typename T>
675  static std::string parseIDs(const std::vector<T>& ACs);
676 
678  static bool lanesConsecutives(const std::vector<GNELane*>& lanes);
679 
681  template <typename T>
682  static T parseAttributeFromXML(const SUMOSAXAttributes& attrs, const std::string& objectID, const SumoXMLTag tag, const SumoXMLAttr attribute, bool& abort) {
683  bool parsedOk = true;
684  // declare string values
685  std::string defaultValue, parsedAttribute, warningMessage;
686  // obtain tag properties
687  const auto& tagProperties = getTagProperties(tag);
688  // first check if attribute is deprecated
689  if (tagProperties.isAttributeDeprecated(attribute)) {
690  // show warning if deprecateda ttribute is in the SUMOSAXAttributes
691  if (attrs.hasAttribute(attribute)) {
692  WRITE_WARNING("Attribute " + toString(attribute) + "' of " + tagProperties.getTagStr() + " is deprecated and will not be loaded.");
693  }
694  // return a dummy value
695  return parse<T>("");
696  }
697  // now check if we're obtaining attribute of an object with an already parsed ID
698  if (objectID != "") {
699  warningMessage = tagProperties.getTagStr() + " with ID '" + objectID + "'";
700  } else {
701  warningMessage = tagProperties.getTagStr();
702  }
703  // check if we're parsing block movement
704  if (attribute == GNE_ATTR_BLOCK_MOVEMENT) {
705  // first check if we can parse
706  if (tagProperties.canBlockMovement()) {
707  // First check if attribute can be parsed to bool
708  parsedAttribute = attrs.get<std::string>(attribute, objectID.c_str(), parsedOk, false);
709  // check that sucesfully parsed attribute can be converted to type double
710  if (!canParse<bool>(parsedAttribute)) {
711  abort = true;
712  // return default value
713  return parse<T>("0");
714  } else {
715  // return readed value
716  return parse<T>(parsedAttribute);
717  }
718  } else {
719  throw ProcessError("Trying to parsing block movement attribute in an AC that cannot be moved");
720  }
721  }
722  // now check if we're parsing a GEO Attribute
723  if (tagProperties.hasGEOPosition() && ((attribute == SUMO_ATTR_LON) || (attribute == SUMO_ATTR_LAT))) {
724  // first check if GEO Attribute is defined
725  if (attrs.hasAttribute(attribute)) {
726  // First check if attribute can be parsed to string
727  parsedAttribute = attrs.get<std::string>(attribute, objectID.c_str(), parsedOk, false);
728  // check that sucesfully parsed attribute can be converted to type double
729  if (!canParse<double>(parsedAttribute)) {
730  WRITE_WARNING("Format of GEO attribute '" + toString(attribute) + "' of " +
731  warningMessage + " is invalid; Cannot be parsed to float; " + tagProperties.getTagStr() + " cannot be created");
732  // return default value
733  return parse<T>("0");
734  } else {
735  // return readed value
736  return parse<T>(parsedAttribute);
737  }
738  }
739  parsedOk = false;
740  // return default value
741  return parse<T>("0");
742  }
743  // obtain attribute properties (Only for improving efficiency)
744  const auto& attrProperties = tagProperties.getAttributeProperties(attribute);
745  // set a special default value for numerical and boolean attributes (To avoid errors parsing)
746  if (attrProperties.isNumerical() || attrProperties.isBool()) {
747  defaultValue = "0";
748  } else if (attrProperties.isColor()) {
749  defaultValue = "black";
750  } else if (attrProperties.isposition()) {
751  defaultValue = "0,0";
752  }
753  // first check that attribute exists in XML
754  if (attrs.hasAttribute(attribute)) {
755  // First check if attribute can be parsed to string
756  parsedAttribute = attrs.get<std::string>(attribute, objectID.c_str(), parsedOk, false);
757  // check parsed attribute
758  if (!checkParsedAttribute(tagProperties, attrProperties, attribute, defaultValue, parsedAttribute, warningMessage)) {
759  abort = true;
760  }
761  } else if (tagProperties.canMaskXYZPositions() && (attribute == SUMO_ATTR_POSITION)) {
762  // obtain masked position attribute
763  if (!parseMaskedPositionAttribute(attrs, objectID, tagProperties, attrProperties, parsedAttribute, warningMessage)) {
764  abort = true;
765  }
766  } else {
767  // if attribute is optional and has a default value, obtain it. In other case, abort.
768  if (attrProperties.isOptional()) {
769  parsedAttribute = attrProperties.getDefaultValue();
770  } else {
771  WRITE_WARNING("Essential " + attrProperties.getDescription() + " attribute '" + toString(attribute) + "' of " +
772  warningMessage + " is missing; " + tagProperties.getTagStr() + " cannot be created");
773  // abort parsing (and creation) of element
774  abort = true;
775  // set default value (To avoid errors in parse<T>(parsedAttribute))
776  parsedAttribute = defaultValue;
777  }
778  }
779  // return parsed attribute
780  return parse<T>(parsedAttribute);
781  }
782 
783 protected:
786 
789 
792 
793 private:
795  virtual void setAttribute(SumoXMLAttr key, const std::string& value) = 0;
796 
798  virtual void setEnabledAttribute(const int enabledAttributes) = 0;
799 
801  static void fillAttributeCarriers();
802 
804  static void fillNetElements();
805 
807  static void fillAdditionals();
808 
810  static void fillShapes();
811 
813  static void fillDemandElements();
814 
816  static void fillVehicleElements();
817 
819  static void fillStopElements();
820 
822  static void fillPersonElements();
823 
825  static void fillPersonStopElements();
826 
828  static void fillCommonVehicleAttributes(SumoXMLTag currentTag);
829 
831  static void fillCommonFlowAttributes(SumoXMLTag currentTag);
832 
834  static void fillCarFollowingModelAttributes(SumoXMLTag currentTag);
835 
837  static void fillJunctionModelAttributes(SumoXMLTag currentTag);
838 
840  static void fillLaneChangingModelAttributes(SumoXMLTag currentTag);
841 
843  static void fillCommonPersonAttributes(SumoXMLTag currentTag);
844 
846  static void fillCommonStopAttributes(SumoXMLTag currentTag);
847 
849  static bool checkParsedAttribute(const TagProperties& tagProperties, const AttributeProperties& attrProperties, const SumoXMLAttr attribute,
850  std::string& defaultValue, std::string& parsedAttribute, std::string& warningMessage);
851 
853  static bool parseMaskedPositionAttribute(const SUMOSAXAttributes& attrs, const std::string& objectID, const TagProperties& tagProperties,
854  const AttributeProperties& attrProperties, std::string& parsedAttribute, std::string& warningMessage);
855 
857  static std::map<SumoXMLTag, TagProperties> myTagProperties;
858 
860  GNEAttributeCarrier(const GNEAttributeCarrier&) = delete;
861 
863  GNEAttributeCarrier& operator=(const GNEAttributeCarrier& src) = delete;
864 };
865 
866 #endif
867 
868 /****************************************************************************/
869 
GNEAttributeCarrier::AttributeProperties::setSynonym
void setSynonym(const SumoXMLAttr synonym)
set synonim
Definition: GNEAttributeCarrier.cpp:147
GNEAttributeCarrier::TAGPROPERTY_WRITECHILDRENSEPARATE
Definition: GNEAttributeCarrier.h:309
GNEAttributeCarrier::TagProperties::myTag
SumoXMLTag myTag
Sumo XML Tag vinculated wit this tag Property.
Definition: GNEAttributeCarrier.h:486
GNEAttributeCarrier::AttributeProperties::isProbability
bool isProbability() const
return true if atribute is a probability
Definition: GNEAttributeCarrier.cpp:388
GNEAttributeCarrier::fillAttributeCarriers
static void fillAttributeCarriers()
fill Attribute Carriers
Definition: GNEAttributeCarrier.cpp:1460
GNEAttributeCarrier::TagProperties::isPerson
bool isPerson() const
return true if tag correspond to a person element
Definition: GNEAttributeCarrier.cpp:756
GNEAttributeCarrier::TAGPROPERTY_SELECTABLE
Definition: GNEAttributeCarrier.h:306
GNEAttributeCarrier::getIcon
FXIcon * getIcon() const
get FXIcon associated to this AC
Definition: GNEAttributeCarrier.cpp:1279
ToString.h
GNEAttributeCarrier::GNEAttributeCarrier
GNEAttributeCarrier(const SumoXMLTag tag)
Constructor.
Definition: GNEAttributeCarrier.cpp:921
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:364
GNEAttributeCarrier::TagProperties
struct with the attribute Properties
Definition: GNEAttributeCarrier.h:317
GNEAttributeCarrier::TagProperties::myTagSynonym
SumoXMLTag myTagSynonym
Tag written in XML (If is SUMO_TAG_NOTHING), original Tag name will be written)
Definition: GNEAttributeCarrier.h:507
GNEAttributeCarrier::dummyTagProperty
static TagProperties dummyTagProperty
dummy TagProperty used for reference some elements (for Example, dummyEdge)
Definition: GNEAttributeCarrier.h:791
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:788
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:4498
GNEAttributeCarrier::TagProperties::addDeprecatedAttribute
void addDeprecatedAttribute(SumoXMLAttr attr)
add deprecated Attribute
Definition: GNEAttributeCarrier.cpp:610
GNEAttributeCarrier::getID
const std::string getID() const
function to support debugging
Definition: GNEAttributeCarrier.cpp:1289
GNEAttributeCarrier::updateGeometry
virtual void updateGeometry()=0
update pre-computed geometry information
WRITE_WARNING
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:275
GNEAttributeCarrier::TAGTYPE_VTYPE
Definition: GNEAttributeCarrier.h:281
GNEAttributeCarrier::TagProperties::isAdditional
bool isAdditional() const
return true if tag correspond to an additional
Definition: GNEAttributeCarrier.cpp:698
GNEAttributeCarrier::AttributeProperties::checkAttributeIntegrity
void checkAttributeIntegrity()
check Attribute integrity (For example, throw an exception if tag has a Float default value,...
Definition: GNEAttributeCarrier.cpp:106
GNEAttributeCarrier::AttributeProperties::isposition
bool isposition() const
return true if atribute is a position
Definition: GNEAttributeCarrier.cpp:382
GNEAttributeCarrier::TagProperties::getTagStr
const std::string & getTagStr() const
get Tag vinculated with this attribute Property in String Format (used to avoid multiple calls to toS...
Definition: GNEAttributeCarrier.cpp:529
GNEAttributeCarrier::ATTRPROPERTY_COMPLEX
Definition: GNEAttributeCarrier.h:92
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:865
GNEAttributeCarrier::TagProperties::isTAZ
bool isTAZ() const
return true if tag correspond to a TAZ
Definition: GNEAttributeCarrier.cpp:709
GNEAttributeCarrier::ATTRPROPERTY_UNIQUE
Definition: GNEAttributeCarrier.h:76
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:895
GNEAttributeCarrier::ATTRPROPERTY_EXTENDED
Definition: GNEAttributeCarrier.h:89
GNEAttributeCarrier::TAGPROPERTY_SYNONYM
Definition: GNEAttributeCarrier.h:304
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:721
GNEAttributeCarrier::AttributeProperties::isOptional
bool isOptional() const
return true if atribute is optional (it will be written in XML only if his value is different of defa...
Definition: GNEAttributeCarrier.cpp:448
GNEAttributeCarrier::ATTRPROPERTY_DEFAULTVALUEMUTABLE
Definition: GNEAttributeCarrier.h:85
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:4016
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:682
GNENet
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:77
GNEAttributeCarrier::TagProperties::isNetElement
bool isNetElement() const
return true if tag correspond to a netElement
Definition: GNEAttributeCarrier.cpp:692
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:492
GNEAttributeCarrier::ATTRPROPERTY_DISCRETE
Definition: GNEAttributeCarrier.h:78
MsgHandler.h
GNEAttributeCarrier::AttributeProperties::isPositive
bool isPositive() const
return true if atribute is positive
Definition: GNEAttributeCarrier.cpp:400
GNEAttributeCarrier::fillPersonStopElements
static void fillPersonStopElements()
fill PersonStop elements
Definition: GNEAttributeCarrier.cpp:3888
GNEAttributeCarrier::TagProperties::canBeSortedManually
bool canBeSortedManually() const
return true if Tag correspond to an element that can be sorted within their parent
Definition: GNEAttributeCarrier.cpp:871
GNEAttributeCarrier::TAGTYPE_DEMANDELEMENT
Definition: GNEAttributeCarrier.h:277
GNEAttributeCarrier::fillShapes
static void fillShapes()
fill Shapes
Definition: GNEAttributeCarrier.cpp:2936
GNEAttributeCarrier::TagProperties::begin
std::vector< AttributeProperties >::const_iterator begin() const
get begin of attribute values (used for iterate)
Definition: GNEAttributeCarrier.cpp:636
GNEAttributeCarrier::TAGPROPERTY_DIALOG
Definition: GNEAttributeCarrier.h:300
GNEAttributeCarrier::TAGPROPERTY_NOPARAMETERS
Definition: GNEAttributeCarrier.h:310
GNEAttributeCarrier::TagProperties::isRoute
bool isRoute() const
return true if tag correspond to a route element
Definition: GNEAttributeCarrier.cpp:744
GNEAttributeCarrier::AttributeProperties::isUnique
bool isUnique() const
return true if atribute is unique
Definition: GNEAttributeCarrier.cpp:442
GNEAttributeCarrier::AttributeProperties::getDefinition
const std::string & getDefinition() const
get default value
Definition: GNEAttributeCarrier.cpp:211
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:358
GNEAttributeCarrier::TAGTYPE_ADDITIONAL
Definition: GNEAttributeCarrier.h:275
GNEAttributeCarrier::ATTRPROPERTY_VCLASSES
Definition: GNEAttributeCarrier.h:86
GNEAttributeCarrier::AttributeProperties::setDiscreteValues
void setDiscreteValues(const std::vector< std::string > &discreteValues)
set discrete values
Definition: GNEAttributeCarrier.cpp:137
GNEAttributeCarrier::TagProperties::myTagProperty
int myTagProperty
Attribute properties.
Definition: GNEAttributeCarrier.h:495
EmptyData
Definition: UtilExceptions.h:68
GNEAttributeCarrier::TagProperties::isStop
bool isStop() const
return true if tag correspond to a stop element
Definition: GNEAttributeCarrier.cpp:750
GNEAttributeCarrier::ATTRPROPERTY_FLOWDEFINITION
Definition: GNEAttributeCarrier.h:93
GNEAttributeCarrier::TagProperties::end
std::vector< AttributeProperties >::const_iterator end() const
get end of attribute values (used for iterate)
Definition: GNEAttributeCarrier.cpp:642
GNEAttributeCarrier::TagProperties::isShape
bool isShape() const
return true if tag correspond to a shape
Definition: GNEAttributeCarrier.cpp:703
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:733
GNEAttributeCarrier::TAGPROPERTY_MASKSTARTENDPOS
Definition: GNEAttributeCarrier.h:307
GNEAttributeCarrier::ATTRPROPERTY_OPTIONAL
Definition: GNEAttributeCarrier.h:83
GUIVisualizationSettings.h
SUMO_TAG_NOTHING
invalid tag
Definition: SUMOXMLDefinitions.h:43
GNEAttributeCarrier::TagProperties::TagProperties
TagProperties()
default constructor
Definition: GNEAttributeCarrier.cpp:498
GNEAttributeCarrier::TagProperties::hasGEOShape
bool hasGEOShape() const
return true if tag correspond to an element that can use a geo shape
Definition: GNEAttributeCarrier.cpp:828
GNEAttributeCarrier::ATTRPROPERTY_UPDATEGEOMETRY
Definition: GNEAttributeCarrier.h:90
GNEAttributeCarrier::TagProperties::checkTagIntegrity
void checkTagIntegrity() const
check Tag integrity (this include all their attributes)
Definition: GNEAttributeCarrier.cpp:535
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:852
GNEAttributeCarrier::TagProperties::myTagStr
std::string myTagStr
Sumo XML Tag vinculated wit this tag Property in String format.
Definition: GNEAttributeCarrier.h:489
GNEAttributeCarrier::fillAdditionals
static void fillAdditionals()
fill Additionals
Definition: GNEAttributeCarrier.cpp:1870
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:889
GNEAttributeCarrier::ATTRPROPERTY_PROBABILITY
Definition: GNEAttributeCarrier.h:79
GNEAttributeCarrier::isValid
virtual bool isValid(SumoXMLAttr key, const std::string &value)=0
SumoXMLTag
SumoXMLTag
Numbers representing SUMO-XML - element names.
Definition: SUMOXMLDefinitions.h:41
GNEAttributeCarrier::AttributeProperties::myDefaultValue
std::string myDefaultValue
default value (by default empty)
Definition: GNEAttributeCarrier.h:258
GNEAttributeCarrier::fillDemandElements
static void fillDemandElements()
fill Demand Elements
Definition: GNEAttributeCarrier.cpp:3144
GNEAttributeCarrier::AttributeProperties::myAttrStr
std::string myAttrStr
string with the Attribute in text format (to avoid unnecesaries toStrings(...) calls)
Definition: GNEAttributeCarrier.h:249
GNEAttributeCarrier::AttributeProperties::requireUpdateGeometry
bool requireUpdateGeometry() const
return true if atribute requires a update geometry in setAttribute(...)
Definition: GNEAttributeCarrier.cpp:472
GNEAttributeCarrier::TAGPROPERTY_MASKXYZPOSITION
Definition: GNEAttributeCarrier.h:308
GNEAttributeCarrier::TAGPROPERTY_CENTERAFTERCREATION
Definition: GNEAttributeCarrier.h:313
GNEAttributeCarrier::ATTRPROPERTY_FLOAT
Definition: GNEAttributeCarrier.h:68
GNEAttributeCarrier::TagProperties::getTag
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
Definition: GNEAttributeCarrier.cpp:523
GNEAttributeCarrier::AttributeProperties::isList
bool isList() const
return true if atribute is a list
Definition: GNEAttributeCarrier.cpp:430
GNEAttributeCarrier::ATTRPROPERTY_DEFAULTVALUESTATIC
Definition: GNEAttributeCarrier.h:84
GNEAttributeCarrier::TAGTYPE_PERSONTRIP
Definition: GNEAttributeCarrier.h:287
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:4676
GNEAttributeCarrier::TagProperties::hasAttribute
bool hasAttribute(SumoXMLAttr attr) const
check if current TagProperties owns the attribute attr
Definition: GNEAttributeCarrier.cpp:680
GNEEdge
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:51
GNEAttributeCarrier::ATTRPROPERTY_SYNONYM
Definition: GNEAttributeCarrier.h:87
GNEAttributeCarrier::TagProperties::canAutomaticSortChildren
bool canAutomaticSortChildren() const
return true if tag correspond to an element that can sort their children automatic
Definition: GNEAttributeCarrier.cpp:883
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:670
GNEAttributeCarrier::TAGTYPE_VEHICLE
Definition: GNEAttributeCarrier.h:282
NumberFormatException
Definition: UtilExceptions.h:95
GNEAttributeCarrier::TagProperties::isVehicle
bool isVehicle() const
return true if tag correspond to a vehicle element
Definition: GNEAttributeCarrier.cpp:739
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:595
GNEAttributeCarrier::fillCommonVehicleAttributes
static void fillCommonVehicleAttributes(SumoXMLTag currentTag)
fill common vehicle attributes (used by vehicles, trips, routeFlows and flows)
Definition: GNEAttributeCarrier.cpp:3938
GNEAttributeCarrier::AttributeProperties::AttributeProperties
AttributeProperties()
default constructor
Definition: GNEAttributeCarrier.cpp:57
GNEAttributeCarrier::ATTRPROPERTY_POSITION
Definition: GNEAttributeCarrier.h:72
GNEAttributeCarrier::AttributeProperties::isFlowDefinition
bool isFlowDefinition() const
return true if atribute is part of a flow definition
Definition: GNEAttributeCarrier.cpp:490
GNEAttributeCarrier::TagProperties::isAttributeDeprecated
bool isAttributeDeprecated(SumoXMLAttr attr) const
return true if attribute of this tag is deprecated
Definition: GNEAttributeCarrier.cpp:913
GNEAttributeCarrier::TagProperties::canBlockShape
bool canBlockShape() const
return true if tag correspond to an element that can block their shape
Definition: GNEAttributeCarrier.cpp:810
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:412
GNEAttributeCarrier::AttributeProperties::isActivatable
bool isActivatable() const
return true if atribute is activatable
Definition: GNEAttributeCarrier.cpp:478
GNEAttributeCarrier::getTagProperty
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
Definition: GNEAttributeCarrier.cpp:1273
GNEAttributeCarrier::fillStopElements
static void fillStopElements()
fill Stop elements
Definition: GNEAttributeCarrier.cpp:3582
GNEAttributeCarrier::AttributeProperties::myAttrSynonym
SumoXMLAttr myAttrSynonym
Attribute written in XML (If is SUMO_ATTR_NOTHING), original Attribute will be written)
Definition: GNEAttributeCarrier.h:264
GNEAttributeCarrier::ATTRPROPERTY_RANGE
Definition: GNEAttributeCarrier.h:88
GNEAttributeCarrier::lanesConsecutives
static bool lanesConsecutives(const std::vector< GNELane * > &lanes)
check if lanes are consecutives
Definition: GNEAttributeCarrier.cpp:1136
GNEAttributeCarrier::AttributeProperties
struct with the attribute Properties
Definition: GNEAttributeCarrier.h:97
GNEAttributeCarrier::AttributeProperties::isColor
bool isColor() const
return true if atribute is a color
Definition: GNEAttributeCarrier.cpp:406
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:1333
GNEAttributeCarrier::TAGPROPERTY_GEOSHAPE
Definition: GNEAttributeCarrier.h:299
GNEAttributeCarrier::TAGPROPERTY_RTREE
Definition: GNEAttributeCarrier.h:311
GNEAttributeCarrier::fillPersonElements
static void fillPersonElements()
fill Person Elements
Definition: GNEAttributeCarrier.cpp:3673
GNEAttributeCarrier::AttrProperty
AttrProperty
struct with the tag Properties
Definition: GNEAttributeCarrier.h:66
Parameterised.h
GNEAttributeCarrier::TagProperties::isDemandElement
bool isDemandElement() const
return true if tag correspond to a demand element
Definition: GNEAttributeCarrier.cpp:715
GNEAttributeCarrier::TagProperties::hasGEOPosition
bool hasGEOPosition() const
return true if tag correspond to an element that can use a geo position
Definition: GNEAttributeCarrier.cpp:822
GNEAttributeCarrier::TAGTYPE_ROUTE
Definition: GNEAttributeCarrier.h:283
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:657
GNEAttributeCarrier::AttributeProperties::myMaximumRange
double myMaximumRange
maxium Range
Definition: GNEAttributeCarrier.h:270
GNEAttributeCarrier::ATTRPROPERTY_LIST
Definition: GNEAttributeCarrier.h:81
GNEAttributeCarrier::TAGTYPE_TAZ
Definition: GNEAttributeCarrier.h:278
GNEAttributeCarrier::ATTRPROPERTY_SUMOTIME
Definition: GNEAttributeCarrier.h:69
GNEAttributeCarrier::TAGPROPERTY_AUTOMATICSORTING
Definition: GNEAttributeCarrier.h:305
GNEAttributeCarrier::TagProperties::getParentTag
SumoXMLTag getParentTag() const
if Tag owns a parent, return parent tag
Definition: GNEAttributeCarrier.cpp:660
GNEAttributeCarrier::TAGPROPERTY_GEOPOSITION
Definition: GNEAttributeCarrier.h:298
ProcessError
Definition: UtilExceptions.h:39
GNEAttributeCarrier::TagProperties::addAttribute
void addAttribute(const AttributeProperties &attributeProperty)
add attribute (duplicated attributed aren't allowed)
Definition: GNEAttributeCarrier.cpp:590
GNEAttributeCarrier::AttributeProperties::setTagPropertyParent
void setTagPropertyParent(TagProperties *tagPropertyParent)
set tag property parent
Definition: GNEAttributeCarrier.cpp:176
GNEAttributeCarrier::myTagProperties
static std::map< SumoXMLTag, TagProperties > myTagProperties
map with the tags properties
Definition: GNEAttributeCarrier.h:857
GNEAttributeCarrier::AttributeProperties::getAttrStr
const std::string & getAttrStr() const
get XML Attribute
Definition: GNEAttributeCarrier.cpp:188
GNEAttributeCarrier::myTagProperty
const TagProperties & myTagProperty
the xml tag to which this attribute carrier corresponds
Definition: GNEAttributeCarrier.h:785
GNEChange_EnableAttribute
the function-object for an editing operation (abstract base)
Definition: GNEChange_EnableAttribute.h:44
GNEAttributeCarrier::AttributeProperties::getDefaultValue
const std::string & getDefaultValue() const
get default value
Definition: GNEAttributeCarrier.cpp:217
GNEAttributeCarrier::ATTRPROPERTY_STRING
Definition: GNEAttributeCarrier.h:71
GNEAttributeCarrier::TAGPROPERTY_MINIMUMCHILDREN
Definition: GNEAttributeCarrier.h:302
GUIIcons.h
GNEAttributeCarrier::TagProperties::canBeReparent
bool canBeReparent() const
return true if tag correspond to an element that can be reparent
Definition: GNEAttributeCarrier.cpp:877
UtilExceptions.h
GNEAttributeCarrier::AttributeProperties::getMinimumRange
double getMinimumRange() const
get minimum range
Definition: GNEAttributeCarrier.cpp:309
GNEAttributeCarrier::TagProperties::isWalk
bool isWalk() const
return true if tag correspond to a walk element
Definition: GNEAttributeCarrier.cpp:774
GNEAttributeCarrier::TagProperties::myDeprecatedAttributes
std::vector< SumoXMLAttr > myDeprecatedAttributes
List with the deprecated Attributes.
Definition: GNEAttributeCarrier.h:510
GNEAttributeCarrier::ATTRPROPERTY_ANGLE
Definition: GNEAttributeCarrier.h:80
GNEAttributeCarrier::getAlternativeValueForDisabledAttributes
std::string getAlternativeValueForDisabledAttributes(SumoXMLAttr key) const
Definition: GNEAttributeCarrier.cpp:1167
GNEAttributeCarrier::AttributeProperties::~AttributeProperties
~AttributeProperties()
destructor
Definition: GNEAttributeCarrier.cpp:102
GNEAttributeCarrier::fillVehicleElements
static void fillVehicleElements()
fill vehicle elements
Definition: GNEAttributeCarrier.cpp:3433
GNEAttributeCarrier::AttributeProperties::getAttr
SumoXMLAttr getAttr() const
get XML Attribute
Definition: GNEAttributeCarrier.cpp:182
FormatException
Definition: UtilExceptions.h:81
GUIIcon
GUIIcon
An enumeration of icons used by the gui applications.
Definition: GUIIcons.h:35
GNEAttributeCarrier::AttributeProperties::isSecuential
bool isSecuential() const
return true if atribute is sequential
Definition: GNEAttributeCarrier.cpp:436
GNEAttributeCarrier::AttributeProperties::isVClass
bool isVClass() const
return true if atribute is a VehicleClass
Definition: GNEAttributeCarrier.cpp:418
GNEAttributeCarrier::AttributeProperties::getMaximumRange
double getMaximumRange() const
get maximum range
Definition: GNEAttributeCarrier.cpp:319
GNEAttributeCarrier::TAGPROPERTY_BLOCKSHAPE
Definition: GNEAttributeCarrier.h:296
GNEAttributeCarrier::TAGTYPE_DETECTOR
Definition: GNEAttributeCarrier.h:280
GNEAttributeCarrier::AttributeProperties::getTagPropertyParent
const TagProperties & getTagPropertyParent() const
get reference to tagProperty parent
Definition: GNEAttributeCarrier.cpp:194
GNEAttributeCarrier::TagProperties::canCenterCameraAfterCreation
bool canCenterCameraAfterCreation() const
return true if tag correspond to an element that center camera after creation
Definition: GNEAttributeCarrier.cpp:907
GNEAttributeCarrier::canParse
static bool canParse(const std::string &string)
true if a value of type T can be parsed from string
Definition: GNEAttributeCarrier.h:636
GNEAttributeCarrier::TagProperties::myAttributeProperties
std::vector< AttributeProperties > myAttributeProperties
vector with the attribute values vinculated with this Tag
Definition: GNEAttributeCarrier.h:498
GNEAttributeCarrier::TAGPROPERTY_PARENT
Definition: GNEAttributeCarrier.h:301
GNEAttributeCarrier::ATTRPROPERTY_SECUENCIAL
Definition: GNEAttributeCarrier.h:82
SUMO_ATTR_POSITION
Definition: SUMOXMLDefinitions.h:660
GNEAttributeCarrier::AttributeProperties::hasMutableDefaultValue
bool hasMutableDefaultValue() const
return true if attribute owns a mutable default value
Definition: GNEAttributeCarrier.cpp:335
GNEAttributeCarrier::AttributeProperties::myTagPropertyParent
TagProperties * myTagPropertyParent
pointer to tagProperty parent
Definition: GNEAttributeCarrier.h:246
GNEAttributeCarrier::AttributeProperties::hasStaticDefaultValue
bool hasStaticDefaultValue() const
return true if attribute owns a static default value
Definition: GNEAttributeCarrier.cpp:329
GNEAttributeCarrier::TagProperties::~TagProperties
~TagProperties()
destructor
Definition: GNEAttributeCarrier.cpp:519
GNEAttributeCarrier::ATTRPROPERTY_FILENAME
Definition: GNEAttributeCarrier.h:77
GNEAttributeCarrier::INVALID_POSITION
static const double INVALID_POSITION
invalid double position
Definition: GNEAttributeCarrier.h:608
BoolFormatException
Definition: UtilExceptions.h:121
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:454
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:768
GNEAttributeCarrier::enableAttribute
virtual void enableAttribute(SumoXMLAttr key, GNEUndoList *undoList)=0
GNEAttributeCarrier::TAGTYPE_STOP
Definition: GNEAttributeCarrier.h:284
GNEAttributeCarrier::fillCommonStopAttributes
static void fillCommonStopAttributes(SumoXMLTag currentTag)
fill stop person attributes (used by stops and personStps)
Definition: GNEAttributeCarrier.cpp:4426
GNEAttributeCarrier::TAGPROPERTY_BLOCKMOVEMENT
Definition: GNEAttributeCarrier.h:295
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:47
GNEAttributeCarrier::fillCarFollowingModelAttributes
static void fillCarFollowingModelAttributes(SumoXMLTag currentTag)
fill Car Following Model of Vehicle/Person Types
Definition: GNEAttributeCarrier.cpp:4059
GNEAttributeCarrier::TagProperties::isPersonPlan
bool isPersonPlan() const
return true if tag correspond to a person plan
Definition: GNEAttributeCarrier.cpp:762
GNEAttributeCarrier::TagType
TagType
Definition: GNEAttributeCarrier.h:273
GNEAttributeCarrier::TagProperties::isSelectable
bool isSelectable() const
return true if tag correspond to a selectable element
Definition: GNEAttributeCarrier.cpp:798
GNEAttributeCarrier::ATTRPROPERTY_ACTIVATABLE
Definition: GNEAttributeCarrier.h:91
GNEAttributeCarrier::TagProperties::getDefaultValue
const std::string & getDefaultValue(SumoXMLAttr attr) const
return the default value of the attribute of an element
Definition: GNEAttributeCarrier.cpp:574
GNEAttributeCarrier::allowedTags
static std::vector< SumoXMLTag > allowedTags(bool onlyDrawables)
get tags of all editable element types
Definition: GNEAttributeCarrier.cpp:1316
GNEAttributeCarrier::AttributeProperties::isVClasses
bool isVClasses() const
return true if atribute is a list of VClasses
Definition: GNEAttributeCarrier.cpp:460
GNEAttributeCarrier::TAGTYPE_PERSONPLAN
Definition: GNEAttributeCarrier.h:286
GNEAttributeCarrier::AttributeProperties::getDiscreteValues
const std::vector< std::string > & getDiscreteValues() const
get discrete values
Definition: GNEAttributeCarrier.cpp:293
GNEAttributeCarrier::TAGProperty
TAGProperty
Definition: GNEAttributeCarrier.h:293
TimeFormatException
Definition: UtilExceptions.h:108
GNEAttributeCarrier::TagProperties::isPersonStop
bool isPersonStop() const
return true if tag correspond to a person stop element
Definition: GNEAttributeCarrier.cpp:786
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:840
GNEAttributeCarrier::TAGTYPE_PERSONSTOP
Definition: GNEAttributeCarrier.h:290
GNEAttributeCarrier::TagProperties::myIcon
GUIIcon myIcon
icon associated to this Tag
Definition: GNEAttributeCarrier.h:501
GNEAttributeCarrier::~GNEAttributeCarrier
virtual ~GNEAttributeCarrier()
Destructor.
Definition: GNEAttributeCarrier.cpp:927
GNEAttributeCarrier::AttributeProperties::isBool
bool isBool() const
return true if atribute is boolean
Definition: GNEAttributeCarrier.cpp:370
GNEAttributeCarrier::fillLaneChangingModelAttributes
static void fillLaneChangingModelAttributes(SumoXMLTag currentTag)
fill Junction Model Attributes of Vehicle/Person Types
Definition: GNEAttributeCarrier.cpp:4273
GNEAttributeCarrier::FEATURE_MODIFIED
static const std::string FEATURE_MODIFIED
feature has been manually modified (implies approval)
Definition: GNEAttributeCarrier.h:598
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:341
SUMO_ATTR_LAT
Definition: SUMOXMLDefinitions.h:815
GNEAttributeCarrier::TagProperties::canBlockMovement
bool canBlockMovement() const
return true if tag correspond to an element that can block their movement
Definition: GNEAttributeCarrier.cpp:804
GNE_ATTR_BLOCK_MOVEMENT
block movement of a graphic element
Definition: SUMOXMLDefinitions.h:981
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:394
GNEAttributeCarrier::TAGTYPE_RIDE
Definition: GNEAttributeCarrier.h:289
GNEAttributeCarrier::AttributeProperties::myMinimumRange
double myMinimumRange
minimun Range
Definition: GNEAttributeCarrier.h:267
GNEAttributeCarrier::TagProperties::isDrawable
bool isDrawable() const
return true if tag correspond to a drawable element
Definition: GNEAttributeCarrier.cpp:792
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:727
SUMOSAXAttributes.h
GNEAttributeCarrier::ATTRPROPERTY_COLOR
Definition: GNEAttributeCarrier.h:73
GNEAttributeCarrier::TAGTYPE_STOPPINGPLACE
Definition: GNEAttributeCarrier.h:279
GNEAttributeCarrier::TagProperties::hasDialog
bool hasDialog() const
return true if tag correspond to an element that can be edited using a dialog
Definition: GNEAttributeCarrier.cpp:846
GNEAttributeCarrier::TAGTYPE_NETELEMENT
Definition: GNEAttributeCarrier.h:274
GNEReferenceCounter
Definition: GNEReferenceCounter.h:37
GNEAttributeCarrier::FEATURE_APPROVED
static const std::string FEATURE_APPROVED
feature has been approved but not changed (i.e. after being reguessed)
Definition: GNEAttributeCarrier.h:601
GNEAttributeCarrier::TagProperties::getGUIIcon
GUIIcon getGUIIcon() const
get GUI icon associated to this Tag
Definition: GNEAttributeCarrier.cpp:654
GNEAttributeCarrier::TagProperties::hasParameters
bool hasParameters() const
return true if Tag correspond to an element that supports parameters "key1=value1|key2=value2|....
Definition: GNEAttributeCarrier.cpp:858
GNEAttributeCarrier::getAttributeForSelection
virtual std::string getAttributeForSelection(SumoXMLAttr key) const
method for getting the attribute in the context of object selection
Definition: GNEAttributeCarrier.cpp:1261
GNEAttributeCarrier::AttributeProperties::getPositionListed
int getPositionListed() const
get position in list (used in frames for listing attributes with certain sort)
Definition: GNEAttributeCarrier.cpp:200
GNEAttributeCarrier::TagProperties::getAttributeProperties
const AttributeProperties & getAttributeProperties(SumoXMLAttr attr) const
get attribute (throw error if doesn't exist)
Definition: GNEAttributeCarrier.cpp:623
config.h
GNEAttributeCarrier::getTagProperties
static const TagProperties & getTagProperties(SumoXMLTag tag)
get Tag Properties
Definition: GNEAttributeCarrier.cpp:1298
GNEAttributeCarrier::setAttribute
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
GNEAttributeCarrier::ATTRPROPERTY_POSITIVE
Definition: GNEAttributeCarrier.h:75
GNEAttributeCarrier::AttributeProperties::myAttribute
SumoXMLAttr myAttribute
XML Attribute.
Definition: GNEAttributeCarrier.h:243
GNEAttributeCarrier::TagProperties::canCloseShape
bool canCloseShape() const
return true if tag correspond to an element that can close their shape
Definition: GNEAttributeCarrier.cpp:816
GNEAttributeCarrier::TAGPROPERTY_SORTINGCHILDREN
Definition: GNEAttributeCarrier.h:312
GNEAttributeCarrier::AttributeProperties::isExtended
bool isExtended() const
return true if atribute is extended
Definition: GNEAttributeCarrier.cpp:466
GNEChange_Attribute
the function-object for an editing operation (abstract base)
Definition: GNEChange_Attribute.h:47
GNEAttributeCarrier::TagProperties::hasParent
bool hasParent() const
return true if tag correspond to an element that can had another element as parent
Definition: GNEAttributeCarrier.cpp:834
GNEAttributeCarrier::TAGPROPERTY_DRAWABLE
Definition: GNEAttributeCarrier.h:294
GNEAttributeCarrier::ATTRPROPERTY_BOOL
Definition: GNEAttributeCarrier.h:70
GNEAttributeCarrier::AttributeProperties::isInt
bool isInt() const
return true if atribute is an integer
Definition: GNEAttributeCarrier.cpp:352
GNEAttributeCarrier::AttributeProperties::getAttrSynonym
SumoXMLAttr getAttrSynonym() const
get tag synonym
Definition: GNEAttributeCarrier.cpp:299
GNEAttributeCarrier::TagProperties::isRide
bool isRide() const
return true if tag correspond to a ride element
Definition: GNEAttributeCarrier.cpp:780
GNEAttributeCarrier::getTagStr
const std::string & getTagStr() const
get tag assigned to this object in string format
Definition: GNEAttributeCarrier.cpp:1267
GNEAttributeCarrier::AttributeProperties::myDefinition
std::string myDefinition
text with a definition of attribute
Definition: GNEAttributeCarrier.h:255
GNEUndoList
Definition: GNEUndoList.h:48
GNEAttributeCarrier::TAGPROPERTY_REPARENT
Definition: GNEAttributeCarrier.h:303
GNEAttributeCarrier::AttributeProperties::hasAttrRange
bool hasAttrRange() const
return true if Attr correspond to an element that only accept a range of values
Definition: GNEAttributeCarrier.cpp:346
GNEAttributeCarrier::AttributeProperties::isSVCPermission
bool isSVCPermission() const
return true if atribute is a VehicleClass
Definition: GNEAttributeCarrier.cpp:424
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:4207
SUMO_ATTR_LON
Definition: SUMOXMLDefinitions.h:814
GNEAttributeCarrier::TagProperties::myTagType
int myTagType
Attribute Type.
Definition: GNEAttributeCarrier.h:492
GNEAttributeCarrier::TAGTYPE_WALK
Definition: GNEAttributeCarrier.h:288
GNEAttributeCarrier::FEATURE_LOADED
static const std::string FEATURE_LOADED
Definition: GNEAttributeCarrier.h:592
GNEReferenceCounter.h
GNEAttributeCarrier::AttributeProperties::isString
bool isString() const
return true if atribute is a string
Definition: GNEAttributeCarrier.cpp:376
GNEAttributeCarrier::AttributeProperties::isComplex
bool isComplex() const
return true if atribute is complex
Definition: GNEAttributeCarrier.cpp:484
SumoXMLAttr
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
Definition: SUMOXMLDefinitions.h:372
SUMOSAXAttributes
Encapsulated SAX-Attributes.
Definition: SUMOSAXAttributes.h:56
GNEAttributeCarrier::disableAttribute
virtual void disableAttribute(SumoXMLAttr key, GNEUndoList *undoList)=0
GNEAttributeCarrier::AttributeProperties::myAttributeProperty
int myAttributeProperty
Property of attribute.
Definition: GNEAttributeCarrier.h:252
GNELane
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:45
GNEAttributeCarrier::TAGTYPE_SHAPE
Definition: GNEAttributeCarrier.h:276
GNEAttributeCarrier::fillNetElements
static void fillNetElements()
fill Net Elements
Definition: GNEAttributeCarrier.cpp:1478
GNEAttributeCarrier::fillCommonPersonAttributes
static void fillCommonPersonAttributes(SumoXMLTag currentTag)
fill common person attributes (used by person and personFlows)
Definition: GNEAttributeCarrier.cpp:4396
GNEAttributeCarrier
Definition: GNEAttributeCarrier.h:54
SUMOXMLDefinitions.h
GNEAttributeCarrier::TagProperties::myParentTag
SumoXMLTag myParentTag
parent tag
Definition: GNEAttributeCarrier.h:504
GNEAttributeCarrier::AttributeProperties::myDiscreteValues
std::vector< std::string > myDiscreteValues
discrete values that can take this Attribute (by default empty)
Definition: GNEAttributeCarrier.h:261
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:901
GNEAttributeCarrier::TAGPROPERTY_CLOSESHAPE
Definition: GNEAttributeCarrier.h:297
GNEAttributeCarrier::MAXNUMBEROFATTRIBUTES
static const size_t MAXNUMBEROFATTRIBUTES
max number of attributes allowed for every tag
Definition: GNEAttributeCarrier.h:605
GNEAttributeCarrier::TagProperties::getNumberOfAttributes
int getNumberOfAttributes() const
get number of attributes
Definition: GNEAttributeCarrier.cpp:648
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:223
GNEAttributeCarrier::AttributeProperties::setRange
void setRange(const double minimum, const double maximum)
set range
Definition: GNEAttributeCarrier.cpp:157
GNEAttributeCarrier::TAGTYPE_PERSON
Definition: GNEAttributeCarrier.h:285