26 #define MAXNUMBEROFATTRIBUTES 128
43 const int conflicts,
const GUIIcon icon,
const SumoXMLTag XMLTag,
const std::string tooltip,
44 const std::vector<SumoXMLTag> parentTags,
const unsigned int backgroundColor,
45 const std::string fieldString) :
49 myTagProperty(tagProperty),
50 myTagParents(tagParents),
51 myConflicts(conflicts),
54 myTooltipText(tooltip),
55 myParentTags(parentTags),
56 myFieldString(fieldString.empty() ?
toString(tag) : fieldString),
57 myBackgroundColor(backgroundColor) {
114 throw ProcessError(
TL(
"element can be either shape or TAZ or wire element at the same time"));
118 throw ProcessError(
TL(
"If attributes mask the start and end position, both attributes have to be defined"));
138 attributeProperty.checkAttributeIntegrity();
140 if (attributeProperty.isSVCPermission()) {
146 throw ProcessError(
TL(
"allow need a disallow attribute in the same tag"));
148 throw ProcessError(
TL(
"disallow need an allow attribute in the same tag"));
160 if (attributeProperty.getAttr() == attr) {
161 if (!attributeProperty.hasDefaultValue()) {
162 throw ProcessError(
TLF(
"attribute '%' doesn't have a default value", attributeProperty.getAttrStr()));
164 return attributeProperty.getDefaultValue();
179 if (attributeProperty.
getAttr() == attrProperty.getAttr()) {
212 if ((attributeProperty.getAttr() == attr) || (attributeProperty.hasAttrSynonym() && (attributeProperty.getAttrSynonym() == attr))) {
213 return attributeProperty;
221 std::vector<GNEAttributeProperties>::const_iterator
227 std::vector<GNEAttributeProperties>::const_iterator
257 const std::vector<SumoXMLTag>&
267 if (attributeProperty.getAttr() == attr) {
#define MAXNUMBEROFATTRIBUTES
Supermode
@brie enum for supermodes
@ NETWORK
Network mode (Edges, junctions, etc..)
@ DATA
Data mode (edgeData, LaneData etc..)
@ DEMAND
Demand mode (Routes, Vehicles etc..)
GUIIcon
An enumeration of icons used by the gui applications.
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_VTYPE_DISTRIBUTION
distribution of a vehicle type
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ GNE_ATTR_STOPOEXCEPTION
stop exceptions (virtual, used by edge and lanes)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
const std::string & getAttrStr() const
get XML Attribute
SumoXMLAttr getAttr() const
get XML Attribute
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
std::vector< GNEAttributeProperties >::const_iterator end() const
get end of attribute values (used for iterate)
const std::vector< SumoXMLTag > & getParentTags() const
get parent tags
bool vClassIcon() const
return true if tag correspond to an element that has vClass icons
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
bool planToBusStop() const
return true if tag correspond to a plan that starts in busStop
bool isGenericData() const
data elements
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
bool planRoute() const
return true if tag correspond to a plan placed over route
const GNEAttributeProperties & getAttributeProperties(SumoXMLAttr attr) const
get attribute (throw error if doesn't exist)
SumoXMLTag myXMLTag
Tag written in XML and used in GNENetHelper::AttributeCarriers.
bool isChild() const
return true if tag correspond to an element child of another element (Example: E3->Entry/Exit)
bool planStoppingPlace() const
return true if tag correspond to a plan placed in stoppingPlace
bool isNetworkElement() const
element sets
void addAttribute(const GNEAttributeProperties &attributeProperty)
add attribute (duplicated attributed aren't allowed)
const std::string & getFieldString() const
get field string (by default tag in string format)
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 planToJunction() const
return true if tag correspond to a plan that starts in junction
bool isType() const
demand elements
std::string myTooltipText
tooltip text
std::vector< SumoXMLTag > myParentTags
vector with master tags (used by child elements)
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 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
@ PLAN_FROM_CONTAINERSTOP
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
std::string myFieldString
field string
bool isPlanStopContainer() const
return true if tag correspond to a container stop plan
const GNEAttributeProperties & at(int index) const
get attribute value
bool isPersonTrip() const
return true if tag correspond to a person trip
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
additional elements
SumoXMLTag myTag
Sumo XML Tag vinculated wit this tag Property.
bool isCalibrator() const
return true if tag correspond to a calibrator (Only used to group all detectors in the XML)
unsigned int myBackgroundColor
background color (used in labels and textFields, by default white)
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 canMaskStartEndPos() const
return true if tag correspond to an element that can mask the attributes "start" and "end" position a...
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
int myTagParents
tag parents
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 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
std::string myTagStr
Sumo XML Tag vinculated wit this tag Property in String format.
bool isWireElement() const
return true if tag correspond to a Wire element
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
bool canCloseShape() const
return true if tag correspond to an element that can close their shape
bool isPlanPerson() const
return true if tag correspond to a person plan
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
tag properties
SumoXMLTag getXMLTag() const
get XML tag
bool isPlanRide() const
return true if tag correspond to a ride plan
bool isInternalLane() const
return true if tag correspond to an internal lane
GUIIcon myIcon
icon associated to this Tag
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
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 isPlanStopPerson() const
return true if tag correspond to a person stop plan
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
bool planBusStop() const
return true if tag correspond to a plan placed over busStop
bool requireProj() const
return true if tag correspond to an element that requires a geo projection
bool isPlanTranship() const
return true if tag correspond to a tranship
GNETagProperties()
default constructor