Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNETagProperties.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// Abstract Base class for tag properties used in GNEAttributeCarrier
19/****************************************************************************/
20
21#include "GNETagProperties.h"
22
23// ===========================================================================
24// method definitions
25// ===========================================================================
26
28 const Property tagProperty, const Over myTagOver, const Conflicts conflicts,
29 const GUIIcon icon, const GUIGlObjectType GLType, const SumoXMLTag XMLTag,
30 const std::string tooltip, const std::vector<SumoXMLTag> XMLParentTags,
31 const unsigned int backgroundColor, const std::string selectorText) :
32 myTag(tag),
33 myTagStr(toString(tag)),
34 myParent(parent),
35 myTagType(tagType),
36 myTagProperty(tagProperty),
37 myTagOver(myTagOver),
38 myConflicts(conflicts),
39 myIcon(icon),
40 myGLType(GLType),
41 myXMLTag(XMLTag),
42 myTooltipText(tooltip),
43 myXMLParentTags(XMLParentTags),
44 mySelectorText(selectorText.empty() ? toString(tag) : selectorText),
45 myBackgroundColor(backgroundColor) {
46 if (parent) {
47 parent->addChild(this);
48 }
49}
50
51
52GNETagProperties::GNETagProperties(const SumoXMLTag tag, GNETagProperties* parent, const GUIIcon icon, const std::string tooltip,
53 const unsigned int backgroundColor, const std::string selectorText) :
54 myTag(tag),
55 myTagStr(toString(tag)),
56 myParent(parent),
57 myTagProperty(Property::HIERARCHICAL),
58 myIcon(icon),
59 myXMLTag(tag),
60 myTooltipText(tooltip),
61 mySelectorText(selectorText.empty() ? toString(tag) : selectorText),
62 myBackgroundColor(backgroundColor) {
63 if (parent) {
64 parent->addChild(this);
65 }
66}
67
68
70 for (const auto& attrProperties : myAttributeProperties) {
71 delete attrProperties;
72 }
73}
74
75
78 return myTag;
79}
80
81
82const std::string&
84 return myTagStr;
85}
86
87
88void
90 // check integrity only in debug mode
91#ifdef DEBUG
92 // check that this edge has parents (Except supermodes)
93 if (myTag == SUMO_TAG_ROOTFILE) {
94 if (myParent != nullptr) {
95 throw ProcessError("Root parent must be empty");
96 }
97 } else if (myParent == nullptr) {
98 throw ProcessError("No parent defined");
99 }
100 // check network parents
101 if (isNetworkElement() && (myParent->getTag() != SUMO_TAG_NET)) {
102 throw ProcessError("Invalid network element parent");
103 }
104 // check additional parents
105 if (isStoppingPlace()) {
107 throw ProcessError("Invalid stoppingPlace parent");
108 }
109 } else if (isDetector()) {
111 throw ProcessError("Invalid detector parent");
112 }
113 } else if (isWireElement()) {
114 if (myParent->getTag() != GNE_TAG_WIRES) {
115 throw ProcessError("Invalid wire parent");
116 }
117 } else if (isJuPedSimElement()) {
118 if (myParent->getTag() != GNE_TAG_JUPEDSIM) {
119 throw ProcessError("Invalid juPedSim parent");
120 }
121 } else if (isTAZElement()) {
122 if (myParent->getTag() != GNE_TAG_TAZS) {
123 throw ProcessError("Invalid TAZ parent");
124 }
125 } else if (isShapeElement()) {
126 if (myParent->getTag() != GNE_TAG_SHAPES) {
127 throw ProcessError("Invalid shape parent");
128 }
129 } else if (isAdditionalElement()) {
131 throw ProcessError("Invalid additional parent");
132 }
133 }
134 // check demand parents
135 if (isVehicle()) {
137 throw ProcessError("Invalid vehicle parent");
138 }
139 } else if (isVehicleStop()) {
140 if (myParent->getTag() != GNE_TAG_STOPS) {
141 throw ProcessError("Invalid vehicle stop parent");
142 }
143 } else if (isPlanPersonTrip()) {
145 throw ProcessError("Invalid person trip parent");
146 }
147 } else if (isPlanRide()) {
148 if (myParent->getTag() != GNE_TAG_RIDES) {
149 throw ProcessError("Invalid ride parent");
150 }
151 } else if (isPlanWalk()) {
152 if (myParent->getTag() != GNE_TAG_WALKS) {
153 throw ProcessError("Invalid walk parent");
154 }
155 } else if (isPlanStopPerson()) {
157 throw ProcessError("Invalid person stop parent");
158 }
159 } else if (isPlanPerson()) {
161 throw ProcessError("Invalid person plan parent");
162 }
163 } else if (isPlanTransport()) {
165 throw ProcessError("Invalid ride parent");
166 }
167 } else if (isPlanTranship()) {
169 throw ProcessError("Invalid walk parent");
170 }
171 } else if (isPlanStopContainer()) {
173 throw ProcessError("Invalid container stop parent");
174 }
175 } else if (isPlanContainer()) {
177 throw ProcessError("Invalid container plan parent");
178 }
179 } else if (isDemandElement()) {
181 throw ProcessError("Invalid supermode demand parent");
182 }
183 }
184 // check data parents
185 if (isGenericData()) {
186 if (myParent->getTag() != GNE_TAG_DATAS) {
187 throw ProcessError("Invalid generic data parent");
188 }
189 } else if (isDataElement()) {
191 throw ProcessError("Invalid supermode data parent");
192 }
193 }
194 // check that element must ist at least networkElement, Additional, or shape
196 throw ProcessError("no basic type property defined");
197 }
198 // check that element only is networkElement, Additional, or shape at the same time
200 throw ProcessError("multiple basic type properties defined");
201 }
202 // check that element only is shape, TAZ, or wire at the same time
203 if ((isShapeElement() + isTAZElement() + isWireElement()) > 1) {
204 throw ProcessError("element can be either shape or TAZ or wire element at the same time");
205 }
206 // check that master tag is valid
207 if (isChild() && myXMLParentTags.empty()) {
208 throw FormatException("Parent tags cannot be empty");
209 }
210 // check that master was defined
211 if (!isChild() && !myXMLParentTags.empty()) {
212 throw FormatException("Element doesn't support parent elements");
213 }
214 // check reparent
215 if (!isChild() && canBeReparent()) {
216 throw FormatException("Only Child elements can be reparent");
217 }
218 // check vClass icons
220 throw FormatException("Element require attribute SUMO_ATTR_VCLASS");
221 }
222 // check glType
224 throw FormatException("Only hierarchical tags can have a GLType GLO_MAX");
225 }
226 // check integrity of all attributes
227 for (const auto& attributeProperty : myAttributeProperties) {
228 attributeProperty->checkAttributeIntegrity();
229 // check that if attribute is vehicle classes, own a combination of Allow/disallow attribute
230 if (attributeProperty->isSVCPermission()) {
231 if ((attributeProperty->getAttr() != SUMO_ATTR_ALLOW) && (attributeProperty->getAttr() != SUMO_ATTR_DISALLOW) &&
232 (attributeProperty->getAttr() != SUMO_ATTR_CHANGE_LEFT) && (attributeProperty->getAttr() != SUMO_ATTR_CHANGE_RIGHT) &&
233 (attributeProperty->getAttr() != GNE_ATTR_STOPOEXCEPTION)) {
234 throw ProcessError("Attributes aren't combinables");
235 } else if ((attributeProperty->getAttr() == SUMO_ATTR_ALLOW) && !hasAttribute(SUMO_ATTR_DISALLOW)) {
236 throw ProcessError("allow need a disallow attribute in the same tag");
237 } else if ((attributeProperty->getAttr() == SUMO_ATTR_DISALLOW) && !hasAttribute(SUMO_ATTR_ALLOW)) {
238 throw ProcessError("disallow need an allow attribute in the same tag");
239 }
240 }
241 }
242#endif // DEBUG
243}
244
245
246const std::string&
248 // iterate over attribute properties
249 for (const auto& attributeProperty : myAttributeProperties) {
250 if (attributeProperty->getAttr() == attr) {
251 return attributeProperty->getDefaultStringValue();
252 }
253 }
254 throw ProcessError(TLF("Attribute '%' not defined", toString(attr)));
255}
256
257
258int
260 // iterate over attribute properties
261 for (const auto& attributeProperty : myAttributeProperties) {
262 if (attributeProperty->getAttr() == attr) {
263 return attributeProperty->getDefaultIntValue();
264 }
265 }
266 throw ProcessError(TLF("Attribute '%' not defined", toString(attr)));
267}
268
269
270double
272 // iterate over attribute properties
273 for (const auto& attributeProperty : myAttributeProperties) {
274 if (attributeProperty->getAttr() == attr) {
275 return attributeProperty->getDefaultDoubleValue();
276 }
277 }
278 throw ProcessError(TLF("Attribute '%' not defined", toString(attr)));
279}
280
281
284 // iterate over attribute properties
285 for (const auto& attributeProperty : myAttributeProperties) {
286 if (attributeProperty->getAttr() == attr) {
287 return attributeProperty->getDefaultTimeValue();
288 }
289 }
290 throw ProcessError(TLF("Attribute '%' not defined", toString(attr)));
291}
292
293
294bool
296 // iterate over attribute properties
297 for (const auto& attributeProperty : myAttributeProperties) {
298 if (attributeProperty->getAttr() == attr) {
299 return attributeProperty->getDefaultBoolValue();
300 }
301 }
302 throw ProcessError(TLF("Attribute '%' not defined", toString(attr)));
303}
304
305
306const RGBColor&
308 // iterate over attribute properties
309 for (const auto& attributeProperty : myAttributeProperties) {
310 if (attributeProperty->getAttr() == attr) {
311 return attributeProperty->getDefaultColorValue();
312 }
313 }
314 throw ProcessError(TLF("Attribute '%' not defined", toString(attr)));
315}
316
317
318const std::string&
322
323
324const std::string&
328
329
330unsigned int
334
335
336const std::vector<const GNEAttributeProperties*>&
340
341
344 // iterate over attribute properties
345 for (const auto& attributeProperty : myAttributeProperties) {
346 if ((attributeProperty->getAttr() == attr) || (attributeProperty->hasAttrSynonym() && (attributeProperty->getAttrSynonym() == attr))) {
347 return attributeProperty;
348 }
349 }
350 // throw error if these attribute doesn't exist
351 throw ProcessError(TLF("Attribute '%' doesn't exist", toString(attr)));
352}
353
354
357 if (index < 0 || index >= (int)myAttributeProperties.size()) {
358 throw ProcessError(TLF("Invalid index '%' used in getAttributeProperties(int)", toString(index)));
359 } else {
360 return myAttributeProperties.at(index);
361 }
362}
363
364
366GNETagProperties::at(int index) const {
367 return myAttributeProperties.at(index);
368}
369
370
371bool
373 // iterate over attribute properties
374 for (const auto& attributeProperty : myAttributeProperties) {
375 if (attributeProperty->getAttr() == attr) {
376 return true;
377 }
378 }
379 return false;
380}
381
382
383int
387
388
391 return myIcon;
392}
393
394
397 return myGLType;
398}
399
400
403 return myXMLTag;
404}
405
406
407const std::vector<SumoXMLTag>&
411
412
413const GNETagProperties*
417
418
419const std::vector<const GNETagProperties*>
421 // get the list of all roots
422 std::vector<const GNETagProperties*> parents;
423 parents.push_back(this);
424 while (parents.back()->myParent != nullptr) {
425 parents.push_back(parents.back()->myParent);
426 }
427 std::reverse(parents.begin(), parents.end());
428 return parents;
429}
430
431
432const std::vector<const GNETagProperties*>&
436
437
438std::vector<const GNETagProperties*>
440 std::vector<const GNETagProperties*> children;
441 // obtain all tags recursively (including this)
442 getChildrenTagProperties(this, children);
443 return children;
444}
445
446
447std::map<std::string, const GNEAttributeProperties*>
448GNETagProperties::getHierarchicalChildrenAttributesRecursively(const bool onlyCommon, const bool onlyDrawables) const {
449 std::map<std::string, const GNEAttributeProperties*> allChildrenAttributes;
450 // obtain all children attributes recursively (including this)
451 getChildrenAttributes(this, allChildrenAttributes, onlyDrawables);
452 // check if get only commons
453 if (onlyCommon) {
454 std::map<std::string, const GNEAttributeProperties*> commonChildrenAttributes;
455 // get all tag children and take only the common attributes
456 const auto tagChildren = getHierarchicalChildrenRecursively();
457 // iterate over all children and check if exist in child tag
458 for (const auto& attributeChild : allChildrenAttributes) {
459 bool isCommon = true;
460 for (const auto tagChild : tagChildren) {
461 if ((!onlyDrawables || tagChild->isDrawable()) && // filter only drawables
462 !tagChild->isHierarchicalTag() && // hierarchical tags doesn't have attirbutes
463 !tagChild->hasAttribute(attributeChild.second->getAttr())) {
464 isCommon = false;
465 }
466 }
467 if (isCommon) {
468 commonChildrenAttributes.insert(attributeChild);
469 }
470 }
471 return commonChildrenAttributes;
472 } else {
473 return allChildrenAttributes;
474 }
475}
476
477
480 if (myParent == nullptr) {
481 throw ProcessError("Root doesn't have an associated supermode");
482 } else {
483 auto parents = getHierarchicalParentsRecuersively();
484 // continue depending of supermode
485 if (parents.at(1)->getTag() == GNE_TAG_SUPERMODE_NETWORK) {
486 return Supermode::NETWORK;
487 } else if (parents.at(1)->getTag() == GNE_TAG_SUPERMODE_DEMAND) {
488 return Supermode::DEMAND;
489 } else if (parents.at(1)->getTag() == GNE_TAG_SUPERMODE_DATA) {
490 return Supermode::DATA;
491 } else {
492 throw ProcessError("Invalid supermode");
493 }
494 }
495}
496
497
498bool
502
503
504bool
508
509
510bool
514
515
516bool
520
521
522bool
526
527
528bool
532
533
534bool
538
539
540bool
544
545
546bool
550
551
552bool
556
557
558bool
562
563
564bool
568
569
570bool
574
575
576bool
580
581
582bool
584 return myTagType & Type::VTYPE;
585}
586
587bool
591
592bool
596
597
598bool
602
603
604bool
608
609
610bool
614
615
616bool
618 return myTagType & Type::FLOW;
619}
620
621
622bool
626
627
628bool
632
633
634bool
636 return isVehicle() || isPerson() || isContainer();
637}
638
639
640bool
642 return isPlanPerson() || isPlanContainer();
643}
644
645
646bool
650
651
652bool
656
657
658bool
662
663
664bool
668
669
670bool
674
675
676bool
680
681
682bool
686
687
688bool
692
693
694bool
698
699
700bool
704
705
706bool
710
711
712bool
716
717
718bool
722
723
724bool
728
729
730bool
734
735
736bool
740
741
742bool
746
747
748bool
752
753
754bool
756 return isPlan() && (myTagOver & Over::ROUTE);
757}
758
759
760bool
762 return isPlan() && (myTagOver & Over::EDGE);
763}
764
765
766bool
770
771
772bool
776
777
778bool
782
783
784bool
788
789
790bool
794
795
796bool
801
802
803bool
810
811
812bool
816
817
818bool
822
823
824bool
828
829
830bool
834
835
836bool
840
841
842bool
846
847
848bool
852
853
854bool
858
859
860bool
865
866
867bool
869 return isPlan() && (myTagOver & Over::TO_EDGE);
870}
871
872
873bool
875 return isPlan() && (myTagOver & Over::TO_TAZ);
876}
877
878
879bool
883
884bool
888
889
890bool
894
895
896bool
900
901
902bool
906
907
908bool
912
913
914bool
919
920
921bool
925
926
927bool
931
932
933bool
937
938
939bool
943
944
945bool
947 // note: By default all elements can be selected, except Tags with "NOTSELECTABLE"
948 return (myTagProperty & Property::NOTSELECTABLE) == false;
949}
950
951
952bool
956
957
958bool
962
963
964bool
968
969
970bool
972 // note: By default all elements support parameters, except Tags with "NOPARAMETERS"
973 return (myTagProperty & Property::NOPARAMETERS) == false;
974}
975
976
977bool
981
982
983bool
987
988
989bool
993
994
995bool
999
1000
1001bool
1005
1006
1007void
1009 myChildren.push_back(child);
1010}
1011
1012
1013void
1014GNETagProperties::getChildrenTagProperties(const GNETagProperties* tagProperties, std::vector<const GNETagProperties*>& result) const {
1015 result.push_back(tagProperties);
1016 // call it iterative for all children
1017 for (const auto& child : tagProperties->myChildren) {
1018 getChildrenTagProperties(child, result);
1019 }
1020}
1021
1022
1023void
1024GNETagProperties::getChildrenAttributes(const GNETagProperties* tagProperties, std::map<std::string, const GNEAttributeProperties*>& result, const bool onlyDrawables) const {
1025 // add every attribute only once
1026 if (!onlyDrawables || tagProperties->isDrawable()) {
1027 for (const auto& attributeProperty : tagProperties->myAttributeProperties) {
1028 result[attributeProperty->getAttrStr()] = attributeProperty;
1029 }
1030 }
1031 // call it iterative for all children
1032 for (const auto& child : tagProperties->myChildren) {
1033 getChildrenAttributes(child, result, onlyDrawables);
1034 }
1035}
1036
1037/****************************************************************************/
Supermode
@brie enum for supermodes
@ NETWORK
Network mode (Edges, junctions, etc..)
@ DATA
Data mode (edgeData, LaneData etc..)
@ DEMAND
Demand mode (Routes, Vehicles etc..)
long long int SUMOTime
Definition GUI.h:36
GUIGlObjectType
@ GLO_MAX
empty max
GUIIcon
An enumeration of icons used by the gui applications.
Definition GUIIcons.h:33
#define TLF(string,...)
Definition MsgHandler.h:307
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ GNE_TAG_PERSONTRIPS
@ SUMO_TAG_NET
root element of a network file
@ GNE_TAG_JUPEDSIM
@ SUMO_TAG_ROOTFILE
root file
@ GNE_TAG_CONTAINERPLANS
@ GNE_TAG_WIRES
@ GNE_TAG_SUPERMODE_DATA
@ GNE_TAG_DETECTORS
@ SUMO_TAG_VIEWSETTINGS_ADDITIONALS
@ GNE_TAG_DATAS
@ GNE_TAG_STOPS
@ SUMO_TAG_VIEWSETTINGS_VEHICLES
@ GNE_TAG_SUPERMODE_NETWORK
@ SUMO_TAG_VTYPE_DISTRIBUTION
distribution of a vehicle type
@ GNE_TAG_STOPPINGPLACES
@ GNE_TAG_TRANSPORTS
@ GNE_TAG_PERSONPLANS
@ GNE_TAG_CONTAINERSTOPS
@ GNE_TAG_SHAPES
@ GNE_TAG_SUPERMODE_DEMAND
@ GNE_TAG_WALKS
@ GNE_TAG_TAZS
@ GNE_TAG_RIDES
@ GNE_TAG_PERSONSTOPS
@ GNE_TAG_TRANSHIPS
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_DISALLOW
@ SUMO_ATTR_ALLOW
@ GNE_ATTR_STOPOEXCEPTION
stop exceptions (virtual, used by edge and lanes)
@ SUMO_ATTR_CHANGE_LEFT
@ SUMO_ATTR_CHANGE_RIGHT
@ SUMO_ATTR_VCLASS
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition ToString.h:46
bool hasExtendedAttributes() const
return true if tag correspond to an element that contains extended attributes
const std::string & getTooltipText() const
get tooltip text
bool isPlanTransport() const
return true if tag correspond to a transport
bool isMeanData() const
return true if tag correspond to a mean data element
bool isContainer() const
return true if tag correspond to a container element
bool planToContainerStop() const
return true if tag correspond to a plan that starts in containerStop
bool canBeReparent() const
return true if tag correspond to an element that can be reparent
bool isShapeElement() const
return true if tag correspond to a shape
const std::string & getSelectorText() const
get field string (by default tag in string format)
bool vClassIcon() const
return true if tag correspond to an element that has vClass icons
const Type myTagType
tag Types
bool getDefaultBoolValue(SumoXMLAttr attr) const
get default bool value
bool planFromChargingStation() const
return true if tag correspond to a plan that starts in chargingStation
bool isPlan() const
plans
bool planFromJunction() const
return true if tag correspond to a plan that starts in junction
bool isTAZElement() const
return true if tag correspond to a TAZ element
bool isFlow() const
return true if tag correspond to a flow element
bool hasGEOShape() const
return true if tag correspond to an element that can use a geo shape
const Over myTagOver
tag over
GUIGlObjectType getGLType() const
get GUIGlObjectType associated with this tag property
bool planToBusStop() const
return true if tag correspond to a plan that starts in busStop
bool isOtherElement() const
return true if tag correspond to a other element (sourceSinks, vTypes, etc.)
std::map< std::string, const GNEAttributeProperties * > getHierarchicalChildrenAttributesRecursively(const bool onlyCommon, const bool onlyDrawables) const
get all children attributes sorted by name (Including this)
bool isGenericData() const
data elements
const unsigned int myBackgroundColor
background color (used in labels and textFields, by default white)
bool planToStoppingPlace() const
return true if tag correspond to a plan that ends in stoppingPlace
bool planFromContainerStop() const
return true if tag correspond to a plan that starts in containerStop
const std::string & getTagStr() const
get Tag vinculated with this attribute Property in String Format (used to avoid multiple calls to toS...
bool planFromTo() const
return true if tag correspond to a plan with from-to parents
const RGBColor & getDefaultColorValue(SumoXMLAttr attr) const
get default bool value
const std::string myTooltipText
tooltip text
std::vector< const GNETagProperties * > myChildren
tag property children
bool planRoute() const
return true if tag correspond to a plan placed over route
const SumoXMLTag myTag
Sumo XML Tag vinculated wit this tag Property.
bool isChild() const
return true if tag correspond to an element child of another element (Example: E3->Entry/Exit)
const std::vector< SumoXMLTag > myXMLParentTags
vector with XML parent tags (used by child elements like access or spaces)
bool planStoppingPlace() const
return true if tag correspond to a plan placed in stoppingPlace
bool isNetworkElement() const
network elements
const GNETagProperties * myParent
tag property parent
bool isDataElement() const
return true if tag correspond to a data element
double getDefaultDoubleValue(SumoXMLAttr attr) const
get default double value
bool isSelectable() const
return true if tag correspond to a selectable element
bool planToJunction() const
return true if tag correspond to a plan that starts in junction
bool isType() const
demand elements
bool planFromParkingArea() const
return true if tag correspond to a plan that starts in parkingAera
bool isRoute() const
return true if tag correspond to a route element
bool isVehicle() const
return true if tag correspond to a vehicle element
bool planParkingArea() const
return true if tag correspond to a plan placed over parkingArea
SUMOTime getDefaultTimeValue(SumoXMLAttr attr) const
get default time value
bool isPlanStop() const
return true if tag correspond to a stop plan
bool planToTAZ() const
return true if tag correspond to a plan that starts in TAZ
bool planFromStoppingPlace() const
return true if tag correspond to a plan that starts in stoppingPlace
bool planConsecutiveEdges() const
plan parents
const std::vector< const GNETagProperties * > getHierarchicalParentsRecuersively() const
get all parents, beginning from current element (root not included) untils this element
std::vector< const GNETagProperties * > getHierarchicalChildrenRecursively() const
get all children tags (Including children of their children)
bool isHierarchicalTag() const
check if this is a hirearchical tag
bool isPlacedInRTree() const
return true if Tag correspond to an element that has to be placed in RTREE
bool vehicleJunctions() const
return true if tag correspond to a vehicle placed over from-to junctions
bool isPlanStopContainer() const
return true if tag correspond to a container stop plan
GNETagProperties()=delete
default constructor
GUIIcon getGUIIcon() const
get GUI icon associated to this tag property
bool hasParameters() const
return true if Tag correspond to an element that supports parameters "key1=value1|key2=value2|....
bool isStoppingPlace() const
additional elements
bool hasTypeParent() const
return true if tag correspond to an element with a type as a first parent
const GNEAttributeProperties * at(int index) const
get attribute value
const Property myTagProperty
tag properties
void getChildrenAttributes(const GNETagProperties *tagProperties, std::map< std::string, const GNEAttributeProperties * > &result, const bool onlyDrawables) const
recursive function for get all children attributes (Including this)
Over
element in which this element is placed
const std::string myTagStr
Sumo XML Tag vinculated wit this tag Property in String format.
bool isCalibrator() const
return true if tag correspond to a calibrator (Only used to group all detectors in the XML)
const std::vector< const GNETagProperties * > & getHierarchicalChildren() const
get children of this tag property
bool isDrawable() const
return true if tag correspond to a drawable element
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
bool planFromEdge() const
return true if tag correspond to a plan that starts in edge
Supermode getSupermode() const
get supermode associated with this tag
bool planFromBusStop() const
return true if tag correspond to a plan that starts in busStop
bool isDetector() const
return true if tag correspond to a shape (Only used to group all detectors in the XML)
bool planFromTrainStop() const
return true if tag correspond to a plan that starts in trainStop
void checkTagIntegrity() const
check Tag integrity (this include all their attributes)
bool planToTrainStop() const
return true if tag correspond to a plan that starts in trainStop
bool planFromTAZ() const
return true if tag correspond to a plan that starts in TAZ
bool vehicleRouteEmbedded() const
return true if tag correspond to a vehicle placed over an embedded route
bool isTypeDist() const
return true if tag correspond to a type distribution element
bool canCenterCameraAfterCreation() const
return true if tag correspond to an element that center camera after creation
bool isJuPedSimElement() const
return true if tag correspond to a JuPedSim element
bool isPlanContainer() const
return true if tag correspond to a container plan
bool isPlanPersonTrip() const
return true if tag correspond to a person trip plan
bool planEdge() const
return true if tag correspond to a plan placed over edge
bool hasDialog() const
return true if tag correspond to an element that can be edited using a dialog
bool isAdditionalPureElement() const
return true if tag correspond to a pure additional element
const SumoXMLTag myXMLTag
Tag written in XML and used in GNENetHelper::AttributeCarriers.
void getChildrenTagProperties(const GNETagProperties *tagProperties, std::vector< const GNETagProperties * > &result) const
recursive function for get all children tag properites (Including this)
const std::string mySelectorText
text show in selector text
bool isWireElement() const
return true if tag correspond to a Wire element
const GNETagProperties * getHierarchicalParent() const
hierarchy functions
int getNumberOfAttributes() const
get number of attributes
bool planContainerStop() const
return true if tag correspond to a plan placed over containerStop
bool vehicleEdges() const
return true if tag correspond to a vehicle placed over from-to edges
void addChild(const GNETagProperties *child)
add child
bool isPlanPerson() const
return true if tag correspond to a person plan
int getDefaultIntValue(SumoXMLAttr attr) const
get default int value
bool isDemandElement() const
return true if tag correspond to a demand element
const GUIGlObjectType myGLType
GUIGlObjectType associated with this tag property.
SumoXMLTag getXMLTag() const
default values
bool isPlanRide() const
return true if tag correspond to a ride plan
bool isInternalLane() const
return true if tag correspond to an internal lane
bool planTrainStop() const
return true if tag correspond to a plan placed over trainStop
bool isVehicleWaypoint() const
return true if tag correspond to a vehicle waypoint element
const std::vector< const GNEAttributeProperties * > & getAttributeProperties() const
get all attribute properties
bool isAdditionalElement() const
return true if tag correspond to an additional element (note: this include TAZ, shapes and wires)
bool isSymbol() const
return true if tag correspond to a symbol element
bool hasAttribute(SumoXMLAttr attr) const
check if current TagProperties owns the attribute "attr"
bool planToParkingArea() const
return true if tag correspond to a plan that starts in parkingArea
bool planToChargingStation() const
return true if tag correspond to a plan that starts in chargingStation
bool isPlanStopPerson() const
return true if tag correspond to a person stop plan
std::vector< const GNEAttributeProperties * > myAttributeProperties
vector with the attribute values vinculated with this Tag
unsigned int getBackGroundColor() const
get background color
bool isVehicleStop() const
return true if tag correspond to a vehicle stop element
bool isPerson() const
return true if tag correspond to a person element
bool vehicleTAZs() const
return true if tag correspond to a vehicle placed over from-to TAZs
~GNETagProperties()
destructor
bool vehicleRoute() const
plan parents
bool isPlanWalk() const
return true if tag correspond to a walk plan
bool planToEdge() const
return true if tag correspond to a plan that starts in edge
const GUIIcon myIcon
icon associated to this tag property
bool planBusStop() const
return true if tag correspond to a plan placed over busStop
const std::string & getDefaultStringValue(SumoXMLAttr attr) const
default values
bool requireProj() const
return true if tag correspond to an element that requires a geo projection
bool planChargingStation() const
return true if tag correspond to a plan placed over chargingStation
const std::vector< SumoXMLTag > & getXMLParentTags() const
get XML parent tags
bool isPlanTranship() const
return true if tag correspond to a tranship