Eclipse SUMO - Simulation of Urban MObility
GNEAttributeCarrier::AttributeProperties Class Reference

struct with the attribute Properties More...

#include <GNEAttributeCarrier.h>

Collaboration diagram for GNEAttributeCarrier::AttributeProperties:

Public Member Functions

 AttributeProperties ()
 default constructor More...
 
 AttributeProperties (const SumoXMLAttr attribute, const int attributeProperty, const std::string &definition, std::string defaultValue="")
 parameter constructor More...
 
void checkAttributeIntegrity ()
 check Attribute integrity (For example, throw an exception if tag has a Float default value, but given default value cannot be parse to float) More...
 
SumoXMLAttr getAttr () const
 get XML Attribute More...
 
const std::string & getAttrStr () const
 get XML Attribute More...
 
SumoXMLAttr getAttrSynonym () const
 get tag synonym More...
 
const std::string & getDefaultValue () const
 get default value More...
 
const std::string & getDefinition () const
 get default value More...
 
std::string getDescription () const
 return a description of attribute More...
 
const std::vector< std::string > & getDiscreteValues () const
 get discrete values More...
 
double getMaximumRange () const
 get maximum range More...
 
double getMinimumRange () const
 get minimum range More...
 
int getPositionListed () const
 get position in list (used in frames for listing attributes with certain sort) More...
 
const TagPropertiesgetTagPropertyParent () const
 get reference to tagProperty parent More...
 
bool hasAttrRange () const
 return true if Attr correspond to an element that only accept a range of values More...
 
bool hasAttrSynonym () const
 return true if Attr correspond to an element that will be written in XML with another name More...
 
bool hasMutableDefaultValue () const
 return true if attribute owns a mutable default value More...
 
bool hasStaticDefaultValue () const
 return true if attribute owns a static default value More...
 
bool isActivatable () const
 return true if atribute is activatable More...
 
bool isBool () const
 return true if atribute is boolean More...
 
bool isColor () const
 return true if atribute is a color More...
 
bool isComplex () const
 return true if atribute is complex More...
 
bool isDiscrete () const
 return true if atribute is discrete More...
 
bool isExtended () const
 return true if atribute is extended More...
 
bool isFilename () const
 return true if atribute is a filename More...
 
bool isFloat () const
 return true if atribute is a float More...
 
bool isFlowDefinition () const
 return true if atribute is part of a flow definition More...
 
bool isInt () const
 return true if atribute is an integer More...
 
bool isList () const
 return true if atribute is a list More...
 
bool isNumerical () const
 return true if atribute is numerical (int or float) More...
 
bool isOptional () const
 return true if atribute is optional (it will be written in XML only if his value is different of default value) More...
 
bool isposition () const
 return true if atribute is a position More...
 
bool isPositive () const
 return true if atribute is positive More...
 
bool isProbability () const
 return true if atribute is a probability More...
 
bool isSecuential () const
 return true if atribute is sequential More...
 
bool isString () const
 return true if atribute is a string More...
 
bool isSUMOTime () const
 return true if atribute is a SUMOTime More...
 
bool isSVCPermission () const
 return true if atribute is a VehicleClass More...
 
bool isUnique () const
 return true if atribute is unique More...
 
bool isVClass () const
 return true if atribute is a VehicleClass More...
 
bool isVClasses () const
 return true if atribute is a list of VClasses More...
 
bool requireUpdateGeometry () const
 return true if atribute requires a update geometry in setAttribute(...) More...
 
void setDiscreteValues (const std::vector< std::string > &discreteValues)
 set discrete values More...
 
void setRange (const double minimum, const double maximum)
 set range More...
 
void setSynonym (const SumoXMLAttr synonym)
 set synonim More...
 
void setTagPropertyParent (TagProperties *tagPropertyParent)
 set tag property parent More...
 
 ~AttributeProperties ()
 destructor More...
 

Private Attributes

SumoXMLAttr myAttribute
 XML Attribute. More...
 
int myAttributeProperty
 Property of attribute. More...
 
std::string myAttrStr
 string with the Attribute in text format (to avoid unnecesaries toStrings(...) calls) More...
 
SumoXMLAttr myAttrSynonym
 Attribute written in XML (If is SUMO_ATTR_NOTHING), original Attribute will be written) More...
 
std::string myDefaultValue
 default value (by default empty) More...
 
std::string myDefinition
 text with a definition of attribute More...
 
std::vector< std::string > myDiscreteValues
 discrete values that can take this Attribute (by default empty) More...
 
double myMaximumRange
 maxium Range More...
 
double myMinimumRange
 minimun Range More...
 
TagPropertiesmyTagPropertyParent
 pointer to tagProperty parent More...
 

Detailed Description

struct with the attribute Properties

Definition at line 97 of file GNEAttributeCarrier.h.

Constructor & Destructor Documentation

◆ AttributeProperties() [1/2]

GNEAttributeCarrier::AttributeProperties::AttributeProperties ( )

default constructor

Definition at line 57 of file GNEAttributeCarrier.cpp.

◆ AttributeProperties() [2/2]

GNEAttributeCarrier::AttributeProperties::AttributeProperties ( const SumoXMLAttr  attribute,
const int  attributeProperty,
const std::string &  definition,
std::string  defaultValue = "" 
)

◆ ~AttributeProperties()

GNEAttributeCarrier::AttributeProperties::~AttributeProperties ( )

destructor

Definition at line 102 of file GNEAttributeCarrier.cpp.

Member Function Documentation

◆ checkAttributeIntegrity()

void GNEAttributeCarrier::AttributeProperties::checkAttributeIntegrity ( )

check Attribute integrity (For example, throw an exception if tag has a Float default value, but given default value cannot be parse to float)

Definition at line 106 of file GNEAttributeCarrier.cpp.

References SUMO_ATTR_NOTHING.

◆ getAttr()

SumoXMLAttr GNEAttributeCarrier::AttributeProperties::getAttr ( ) const

◆ getAttrStr()

const std::string & GNEAttributeCarrier::AttributeProperties::getAttrStr ( ) const

◆ getAttrSynonym()

SumoXMLAttr GNEAttributeCarrier::AttributeProperties::getAttrSynonym ( ) const

get tag synonym

Definition at line 299 of file GNEAttributeCarrier.cpp.

◆ getDefaultValue()

const std::string & GNEAttributeCarrier::AttributeProperties::getDefaultValue ( ) const

get default value

Definition at line 217 of file GNEAttributeCarrier.cpp.

Referenced by GNEAttributeCarrier::checkParsedAttribute(), and GNEStop::enableAttribute().

◆ getDefinition()

const std::string & GNEAttributeCarrier::AttributeProperties::getDefinition ( ) const

get default value

Definition at line 211 of file GNEAttributeCarrier.cpp.

◆ getDescription()

◆ getDiscreteValues()

const std::vector< std::string > & GNEAttributeCarrier::AttributeProperties::getDiscreteValues ( ) const

◆ getMaximumRange()

double GNEAttributeCarrier::AttributeProperties::getMaximumRange ( ) const

get maximum range

Definition at line 319 of file GNEAttributeCarrier.cpp.

Referenced by GNEAttributeCarrier::checkParsedAttribute().

◆ getMinimumRange()

double GNEAttributeCarrier::AttributeProperties::getMinimumRange ( ) const

get minimum range

Definition at line 309 of file GNEAttributeCarrier.cpp.

Referenced by GNEAttributeCarrier::checkParsedAttribute().

◆ getPositionListed()

int GNEAttributeCarrier::AttributeProperties::getPositionListed ( ) const

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

Definition at line 200 of file GNEAttributeCarrier.cpp.

◆ getTagPropertyParent()

const GNEAttributeCarrier::TagProperties & GNEAttributeCarrier::AttributeProperties::getTagPropertyParent ( ) const

get reference to tagProperty parent

Definition at line 194 of file GNEAttributeCarrier.cpp.

Referenced by GNEFrameAttributesModuls::AttributesEditorRow::AttributesEditorRow().

◆ hasAttrRange()

bool GNEAttributeCarrier::AttributeProperties::hasAttrRange ( ) const

return true if Attr correspond to an element that only accept a range of values

Definition at line 346 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_RANGE.

Referenced by GNEAttributeCarrier::checkParsedAttribute().

◆ hasAttrSynonym()

bool GNEAttributeCarrier::AttributeProperties::hasAttrSynonym ( ) const

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

Definition at line 341 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_SYNONYM.

◆ hasMutableDefaultValue()

bool GNEAttributeCarrier::AttributeProperties::hasMutableDefaultValue ( ) const

return true if attribute owns a mutable default value

Definition at line 335 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_DEFAULTVALUEMUTABLE.

◆ hasStaticDefaultValue()

bool GNEAttributeCarrier::AttributeProperties::hasStaticDefaultValue ( ) const

return true if attribute owns a static default value

Definition at line 329 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_DEFAULTVALUESTATIC.

◆ isActivatable()

bool GNEAttributeCarrier::AttributeProperties::isActivatable ( ) const

return true if atribute is activatable

Definition at line 478 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_ACTIVATABLE.

Referenced by GNEFrameAttributesModuls::AttributesEditorRow::AttributesEditorRow().

◆ isBool()

bool GNEAttributeCarrier::AttributeProperties::isBool ( ) const

◆ isColor()

bool GNEAttributeCarrier::AttributeProperties::isColor ( ) const

◆ isComplex()

bool GNEAttributeCarrier::AttributeProperties::isComplex ( ) const

return true if atribute is complex

Definition at line 484 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_COMPLEX.

◆ isDiscrete()

bool GNEAttributeCarrier::AttributeProperties::isDiscrete ( ) const

◆ isExtended()

bool GNEAttributeCarrier::AttributeProperties::isExtended ( ) const

return true if atribute is extended

Definition at line 466 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_EXTENDED.

◆ isFilename()

bool GNEAttributeCarrier::AttributeProperties::isFilename ( ) const

return true if atribute is a filename

Definition at line 412 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_FILENAME.

Referenced by GNEAttributeCarrier::checkParsedAttribute().

◆ isFloat()

bool GNEAttributeCarrier::AttributeProperties::isFloat ( ) const

return true if atribute is a float

Definition at line 358 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_FLOAT.

Referenced by GNEAttributeCarrier::checkParsedAttribute().

◆ isFlowDefinition()

bool GNEAttributeCarrier::AttributeProperties::isFlowDefinition ( ) const

return true if atribute is part of a flow definition

Definition at line 490 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_FLOWDEFINITION.

Referenced by GNEAttributeCarrier::getAlternativeValueForDisabledAttributes().

◆ isInt()

bool GNEAttributeCarrier::AttributeProperties::isInt ( ) const

return true if atribute is an integer

Definition at line 352 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_INT.

Referenced by GNEAttributeCarrier::checkParsedAttribute().

◆ isList()

bool GNEAttributeCarrier::AttributeProperties::isList ( ) const

return true if atribute is a list

Definition at line 430 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_LIST.

Referenced by GNEAttributeCarrier::checkParsedAttribute(), and GNENet::replaceInListAttribute().

◆ isNumerical()

bool GNEAttributeCarrier::AttributeProperties::isNumerical ( ) const

return true if atribute is numerical (int or float)

Definition at line 394 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_FLOAT, GNEAttributeCarrier::ATTRPROPERTY_INT, and GNEAttributeCarrier::ATTRPROPERTY_SUMOTIME.

◆ isOptional()

bool GNEAttributeCarrier::AttributeProperties::isOptional ( ) const

return true if atribute is optional (it will be written in XML only if his value is different of default value)

Definition at line 448 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_OPTIONAL.

Referenced by GNEAttributeCarrier::checkParsedAttribute().

◆ isposition()

bool GNEAttributeCarrier::AttributeProperties::isposition ( ) const

return true if atribute is a position

Definition at line 382 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_POSITION.

Referenced by GNEAttributeCarrier::checkParsedAttribute().

◆ isPositive()

bool GNEAttributeCarrier::AttributeProperties::isPositive ( ) const

return true if atribute is positive

Definition at line 400 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_POSITIVE.

Referenced by GNEAttributeCarrier::checkParsedAttribute().

◆ isProbability()

bool GNEAttributeCarrier::AttributeProperties::isProbability ( ) const

return true if atribute is a probability

Definition at line 388 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_PROBABILITY.

Referenced by GNEAttributeCarrier::checkParsedAttribute().

◆ isSecuential()

bool GNEAttributeCarrier::AttributeProperties::isSecuential ( ) const

return true if atribute is sequential

Definition at line 436 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_SECUENCIAL.

◆ isString()

bool GNEAttributeCarrier::AttributeProperties::isString ( ) const

return true if atribute is a string

Definition at line 376 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_STRING.

◆ isSUMOTime()

bool GNEAttributeCarrier::AttributeProperties::isSUMOTime ( ) const

return true if atribute is a SUMOTime

Definition at line 364 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_SUMOTIME.

