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

struct with the attribute Properties More...

#include <GNEAttributeCarrier.h>

Collaboration diagram for GNEAttributeCarrier::AttributeValues:
Collaboration graph

Public Member Functions

 AttributeValues ()
 default constructor More...
 
 AttributeValues (int attributeProperty, int positionListed, const std::string &definition, const std::string &defaultValue, const std::vector< std::string > &discreteValues, SumoXMLAttr synonym)
 parameter constructor 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...
 
int getPositionListed () const
 get position in list (used in frames for listing attributes with certain sort) More...
 
bool hasAttrSynonym () const
 return true if Attr correspond to an element that will be written in XML with another name More...
 
bool hasDefaultValue () const
 return true if attribute owns a default value More...
 
bool isBool () const
 return true if atribute is boolean More...
 
bool isColor () const
 return true if atribute is a color More...
 
bool isCombinable () const
 return true if atribute is combinable with other Attribute More...
 
bool isDiscrete () const
 return true if atribute is discrete More...
 
bool isFilename () const
 return true if atribute is a filename More...
 
bool isFloat () const
 return true if atribute is a float More...
 
bool isInt () const
 return true if atribute is an integer More...
 
bool isList () const
 return true if atribute is a list More...
 
bool isNonEditable () const
 return true if atribute isn't editable More...
 
bool isntZero () const
 return true if atribute cannot be zero More...
 
bool isNumerical () const
 return true if atribute is numerical (int or float) More...
 
bool isOptional () const
 return true if atribute is optional More...
 
bool isPositive () const
 return true if atribute is positive More...
 
bool isProbability () const
 return true if atribute is a probability More...
 
bool isString () const
 return true if atribute is a string More...
 
bool isSVCPermission () const
 return true if atribute is a VehicleClass More...
 
bool isTime () const
 return true if atribute is time More...
 
bool isUnique () const
 return true if atribute is unique More...
 
bool isVClass () const
 return true if atribute is a VehicleClass More...
 

Private Attributes

int myAttributeProperty
 Property of attribute. 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...
 
int myPositionListed
 listed position More...
 

Detailed Description

struct with the attribute Properties

Definition at line 93 of file GNEAttributeCarrier.h.

Constructor & Destructor Documentation

◆ AttributeValues() [1/2]

GNEAttributeCarrier::AttributeValues::AttributeValues ( )

default constructor

Definition at line 324 of file GNEAttributeCarrier.cpp.

◆ AttributeValues() [2/2]

GNEAttributeCarrier::AttributeValues::AttributeValues ( int  attributeProperty,
int  positionListed,
const std::string &  definition,
const std::string &  defaultValue,
const std::vector< std::string > &  discreteValues,
SumoXMLAttr  synonym 
)

parameter constructor

Definition at line 332 of file GNEAttributeCarrier.cpp.

References isColor(), and myDefaultValue.

Member Function Documentation

◆ getAttrSynonym()

SumoXMLAttr GNEAttributeCarrier::AttributeValues::getAttrSynonym ( ) const

get tag synonym

Definition at line 444 of file GNEAttributeCarrier.cpp.

References hasAttrSynonym(), and myAttrSynonym.

◆ getDefaultValue()

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

get default value

Definition at line 359 of file GNEAttributeCarrier.cpp.

References myDefaultValue.

◆ getDefinition()

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

get default value

Definition at line 353 of file GNEAttributeCarrier.cpp.

References myDefinition.

◆ getDescription()

◆ getDiscreteValues()

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

get discrete values

Definition at line 438 of file GNEAttributeCarrier.cpp.

References myDiscreteValues.

◆ getPositionListed()

int GNEAttributeCarrier::AttributeValues::getPositionListed ( ) const

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

Definition at line 347 of file GNEAttributeCarrier.cpp.

References myPositionListed.

◆ hasAttrSynonym()

bool GNEAttributeCarrier::AttributeValues::hasAttrSynonym ( ) const

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

Definition at line 460 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_SYNONYM, and myAttributeProperty.

Referenced by getAttrSynonym().

◆ hasDefaultValue()

bool GNEAttributeCarrier::AttributeValues::hasDefaultValue ( ) const

return true if attribute owns a default value

Definition at line 454 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_DEFAULTVALUE, and myAttributeProperty.

◆ isBool()

bool GNEAttributeCarrier::AttributeValues::isBool ( ) const

return true if atribute is boolean

Definition at line 478 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_BOOL, and myAttributeProperty.

◆ isColor()

bool GNEAttributeCarrier::AttributeValues::isColor ( ) const

return true if atribute is a color

Definition at line 520 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_COLOR, and myAttributeProperty.

Referenced by AttributeValues().

◆ isCombinable()

bool GNEAttributeCarrier::AttributeValues::isCombinable ( ) const

return true if atribute is combinable with other Attribute

Definition at line 568 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_COMBINABLE, and myAttributeProperty.

◆ isDiscrete()

bool GNEAttributeCarrier::AttributeValues::isDiscrete ( ) const

return true if atribute is discrete

Definition at line 562 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_DISCRETE, and myAttributeProperty.

◆ isFilename()

bool GNEAttributeCarrier::AttributeValues::isFilename ( ) const

return true if atribute is a filename

Definition at line 526 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_FILENAME, and myAttributeProperty.

◆ isFloat()

bool GNEAttributeCarrier::AttributeValues::isFloat ( ) const

return true if atribute is a float

Definition at line 472 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_FLOAT, and myAttributeProperty.

◆ isInt()

bool GNEAttributeCarrier::AttributeValues::isInt ( ) const

return true if atribute is an integer

Definition at line 466 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_INT, and myAttributeProperty.

◆ isList()

bool GNEAttributeCarrier::AttributeValues::isList ( ) const

return true if atribute is a list

Definition at line 544 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_LIST, and myAttributeProperty.

◆ isNonEditable()

bool GNEAttributeCarrier::AttributeValues::isNonEditable ( ) const

return true if atribute isn't editable

Definition at line 574 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_NONEDITABLE, and myAttributeProperty.

◆ isntZero()

bool GNEAttributeCarrier::AttributeValues::isntZero ( ) const

return true if atribute cannot be zero

Definition at line 514 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_NOTZERO, and myAttributeProperty.

◆ isNumerical()

bool GNEAttributeCarrier::AttributeValues::isNumerical ( ) const

return true if atribute is numerical (int or float)

Definition at line 496 of file GNEAttributeCarrier.cpp.

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

◆ isOptional()

bool GNEAttributeCarrier::AttributeValues::isOptional ( ) const

return true if atribute is optional

Definition at line 556 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_OPTIONAL, and myAttributeProperty.

◆ isPositive()

bool GNEAttributeCarrier::AttributeValues::isPositive ( ) const

return true if atribute is positive

Definition at line 508 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_POSITIVE, and myAttributeProperty.

◆ isProbability()

bool GNEAttributeCarrier::AttributeValues::isProbability ( ) const

return true if atribute is a probability

Definition at line 490 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_PROBABILITY, and myAttributeProperty.

◆ isString()

bool GNEAttributeCarrier::AttributeValues::isString ( ) const

return true if atribute is a string

Definition at line 484 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_STRING, and myAttributeProperty.

◆ isSVCPermission()

bool GNEAttributeCarrier::AttributeValues::isSVCPermission ( ) const

return true if atribute is a VehicleClass

Definition at line 538 of file GNEAttributeCarrier.cpp.

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

◆ isTime()

bool GNEAttributeCarrier::AttributeValues::isTime ( ) const

return true if atribute is time

Definition at line 502 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_TIME, and myAttributeProperty.

◆ isUnique()

bool GNEAttributeCarrier::AttributeValues::isUnique ( ) const

return true if atribute is unique

Definition at line 550 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_UNIQUE, and myAttributeProperty.

◆ isVClass()

bool GNEAttributeCarrier::AttributeValues::isVClass ( ) const

return true if atribute is a VehicleClass

Definition at line 532 of file GNEAttributeCarrier.cpp.

References GNEAttributeCarrier::ATTRPROPERTY_VCLASS, and myAttributeProperty.

Field Documentation

◆ myAttributeProperty

◆ myAttrSynonym

SumoXMLAttr GNEAttributeCarrier::AttributeValues::myAttrSynonym
private

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

Definition at line 199 of file GNEAttributeCarrier.h.

Referenced by getAttrSynonym().

◆ myDefaultValue

std::string GNEAttributeCarrier::AttributeValues::myDefaultValue
private

default value (by default empty)

Definition at line 193 of file GNEAttributeCarrier.h.

Referenced by AttributeValues(), and getDefaultValue().

◆ myDefinition

std::string GNEAttributeCarrier::AttributeValues::myDefinition
private

text with a definition of attribute

Definition at line 190 of file GNEAttributeCarrier.h.

Referenced by getDefinition().

◆ myDiscreteValues

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

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

Definition at line 196 of file GNEAttributeCarrier.h.

Referenced by getDiscreteValues().

◆ myPositionListed

int GNEAttributeCarrier::AttributeValues::myPositionListed
private

listed position

Definition at line 187 of file GNEAttributeCarrier.h.

Referenced by getPositionListed().


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