SUMO - Simulation of Urban MObility
GNEAttributeCarrier::TagValues Class Reference

struct with the attribute Properties More...

#include <GNEAttributeCarrier.h>

Collaboration diagram for GNEAttributeCarrier::TagValues:
Collaboration graph

Public Member Functions

void addAttribute (SumoXMLAttr attr, int attributeProperty, const std::string &definition, const std::string &defaultValue, std::vector< std::string > discreteValues=std::vector< std::string >(), SumoXMLAttr synonym=SUMO_ATTR_NOTHING)
 add attribute (duplicated attributed aren't allowed) More...
 
void addAttribute (SumoXMLAttr attr, int attributeProperty, const std::string &definition, const std::string &defaultValue, SumoXMLAttr synonym)
 add attribute with synonym (duplicated attributed aren't allowed) More...
 
void addDeprecatedAttribute (SumoXMLAttr attr)
 add deprecated Attribute More...
 
std::map< SumoXMLAttr, AttributeValues >::const_iterator begin () const
 get begin of attribute values (used for iterate) More...
 
bool canAutomaticSortChilds () const
 return true if tag correspond to an element that can sort their childs automatic More...
 
bool canBeReparent () const
 return true if tag correspond to an element that can be reparent More...
 
bool canBlockMovement () const
 return true if tag correspond to an element that can block their movement More...
 
bool canBlockShape () const
 return true if tag correspond to an element that can block their shape More...
 
bool canCloseShape () const
 return true if tag correspond to an element that can close their shape More...
 
bool canWriteChildsSeparate () const
 return true if tag correspond to an element that can sort their childs automatic More...
 
std::map< SumoXMLAttr, AttributeValues >::const_iterator end () const
 get end of attribute values (used for iterate) More...
 
const AttributeValues & getAttribute (SumoXMLAttr attr) const
 get attribute (throw error if doesn't exist) More...
 
const std::string & getDefaultValue (SumoXMLAttr attr) const
 return the default value of the attribute of an element More...
 
GUIIcon getGUIIcon () const
 get GUI icon associated to this Tag More...
 
int getNumberOfAttributes () const
 get number of attributes More...
 
SumoXMLTag getParentTag () const
 if Tag owns a parent, return parent tag More...
 
int getPositionListed () const
 get position in list (used in frames for listing tags with certain sort) More...
 
SumoXMLTag getTagSynonym () const
 get tag synonym More...
 
bool hasAttribute (SumoXMLAttr attr) const
 check if current TagValues owns the attribute attr More...
 
bool hasDialog () const
 return true if tag correspond to an element that can be edited using a dialog More...
 
bool hasGEOPosition () const
 return true if tag correspond to an element that can use a geo position More...
 
bool hasGEOShape () const
 return true if tag correspond to an element that can use a geo shape More...
 
bool hasMinimumNumberOfChilds () const
 return true if tag correspond to an element that only have a limited number of childs More...
 
bool hasParent () const
 return true if tag correspond to an element that can had another element as parent More...
 
bool hasTagSynonym () const
 return true if tag correspond to an element that will be written in XML with another tag More...
 
bool isAdditional () const
 return true if tag correspond to an additional More...
 
bool isAttributeDeprecated (SumoXMLAttr attr) const
 return true if attribute of this tag is deprecated More...
 
bool isDetector () const
 return true if tag correspond to a shape (Only used to group all detectors in the XML) More...
 
bool isDrawable () const
 return true if tag correspond to a drawable element More...
 
bool isNetElement () const
 return true if tag correspond to a netElement More...
 
bool isSelectable () const
 return true if tag correspond to a selectable element More...
 
bool isShape () const
 return true if tag correspond to a shape More...
 
bool isStoppingPlace () const
 return true if tag correspond to a detector (Only used to group all stoppingPlaces in the output XML) More...
 
 TagValues ()
 default constructor More...
 
 TagValues (int tagProperty, int positionListed, GUIIcon icon, SumoXMLTag tagParent=SUMO_TAG_NOTHING, SumoXMLTag tagSynonym=SUMO_TAG_NOTHING)
 parameter constructor More...
 

Private Attributes

std::map< SumoXMLAttr, AttributeValues > myAttributeValues
 map with the attribute values vinculated with this Tag More...
 
std::vector< SumoXMLAttr > myDeprecatedAttributes
 List with the deprecated Attributes. More...
 
GUIIcon myIcon
 icon associated to this Tag More...
 
SumoXMLTag myParentTag
 parent tag More...
 
int myPositionListed
 listed position More...
 
int myTagProperty
 Property of attribute. More...
 
SumoXMLTag myTagSynonym
 Tag written in XML (If is SUMO_TAG_NOTHING), original Tag name will be written) More...
 

Detailed Description

struct with the attribute Properties

Definition at line 226 of file GNEAttributeCarrier.h.

Constructor & Destructor Documentation

◆ TagValues() [1/2]

GNEAttributeCarrier::TagValues::TagValues ( )

default constructor

Definition at line 61 of file GNEAttributeCarrier.cpp.

◆ TagValues() [2/2]

GNEAttributeCarrier::TagValues::TagValues ( int  tagProperty,
int  positionListed,
GUIIcon  icon,
SumoXMLTag  tagParent = SUMO_TAG_NOTHING,
SumoXMLTag  tagSynonym = SUMO_TAG_NOTHING 
)

parameter constructor

Definition at line 70 of file GNEAttributeCarrier.cpp.

Member Function Documentation

◆ addAttribute() [1/2]

void GNEAttributeCarrier::TagValues::addAttribute ( SumoXMLAttr  attr,
int  attributeProperty,
const std::string &  definition,
const std::string &  defaultValue,
std::vector< std::string >  discreteValues = std::vector<std::string>(),
SumoXMLAttr  synonym = SUMO_ATTR_NOTHING 
)

add attribute (duplicated attributed aren't allowed)

Definition at line 98 of file GNEAttributeCarrier.cpp.

References isAttributeDeprecated(), myAttributeValues, and toString().

◆ addAttribute() [2/2]

void GNEAttributeCarrier::TagValues::addAttribute ( SumoXMLAttr  attr,
int  attributeProperty,
const std::string &  definition,
const std::string &  defaultValue,
SumoXMLAttr  synonym 
)

add attribute with synonym (duplicated attributed aren't allowed)

Definition at line 110 of file GNEAttributeCarrier.cpp.

References isAttributeDeprecated(), myAttributeValues, and toString().

◆ addDeprecatedAttribute()

void GNEAttributeCarrier::TagValues::addDeprecatedAttribute ( SumoXMLAttr  attr)

add deprecated Attribute

Definition at line 122 of file GNEAttributeCarrier.cpp.

References myAttributeValues, myDeprecatedAttributes, and toString().

◆ begin()

std::map< SumoXMLAttr, GNEAttributeCarrier::AttributeValues >::const_iterator GNEAttributeCarrier::TagValues::begin ( ) const

get begin of attribute values (used for iterate)

Definition at line 152 of file GNEAttributeCarrier.cpp.

References myAttributeValues.

◆ canAutomaticSortChilds()

bool GNEAttributeCarrier::TagValues::canAutomaticSortChilds ( ) const

return true if tag correspond to an element that can sort their childs automatic

Definition at line 304 of file GNEAttributeCarrier.cpp.

References myTagProperty, and GNEAttributeCarrier::TAGPROPERTY_AUTOMATICSORTING.

◆ canBeReparent()

bool GNEAttributeCarrier::TagValues::canBeReparent ( ) const

return true if tag correspond to an element that can be reparent

Definition at line 298 of file GNEAttributeCarrier.cpp.

References myTagProperty, and GNEAttributeCarrier::TAGPROPERTY_REPARENT.

◆ canBlockMovement()

bool GNEAttributeCarrier::TagValues::canBlockMovement ( ) const

return true if tag correspond to an element that can block their movement

Definition at line 244 of file GNEAttributeCarrier.cpp.

References myTagProperty, and GNEAttributeCarrier::TAGPROPERTY_BLOCKMOVEMENT.

Referenced by GNEAdditional::drawLockIcon().

◆ canBlockShape()

bool GNEAttributeCarrier::TagValues::canBlockShape ( ) const

return true if tag correspond to an element that can block their shape

Definition at line 250 of file GNEAttributeCarrier.cpp.

References myTagProperty, and GNEAttributeCarrier::TAGPROPERTY_BLOCKSHAPE.

◆ canCloseShape()

bool GNEAttributeCarrier::TagValues::canCloseShape ( ) const

return true if tag correspond to an element that can close their shape

Definition at line 256 of file GNEAttributeCarrier.cpp.

References myTagProperty, and GNEAttributeCarrier::TAGPROPERTY_CLOSESHAPE.

◆ canWriteChildsSeparate()

bool GNEAttributeCarrier::TagValues::canWriteChildsSeparate ( ) const

return true if tag correspond to an element that can sort their childs automatic

Definition at line 310 of file GNEAttributeCarrier.cpp.

References myTagProperty, and GNEAttributeCarrier::TAGPROPERTY_WRITECHILDSSEPARATE.

◆ end()

std::map< SumoXMLAttr, GNEAttributeCarrier::AttributeValues >::const_iterator GNEAttributeCarrier::TagValues::end ( ) const

get end of attribute values (used for iterate)

Definition at line 158 of file GNEAttributeCarrier.cpp.

References myAttributeValues.

◆ getAttribute()

const GNEAttributeCarrier::AttributeValues & GNEAttributeCarrier::TagValues::getAttribute ( SumoXMLAttr  attr) const

get attribute (throw error if doesn't exist)

Definition at line 135 of file GNEAttributeCarrier.cpp.

References myAttributeValues, and toString().

Referenced by GNEInspectorFrame::AttributesEditor::AttributeInput::showAttribute().

◆ getDefaultValue()

const std::string & GNEAttributeCarrier::TagValues::getDefaultValue ( SumoXMLAttr  attr) const

return the default value of the attribute of an element

Definition at line 80 of file GNEAttributeCarrier.cpp.

References myAttributeValues, and toString().

◆ getGUIIcon()

GUIIcon GNEAttributeCarrier::TagValues::getGUIIcon ( ) const

get GUI icon associated to this Tag

Definition at line 170 of file GNEAttributeCarrier.cpp.

References myIcon.

◆ getNumberOfAttributes()

int GNEAttributeCarrier::TagValues::getNumberOfAttributes ( ) const

get number of attributes

Definition at line 164 of file GNEAttributeCarrier.cpp.

References myAttributeValues.

◆ getParentTag()

SumoXMLTag GNEAttributeCarrier::TagValues::getParentTag ( ) const

if Tag owns a parent, return parent tag

Definition at line 176 of file GNEAttributeCarrier.cpp.

References hasParent(), and myParentTag.

Referenced by GNEAdditional::GNEAdditional().

◆ getPositionListed()

int GNEAttributeCarrier::TagValues::getPositionListed ( ) const

get position in list (used in frames for listing tags with certain sort)

Definition at line 92 of file GNEAttributeCarrier.cpp.

References myPositionListed.

◆ getTagSynonym()

SumoXMLTag GNEAttributeCarrier::TagValues::getTagSynonym ( ) const

get tag synonym

Definition at line 186 of file GNEAttributeCarrier.cpp.

References hasTagSynonym(), and myTagSynonym.

Referenced by GNEAdditional::writeAdditional().

◆ hasAttribute()

bool GNEAttributeCarrier::TagValues::hasAttribute ( SumoXMLAttr  attr) const

check if current TagValues owns the attribute attr

Definition at line 196 of file GNEAttributeCarrier.cpp.

References myAttributeValues.

◆ hasDialog()

bool GNEAttributeCarrier::TagValues::hasDialog ( ) const

return true if tag correspond to an element that can be edited using a dialog

Definition at line 286 of file GNEAttributeCarrier.cpp.

References myTagProperty, and GNEAttributeCarrier::TAGPROPERTY_DIALOG.

◆ hasGEOPosition()

bool GNEAttributeCarrier::TagValues::hasGEOPosition ( ) const

return true if tag correspond to an element that can use a geo position

Definition at line 262 of file GNEAttributeCarrier.cpp.

References myTagProperty, and GNEAttributeCarrier::TAGPROPERTY_GEOPOSITION.

◆ hasGEOShape()

bool GNEAttributeCarrier::TagValues::hasGEOShape ( ) const

return true if tag correspond to an element that can use a geo shape

Definition at line 268 of file GNEAttributeCarrier.cpp.

References myTagProperty, and GNEAttributeCarrier::TAGPROPERTY_GEOSHAPE.

◆ hasMinimumNumberOfChilds()

bool GNEAttributeCarrier::TagValues::hasMinimumNumberOfChilds ( ) const

return true if tag correspond to an element that only have a limited number of childs

Definition at line 292 of file GNEAttributeCarrier.cpp.

References myTagProperty, and GNEAttributeCarrier::TAGPROPERTY_MINIMUMCHILDS.

Referenced by GNEAdditional::writeAdditional().

◆ hasParent()

bool GNEAttributeCarrier::TagValues::hasParent ( ) const

return true if tag correspond to an element that can had another element as parent

Definition at line 274 of file GNEAttributeCarrier.cpp.

References myTagProperty, and GNEAttributeCarrier::TAGPROPERTY_PARENT.

Referenced by getParentTag().

◆ hasTagSynonym()

bool GNEAttributeCarrier::TagValues::hasTagSynonym ( ) const

return true if tag correspond to an element that will be written in XML with another tag

Definition at line 280 of file GNEAttributeCarrier.cpp.

References myTagProperty, and GNEAttributeCarrier::TAGPROPERTY_SYNONYM.

Referenced by getTagSynonym(), and GNEAdditional::writeAdditional().

◆ isAdditional()

bool GNEAttributeCarrier::TagValues::isAdditional ( ) const

return true if tag correspond to an additional

Definition at line 208 of file GNEAttributeCarrier.cpp.

References myTagProperty, and GNEAttributeCarrier::TAGPROPERTY_ADDITIONAL.

◆ isAttributeDeprecated()

bool GNEAttributeCarrier::TagValues::isAttributeDeprecated ( SumoXMLAttr  attr) const

return true if attribute of this tag is deprecated

Definition at line 316 of file GNEAttributeCarrier.cpp.

References myDeprecatedAttributes.

Referenced by addAttribute().

◆ isDetector()

bool GNEAttributeCarrier::TagValues::isDetector ( ) const

return true if tag correspond to a shape (Only used to group all detectors in the XML)

Definition at line 238 of file GNEAttributeCarrier.cpp.

References myTagProperty, and GNEAttributeCarrier::TAGPROPERTY_DETECTOR.

Referenced by GNENet::saveAdditionalsConfirmed().

◆ isDrawable()

bool GNEAttributeCarrier::TagValues::isDrawable ( ) const

return true if tag correspond to a drawable element

Definition at line 214 of file GNEAttributeCarrier.cpp.

References myTagProperty, and GNEAttributeCarrier::TAGPROPERTY_DRAWABLE.

◆ isNetElement()

bool GNEAttributeCarrier::TagValues::isNetElement ( ) const

return true if tag correspond to a netElement

Definition at line 202 of file GNEAttributeCarrier.cpp.

References myTagProperty, and GNEAttributeCarrier::TAGPROPERTY_NETELEMENT.

◆ isSelectable()

bool GNEAttributeCarrier::TagValues::isSelectable ( ) const

return true if tag correspond to a selectable element

Definition at line 220 of file GNEAttributeCarrier.cpp.

References myTagProperty, and GNEAttributeCarrier::TAGPROPERTY_SELECTABLE.

◆ isShape()

bool GNEAttributeCarrier::TagValues::isShape ( ) const

return true if tag correspond to a shape

Definition at line 226 of file GNEAttributeCarrier.cpp.

References myTagProperty, and GNEAttributeCarrier::TAGPROPERTY_SHAPE.

◆ isStoppingPlace()

bool GNEAttributeCarrier::TagValues::isStoppingPlace ( ) const

return true if tag correspond to a detector (Only used to group all stoppingPlaces in the output XML)

Definition at line 232 of file GNEAttributeCarrier.cpp.

References myTagProperty, and GNEAttributeCarrier::TAGPROPERTY_STOPPINGPLACE.

Referenced by GNENet::saveAdditionalsConfirmed().

Field Documentation

◆ myAttributeValues

std::map<SumoXMLAttr, AttributeValues> GNEAttributeCarrier::TagValues::myAttributeValues
private

map with the attribute values vinculated with this Tag

Definition at line 338 of file GNEAttributeCarrier.h.

Referenced by addAttribute(), addDeprecatedAttribute(), begin(), end(), getAttribute(), getDefaultValue(), getNumberOfAttributes(), and hasAttribute().

◆ myDeprecatedAttributes

std::vector<SumoXMLAttr> GNEAttributeCarrier::TagValues::myDeprecatedAttributes
private

List with the deprecated Attributes.

Definition at line 353 of file GNEAttributeCarrier.h.

Referenced by addDeprecatedAttribute(), and isAttributeDeprecated().

◆ myIcon

GUIIcon GNEAttributeCarrier::TagValues::myIcon
private

icon associated to this Tag

Definition at line 341 of file GNEAttributeCarrier.h.

Referenced by getGUIIcon().

◆ myParentTag

SumoXMLTag GNEAttributeCarrier::TagValues::myParentTag
private

parent tag

Definition at line 347 of file GNEAttributeCarrier.h.

Referenced by getParentTag().

◆ myPositionListed

int GNEAttributeCarrier::TagValues::myPositionListed
private

listed position

Definition at line 344 of file GNEAttributeCarrier.h.

Referenced by getPositionListed().

◆ myTagProperty

◆ myTagSynonym

SumoXMLTag GNEAttributeCarrier::TagValues::myTagSynonym
private

Tag written in XML (If is SUMO_TAG_NOTHING), original Tag name will be written)

Definition at line 350 of file GNEAttributeCarrier.h.

Referenced by getTagSynonym().


The documentation for this class was generated from the following files: