52 myTagProperty(tagProperty),
54 myMasterTags(masterTags),
55 myTagSynonym(tagSynonym) {
78 throw ProcessError(
"element must be at leas networkElement, additional, TAZ, shape, demandElement or dataElement");
82 throw ProcessError(
"element can be only a networkElement, additional, TAZ, shape, demandElement or dataElement at the same time");
86 throw ProcessError(
"If attribute mask the start and end position, bot attribute has to be defined");
106 attributeProperty.checkAttributeIntegrity();
108 if (attributeProperty.isVClasses()) {
112 throw ProcessError(
"allow need a disallow attribute in the same tag");
114 throw ProcessError(
"disallow need an allow attribute in the same tag");
125 if (i.getAttr() == attr) {
126 if (!i.hasStaticDefaultValue()) {
127 throw ProcessError(
"attribute '" + i.getAttrStr() +
"' doesn't have a default value");
129 return i.getDefaultValue();
140 throw ProcessError(
"Attribute '" + attributeProperty.
getAttrStr() +
"' is deprecated and cannot be inserted");
142 throw ProcessError(
"Maximum number of attributes for tag " + attributeProperty.
getAttrStr() +
" exceeded");
146 if (i.getAttr() == attributeProperty.
getAttr()) {
161 if (i.getAttr() == attr) {
162 throw ProcessError(
"Attribute '" +
toString(attr) +
"' is deprecated but was inserted in list of attributes");
174 if ((i.getAttr() == attr) || (i.hasAttrSynonym() && (i.getAttrSynonym() == attr))) {
183 std::vector<GNEAttributeProperties>::const_iterator
189 std::vector<GNEAttributeProperties>::const_iterator
207 const std::vector<SumoXMLTag>&
227 if (i.getAttr() == attr) {
GUIIcon
An enumeration of icons used by the gui applications.
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_NOTHING
invalid tag
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
const std::string & getAttrStr() const
get XML Attribute
SumoXMLAttr getAttr() const
get XML Attribute
bool isVehicleType() const
return true if tag correspond to a vehicle type element
SumoXMLTag myTagSynonym
Tag written in XML (If is SUMO_TAG_NOTHING), original Tag name will be written)
bool hasDoubleParameters() const
return true if Tag correspond to an element that supports double parameters "key1=double1|key2=double...
bool isShape() const
return true if tag correspond to a shape
bool isAttributeDeprecated(SumoXMLAttr attr) const
return true if attribute of this tag is deprecated
bool canMaskXYZPositions() const
return true if tag correspond to an element that can mask the attributes "X", "Y" and "Z" position as...
std::vector< SumoXMLTag > myMasterTags
vector with master tags (used by slave elements)
bool personPlanEndBusStop() const
return true if tag correspond to a person plan that starts in a busStop
bool canBeReparent() const
return true if tag correspond to an element that can be reparent
std::vector< GNEAttributeProperties >::const_iterator end() const
get end of attribute values (used for iterate)
bool canBlockMovement() const
return true if tag correspond to an element that can block their movement
bool isPersonStop() const
return true if tag correspond to a person stop element
@ PERSONPLAN_START_BUSSTOP
bool personPlanEndEdge() const
return true if tag correspond to a person plan that starts in an edge
bool hasTagSynonym() const
return true if tag correspond to an element that will be written in XML with another tag
bool hasGEOPosition() const
return true if tag correspond to an element that can use a geo position
bool isTAZElement() const
return true if tag correspond to a TAZ element
bool hasGEOShape() const
return true if tag correspond to an element that can use a geo shape
bool isSlave() const
return true if tag correspond to an element slave of another element (I.e. doesn't have their own ID)
bool isGenericData() const
return true if tag correspond to a generic data element
void addDeprecatedAttribute(SumoXMLAttr attr)
add deprecated Attribute
bool personPlanStartEdge() const
return true if tag correspond to a person plan that starts in an edge
const std::string & getTagStr() const
get Tag vinculated with this attribute Property in String Format (used to avoid multiple calls to toS...
bool isPersonPlan() const
return true if tag correspond to a person plan
const GNEAttributeProperties & getAttributeProperties(SumoXMLAttr attr) const
get attribute (throw error if doesn't exist)
int myTagType
Attribute Type.
bool embebbedRoute() const
return true if tag correspond to an element that owns a embebbed route
bool isNetworkElement() const
return true if tag correspond to a network element
void addAttribute(const GNEAttributeProperties &attributeProperty)
add attribute (duplicated attributed aren't allowed)
bool isDataElement() const
return true if tag correspond to a data element
bool isSelectable() const
return true if tag correspond to a selectable element
bool isRoute() const
return true if tag correspond to a route element
bool isVehicle() const
return true if tag correspond to a vehicle element
static const size_t MAXNUMBEROFATTRIBUTES
max number of attributes allowed for every tag
bool isStop() const
return true if tag correspond to a stop element
bool personPlanStartBusStop() const
return true if tag correspond to a person plan that starts in a busStop
bool isPlacedInRTree() const
return true if Tag correspond to an element that has has to be placed in RTREE
bool personPlanStartStop() const
return true if tag correspond to a person plan that starts in a Stop
bool isPersonTrip() const
return true if tag correspond to a person trip
bool canBlockShape() const
return true if tag correspond to an element that can block their shape
std::vector< GNEAttributeProperties > myAttributeProperties
vector with the attribute values vinculated with this Tag
GUIIcon getGUIIcon() const
get GUI icon associated to this Tag
bool hasParameters() const
return true if Tag correspond to an element that supports parameters "key1=value1|key2=value2|....
bool isStoppingPlace() const
return true if tag correspond to a detector (Only used to group all stoppingPlaces in the output XML)
SumoXMLTag myTag
Sumo XML Tag vinculated wit 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
std::vector< GNEAttributeProperties >::const_iterator begin() const
get begin of attribute values (used for iterate)
bool hasMinimumNumberOfChildren() const
return true if tag correspond to an element that only have a limited number of children
bool canMaskStartEndPos() const
return true if tag correspond to an element that can mask the attributes "start" and "end" position a...
bool isDetector() const
return true if tag correspond to a shape (Only used to group all detectors in the XML)
void checkTagIntegrity() const
check Tag integrity (this include all their attributes)
bool canWriteChildrenSeparate() const
return true if tag correspond to an element that can write their child in a different file
bool canCenterCameraAfterCreation() const
return true if tag correspond to an element that center camera after creation
bool isRide() const
return true if tag correspond to a ride element
SumoXMLTag getTagSynonym() const
get tag synonym
bool hasDialog() const
return true if tag correspond to an element that can be edited using a dialog
std::vector< SumoXMLAttr > myDeprecatedAttributes
List with the deprecated Attributes.
std::string myTagStr
Sumo XML Tag vinculated wit this tag Property in String format.
const std::vector< SumoXMLTag > & getMasterTags() const
get master tags
int getNumberOfAttributes() const
get number of attributes
bool personPlanEndStop() const
return true if tag correspond to a person plan that starts in a Stop
bool canCloseShape() const
return true if tag correspond to an element that can close their shape
bool isDemandElement() const
return true if tag correspond to a demand element
const std::string & getDefaultValue(SumoXMLAttr attr) const
return the default value of the attribute of an element
int myTagProperty
Attribute properties.
bool isWalk() const
return true if tag correspond to a walk element
GUIIcon myIcon
icon associated to this Tag
bool isAdditionalElement() const
return true if tag correspond to an additional element
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 isPerson() const
return true if tag correspond to a person element
~GNETagProperties()
destructor
GNETagProperties()
default constructor