Referenced by GNEAttributeCarrier::checkParsedAttribute().

◆ isSVCPermission()

bool GNEAttributeCarrier::AttributeProperties::isSVCPermission ( ) const

return true if atribute is a VehicleClass

Definition at line 424 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_LIST, and GNEAttributeCarrier::ATTRPROPERTY_VCLASS.

◆ isUnique()

bool GNEAttributeCarrier::AttributeProperties::isUnique ( ) const

return true if atribute is unique

Definition at line 442 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_UNIQUE.

◆ isVClass()

bool GNEAttributeCarrier::AttributeProperties::isVClass ( ) const

return true if atribute is a VehicleClass

Definition at line 418 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_VCLASS.

Referenced by GNEAttributeCarrier::checkParsedAttribute().

◆ isVClasses()

bool GNEAttributeCarrier::AttributeProperties::isVClasses ( ) const

return true if atribute is a list of VClasses

Definition at line 460 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_VCLASSES.

Referenced by GNEFrameAttributesModuls::AttributesEditorRow::AttributesEditorRow().

◆ requireUpdateGeometry()

bool GNEAttributeCarrier::AttributeProperties::requireUpdateGeometry ( ) const

return true if atribute requires a update geometry in setAttribute(...)

Definition at line 472 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_UPDATEGEOMETRY.

Referenced by GNEChange_Attribute::redo(), GNEVehicleType::setAttribute(), and GNEChange_Attribute::undo().

◆ setDiscreteValues()

void GNEAttributeCarrier::AttributeProperties::setDiscreteValues ( const std::vector< std::string > &  discreteValues)

◆ setRange()

void GNEAttributeCarrier::AttributeProperties::setRange ( const double  minimum,
const double  maximum 
)

◆ setSynonym()

void GNEAttributeCarrier::AttributeProperties::setSynonym ( const SumoXMLAttr  synonym)

set synonim

Definition at line 147 of file GNEAttributeCarrier.cpp.

Referenced by GNEAttributeCarrier::fillAdditionals().

◆ setTagPropertyParent()

void GNEAttributeCarrier::AttributeProperties::setTagPropertyParent ( TagProperties tagPropertyParent)

set tag property parent

Definition at line 176 of file GNEAttributeCarrier.cpp.

Field Documentation

◆ myAttribute

SumoXMLAttr GNEAttributeCarrier::AttributeProperties::myAttribute
private

XML Attribute.

Definition at line 243 of file GNEAttributeCarrier.h.

◆ myAttributeProperty

int GNEAttributeCarrier::AttributeProperties::myAttributeProperty
private

Property of attribute.

Definition at line 252 of file GNEAttributeCarrier.h.

◆ myAttrStr

std::string GNEAttributeCarrier::AttributeProperties::myAttrStr
private

string with the Attribute in text format (to avoid unnecesaries toStrings(...) calls)

Definition at line 249 of file GNEAttributeCarrier.h.

◆ myAttrSynonym

SumoXMLAttr GNEAttributeCarrier::AttributeProperties::myAttrSynonym
private

Attribute written in XML (If is SUMO_ATTR_NOTHING), original Attribute will be written)

Definition at line 264 of file GNEAttributeCarrier.h.

◆ myDefaultValue

std::string GNEAttributeCarrier::AttributeProperties::myDefaultValue
private

default value (by default empty)

Definition at line 258 of file GNEAttributeCarrier.h.

◆ myDefinition

std::string GNEAttributeCarrier::AttributeProperties::myDefinition
private

text with a definition of attribute

Definition at line 255 of file GNEAttributeCarrier.h.

◆ myDiscreteValues

std::vector<std::string> GNEAttributeCarrier::AttributeProperties::myDiscreteValues
private

discrete values that can take this Attribute (by default empty)

Definition at line 261 of file GNEAttributeCarrier.h.

◆ myMaximumRange

double GNEAttributeCarrier::AttributeProperties::myMaximumRange
private

maxium Range

Definition at line 270 of file GNEAttributeCarrier.h.

◆ myMinimumRange

double GNEAttributeCarrier::AttributeProperties::myMinimumRange
private

minimun Range

Definition at line 267 of file GNEAttributeCarrier.h.

◆ myTagPropertyParent

TagProperties* GNEAttributeCarrier::AttributeProperties::myTagPropertyParent
private

pointer to tagProperty parent

Definition at line 246 of file GNEAttributeCarrier.h.


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