![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEAttributeProperties.h>
Public Types | |
enum class | Edit : int { CREATEMODE = 1 << 0 , EDITMODE = 1 << 1 , NETEDITEDITOR = 1 << 2 , EXTENDEDEDITOR = 1 << 3 , GEOEDITOR = 1 << 4 , FLOWEDITOR = 1 << 5 , NO_EDIT = 1 << 6 } |
enum class with all edit modes More... | |
enum class | Property : int { INT = 1 << 0 , FLOAT = 1 << 1 , SUMOTIME = 1 << 2 , BOOL = 1 << 3 , STRING = 1 << 4 , POSITION = 1 << 5 , COLOR = 1 << 6 , VTYPE = 1 << 7 , VCLASS = 1 << 8 , POSITIVE = 1 << 9 , UNIQUE = 1 << 10 , FILEOPEN = 1 << 11 , FILESAVE = 1 << 12 , DISCRETE = 1 << 13 , PROBABILITY = 1 << 14 , ANGLE = 1 << 15 , LIST = 1 << 16 , SECUENCIAL = 1 << 17 , DEFAULTVALUE = 1 << 18 , SYNONYM = 1 << 19 , RANGE = 1 << 20 , UPDATEGEOMETRY = 1 << 21 , ACTIVATABLE = 1 << 22 , FLOW = 1 << 23 , COPYABLE = 1 << 24 , ALWAYSENABLED = 1 << 25 , NO_PROPERTY = 1 << 26 } |
enum class with all attribute properties More... | |
Public Member Functions | |
void | checkAttributeIntegrity () const |
check Attribute integrity (For example, throw an exception if tag has a Float default value, but given default value cannot be parse to float) | |
SumoXMLAttr | getAttr () const |
get XML Attribute | |
const std::string & | getAttrStr () const |
get XML Attribute in string format (can be updated using alternative name) | |
SumoXMLAttr | getAttrSynonym () const |
get tag synonym | |
std::string | getCategory () const |
return category (based on Edit) | |
bool | getDefaultActivated () const |
get default active value | |
bool | getDefaultBoolValue () const |
get default bool value | |
const RGBColor & | getDefaultColorValue () const |
get default bool value | |
double | getDefaultDoubleValue () const |
get default double value | |
int | getDefaultIntValue () const |
get default int value | |
const Position & | getDefaultPositionValue () const |
get default position value | |
const std::string & | getDefaultStringValue () const |
get default value in string format | |
SUMOTime | getDefaultTimeValue () const |
get default time value | |
const std::string & | getDefinition () const |
get default value | |
std::string | getDescription () const |
return a description of attribute | |
const std::vector< std::string > & | getDiscreteValues () const |
get discrete values | |
const std::string & | getFilenameExtensions () const |
get filename extensions in string format used in open dialogs | |
double | getMaximumRange () const |
get maximum range | |
double | getMinimumRange () const |
get minimum range | |
int | getPositionListed () const |
get position in list (used in frames for listing attributes with certain sort) | |
const GNETagProperties * | getTagPropertyParent () const |
get reference to tagProperty parent | |
GNEAttributeProperties (GNETagProperties *tagProperties, const SumoXMLAttr attribute, const Property attributeProperty, const Edit editProperty, const std::string &definition) | |
parameter constructor for attribute properties without default values | |
GNEAttributeProperties (GNETagProperties *tagProperties, const SumoXMLAttr attribute, const Property attributeProperty, const Edit editProperty, const std::string &definition, const std::string &defaultValue) | |
parameter constructor for attribute properties with default values specific | |
GNEAttributeProperties (GNETagProperties *tagProperties, const SumoXMLAttr attribute, const Property attributeProperty, const Edit editProperty, const std::string &definition, const std::string &defaultValueMask, const std::string &defaultValue) | |
parameter constructor for attribute properties with default values generic | |
GNEAttributeProperties (GNETagProperties *tagProperties, const SumoXMLAttr attribute, const std::string &definition) | |
parameter constructor for special attribute properties (ej: no common) | |
bool | hasAttrRange () const |
return true if Attr correspond to an element that only accept a range of values | |
bool | hasAttrSynonym () const |
return true if Attr correspond to an element that will be written in XML with another name | |
bool | hasDefaultValue () const |
return true if attribute owns a default value | |
bool | isActivatable () const |
return true if attribute is activatable | |
bool | isAlwaysEnabled () const |
return true if attribute is always enabled | |
bool | isAngle () const |
return true if attribute is an angle | |
bool | isBool () const |
return true if attribute is boolean | |
bool | isColor () const |
return true if attribute is a color | |
bool | isCopyable () const |
return true if attribute is copyable | |
bool | isDiscrete () const |
return true if attribute is discrete | |
bool | isFileOpen () const |
return true if attribute is a filename open | |
bool | isFileSave () const |
return true if attribute is a filename save | |
bool | isFloat () const |
return true if attribute is a float | |
bool | isFlow () const |
return true if attribute is part of a flow definition | |
bool | isInt () const |
return true if attribute is an integer | |
bool | isList () const |
return true if attribute is a list | |
bool | isNumerical () const |
return true if attribute is numerical (int or float) | |
bool | isPosition () const |
return true if attribute is a position | |
bool | isPositive () const |
return true if attribute is positive | |
bool | isProbability () const |
return true if attribute is a probability | |
bool | isSecuential () const |
return true if attribute is sequential | |
bool | isString () const |
return true if attribute is a string | |
bool | isSUMOTime () const |
return true if attribute is a SUMOTime | |
bool | isSVCPermission () const |
return true if attribute is a VehicleClass | |
bool | isUnique () const |
return true if attribute is unique | |
bool | isVClass () const |
return true if attribute is a VehicleClass | |
bool | isVType () const |
return true if attribute is a VType or vTypeDistribution | |
bool | requireUpdateGeometry () const |
return true if attribute requires a update geometry in setAttribute(...) | |
void | setAlternativeName (const std::string &alternativeName) |
set alternative name | |
void | setDefaultActivated (const bool value) |
set default activated value | |
void | setDiscreteValues (const std::vector< std::string > &discreteValues) |
set discrete values | |
void | setFilenameExtensions (const std::string &extensions) |
set discrete values | |
void | setRange (const double minimum, const double maximum) |
set range | |
void | setSynonym (const SumoXMLAttr synonym) |
set synonim | |
void | setTagPropertyParent (GNETagProperties *tagPropertyParent) |
set tag property parent | |
~GNEAttributeProperties () | |
destructor | |
edit modes | |
bool | isBasicEditor () const |
return true if this attribute can be edited in basic editor | |
bool | isExtendedEditor () const |
return true if this attribute cannot be edited in editor | |
bool | isGeoEditor () const |
return true if this attribute can be edited only in GEO editor | |
bool | isFlowEditor () const |
return true if this attribute can be edited only in flow editor | |
bool | isNeteditEditor () const |
return true if this attribute can be edited only in netedit editor | |
bool | isCreateMode () const |
return true if attribute can be modified in create mode | |
bool | isEditMode () const |
return true if attribute can be modified in edit mode | |
Private Member Functions | |
void | checkBuildConstraints () const |
check build constraints | |
GNEAttributeProperties ()=delete | |
invalidate default constructor | |
GNEAttributeProperties (const GNEAttributeProperties &)=delete | |
Invalidated copy constructor. | |
GNEAttributeProperties & | operator= (const GNEAttributeProperties &src)=delete |
Invalidated assignment operator. | |
void | parseDefaultValues (const std::string &defaultValue, const bool overWritteDefaultString) |
parse default values | |
Private Attributes | |
SumoXMLAttr | myAttribute = SUMO_ATTR_NOTHING |
XML Attribute. | |
Property | myAttributeProperty = Property::NO_PROPERTY |
attribute properties | |
std::string | myAttrStr |
string with the Attribute in text format (to avoid unnecesaries toStrings(...) calls) | |
SumoXMLAttr | myAttrSynonym = SUMO_ATTR_NOTHING |
Attribute written in XML (If is SUMO_ATTR_NOTHING), original Attribute will be written) | |
bool | myDefaultActivated = false |
default activated (by default false) | |
bool | myDefaultBoolValue = false |
default bool value | |
RGBColor | myDefaultColorValue = RGBColor::INVISIBLE |
get default bool value | |
double | myDefaultDoubleValue = 0 |
default double value | |
int | myDefaultIntValue = 0 |
default int value | |
Position | myDefaultPositionValue = Position::INVALID |
get default position value | |
std::string | myDefaultStringValue |
default string value | |
SUMOTime | myDefaultTimeValue = 0 |
default time value | |
std::string | myDefinition |
text with a definition of attribute | |
std::vector< std::string > | myDiscreteValues |
discrete values that can take this Attribute (by default empty) | |
Edit | myEditProperty = Edit::NO_EDIT |
edit properties | |
std::string | myFilenameExtensions |
filename extensions used in open dialogs (by default empty) | |
double | myMaximumRange = 0 |
maxium Range | |
double | myMinimumRange = 0 |
minimun Range | |
const GNETagProperties * | myTagPropertyParent |
pointer to tagProperty parent | |
Definition at line 36 of file GNEAttributeProperties.h.
|
strong |
enum class with all edit modes
Enumerator | |
---|---|
CREATEMODE | |
EDITMODE | |
NETEDITEDITOR | |
EXTENDEDEDITOR | |
GEOEDITOR | |
FLOWEDITOR | |
NO_EDIT |
Definition at line 72 of file GNEAttributeProperties.h.
|
strong |
enum class with all attribute properties
Definition at line 41 of file GNEAttributeProperties.h.
GNEAttributeProperties::GNEAttributeProperties | ( | GNETagProperties * | tagProperties, |
const SumoXMLAttr | attribute, | ||
const Property | attributeProperty, | ||
const Edit | editProperty, | ||
const std::string & | definition | ||
) |
parameter constructor for attribute properties without default values
Definition at line 30 of file GNEAttributeProperties.cpp.
References checkBuildConstraints(), and GNETagProperties::myAttributeProperties.
GNEAttributeProperties::GNEAttributeProperties | ( | GNETagProperties * | tagProperties, |
const SumoXMLAttr | attribute, | ||
const Property | attributeProperty, | ||
const Edit | editProperty, | ||
const std::string & | definition, | ||
const std::string & | defaultValue | ||
) |
parameter constructor for attribute properties with default values specific
Definition at line 45 of file GNEAttributeProperties.cpp.
References checkBuildConstraints(), GNETagProperties::myAttributeProperties, and parseDefaultValues().
GNEAttributeProperties::GNEAttributeProperties | ( | GNETagProperties * | tagProperties, |
const SumoXMLAttr | attribute, | ||
const Property | attributeProperty, | ||
const Edit | editProperty, | ||
const std::string & | definition, | ||
const std::string & | defaultValueMask, | ||
const std::string & | defaultValue | ||
) |
parameter constructor for attribute properties with default values generic
Definition at line 63 of file GNEAttributeProperties.cpp.
References checkBuildConstraints(), GNETagProperties::myAttributeProperties, and parseDefaultValues().
GNEAttributeProperties::GNEAttributeProperties | ( | GNETagProperties * | tagProperties, |
const SumoXMLAttr | attribute, | ||
const std::string & | definition | ||
) |
parameter constructor for special attribute properties (ej: no common)
Definition at line 81 of file GNEAttributeProperties.cpp.
References checkBuildConstraints(), and GNETagProperties::myAttributeProperties.
GNEAttributeProperties::~GNEAttributeProperties | ( | ) |
destructor
Definition at line 93 of file GNEAttributeProperties.cpp.
|
privatedelete |
invalidate default constructor
|
privatedelete |
Invalidated copy constructor.
void GNEAttributeProperties::checkAttributeIntegrity | ( | ) | const |
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 97 of file GNEAttributeProperties.cpp.
References hasAttrRange(), hasAttrSynonym(), isCopyable(), isFileOpen(), isFileSave(), isList(), isNumerical(), isPositive(), isSecuential(), isUnique(), myAttributeProperty, myAttrSynonym, myFilenameExtensions, myMaximumRange, myMinimumRange, NO_PROPERTY, and SUMO_ATTR_NOTHING.
|
private |
check build constraints
Definition at line 628 of file GNEAttributeProperties.cpp.
References ACTIVATABLE, DEFAULTVALUE, FLOW, myAttribute, GNETagProperties::myAttributeProperties, myAttributeProperty, myDefaultStringValue, myDefinition, myTagPropertyParent, TLF, and toString().
Referenced by GNEAttributeProperties(), GNEAttributeProperties(), GNEAttributeProperties(), and GNEAttributeProperties().
SumoXMLAttr GNEAttributeProperties::getAttr | ( | ) | const |
get XML Attribute
Definition at line 210 of file GNEAttributeProperties.cpp.
References myAttribute.
Referenced by GNEAttributesEditorRow::fillSumoBaseObject(), GNEAttributesEditorRow::getAttributeValue(), GNEMatchAttribute::getMatches(), GNEAttributesEditorRow::isAttributeEnabled(), GNEAttributesEditorRow::onCmdOpenAllowDialog(), GNEAttributesEditorRow::onCmdSetAttribute(), GNEAttributesEditorRow::onCmdToggleEnableAttribute(), GNEAttributesEditorRow::showAttributeRow(), and GNEAttributesEditorRow::showValueComboBox().
const std::string & GNEAttributeProperties::getAttrStr | ( | ) | const |
get XML Attribute in string format (can be updated using alternative name)
Definition at line 216 of file GNEAttributeProperties.cpp.
References myAttrStr.
Referenced by MFXComboBoxAttrProperty::appendAttrItem(), GNEAttributesEditorRow::onCmdOpenFileDialog(), GNEAttributesEditorRow::showAttributeColor(), GNEAttributesEditorRow::showAttributeFile(), GNEAttributesEditorRow::showAttributeInspectParent(), GNEAttributesEditorRow::showAttributeLabel(), GNEAttributesEditorRow::showAttributeToggleEnable(), and GNEAttributesEditorRow::showAttributeVClass().
SumoXMLAttr GNEAttributeProperties::getAttrSynonym | ( | ) | const |
get tag synonym
Definition at line 389 of file GNEAttributeProperties.cpp.
References hasAttrSynonym(), and myAttrSynonym.
std::string GNEAttributeProperties::getCategory | ( | ) | const |
return category (based on Edit)
Definition at line 293 of file GNEAttributeProperties.cpp.
References isExtendedEditor(), isFlowEditor(), isGeoEditor(), isNeteditEditor(), and TL.
bool GNEAttributeProperties::getDefaultActivated | ( | ) | const |
get default active value
Definition at line 287 of file GNEAttributeProperties.cpp.
References myDefaultActivated.
bool GNEAttributeProperties::getDefaultBoolValue | ( | ) | const |
get default bool value
Definition at line 269 of file GNEAttributeProperties.cpp.
References myDefaultBoolValue.
const RGBColor & GNEAttributeProperties::getDefaultColorValue | ( | ) | const |
get default bool value
Definition at line 275 of file GNEAttributeProperties.cpp.
References myDefaultColorValue.
Referenced by GNEAttributesEditorRow::fillSumoBaseObject(), and GNEAttributesEditorRow::onCmdOpenColorDialog().
double GNEAttributeProperties::getDefaultDoubleValue | ( | ) | const |
get default double value
Definition at line 257 of file GNEAttributeProperties.cpp.
References myDefaultDoubleValue.
Referenced by GNEAttributesEditorRow::fillSumoBaseObject().
int GNEAttributeProperties::getDefaultIntValue | ( | ) | const |
get default int value
Definition at line 251 of file GNEAttributeProperties.cpp.
References myDefaultIntValue.
Referenced by GNEAttributesEditorRow::fillSumoBaseObject().
const Position & GNEAttributeProperties::getDefaultPositionValue | ( | ) | const |
get default position value
Definition at line 281 of file GNEAttributeProperties.cpp.
References myDefaultPositionValue.
Referenced by GNEAttributesEditorRow::fillSumoBaseObject().
const std::string & GNEAttributeProperties::getDefaultStringValue | ( | ) | const |
get default value in string format
Definition at line 245 of file GNEAttributeProperties.cpp.
References myDefaultStringValue.
Referenced by GNEAttributesEditorRow::fillSumoBaseObject(), and GNEAttributesEditorRow::onCmdSetAttribute().
SUMOTime GNEAttributeProperties::getDefaultTimeValue | ( | ) | const |
get default time value
Definition at line 263 of file GNEAttributeProperties.cpp.
References myDefaultTimeValue.
Referenced by GNEAttributesEditorRow::fillSumoBaseObject().
const std::string & GNEAttributeProperties::getDefinition | ( | ) | const |
get default value
Definition at line 239 of file GNEAttributeProperties.cpp.
References myDefinition.
std::string GNEAttributeProperties::getDescription | ( | ) | const |
return a description of attribute
Definition at line 309 of file GNEAttributeProperties.cpp.
References isAngle(), isBool(), isColor(), isDiscrete(), isFileOpen(), isFileSave(), isFloat(), isInt(), isList(), isPosition(), isPositive(), isProbability(), isString(), isSUMOTime(), isUnique(), isVClass(), and TL.
const std::vector< std::string > & GNEAttributeProperties::getDiscreteValues | ( | ) | const |
get discrete values
Definition at line 377 of file GNEAttributeProperties.cpp.
References myDiscreteValues.
Referenced by GNEAttributesEditorRow::showValueComboBox().
const std::string & GNEAttributeProperties::getFilenameExtensions | ( | ) | const |
get filename extensions in string format used in open dialogs
Definition at line 383 of file GNEAttributeProperties.cpp.
References myFilenameExtensions.
Referenced by GNEAttributesEditorRow::onCmdOpenFileDialog().
double GNEAttributeProperties::getMaximumRange | ( | ) | const |
get maximum range
Definition at line 409 of file GNEAttributeProperties.cpp.
References hasAttrRange(), and myMaximumRange.
double GNEAttributeProperties::getMinimumRange | ( | ) | const |
get minimum range
Definition at line 399 of file GNEAttributeProperties.cpp.
References hasAttrRange(), and myMinimumRange.
int GNEAttributeProperties::getPositionListed | ( | ) | const |
get position in list (used in frames for listing attributes with certain sort)
Definition at line 228 of file GNEAttributeProperties.cpp.
References GNETagProperties::getAttributeProperties(), myAttribute, and myTagPropertyParent.
const GNETagProperties * GNEAttributeProperties::getTagPropertyParent | ( | ) | const |
get reference to tagProperty parent
Definition at line 222 of file GNEAttributeProperties.cpp.
References myTagPropertyParent.
Referenced by GNEAttributesEditorRow::enableElements(), GNEAttributesEditorRow::getAttributeValue(), GNEAttributesEditorRow::onCmdOpenFileDialog(), GNEMatchAttribute::CurrentEditedProperties::setAttributeProperties(), GNEAttributesEditorRow::showAttributeInspectParent(), GNEAttributesEditorRow::showAttributeRow(), and GNEAttributesEditorRow::showValueComboBox().
bool GNEAttributeProperties::hasAttrRange | ( | ) | const |
return true if Attr correspond to an element that only accept a range of values
Definition at line 430 of file GNEAttributeProperties.cpp.
References myAttributeProperty, and RANGE.
Referenced by checkAttributeIntegrity(), getMaximumRange(), getMinimumRange(), and setRange().
bool GNEAttributeProperties::hasAttrSynonym | ( | ) | const |
return true if Attr correspond to an element that will be written in XML with another name
Definition at line 425 of file GNEAttributeProperties.cpp.
References myAttributeProperty, and SYNONYM.
Referenced by checkAttributeIntegrity(), getAttrSynonym(), and setSynonym().
bool GNEAttributeProperties::hasDefaultValue | ( | ) | const |
return true if attribute owns a default value
Definition at line 419 of file GNEAttributeProperties.cpp.
References DEFAULTVALUE, and myAttributeProperty.
Referenced by GNEAttributesEditorRow::fillSumoBaseObject(), GNEAttributesEditorRow::onCmdOpenColorDialog(), and GNEAttributesEditorRow::onCmdSetAttribute().
bool GNEAttributeProperties::isActivatable | ( | ) | const |
return true if attribute is activatable
Definition at line 562 of file GNEAttributeProperties.cpp.
References ACTIVATABLE, and myAttributeProperty.
Referenced by GNEAttributesEditorRow::fillSumoBaseObject(), setDefaultActivated(), and GNEAttributesEditorRow::showAttributeRow().
bool GNEAttributeProperties::isAlwaysEnabled | ( | ) | const |
return true if attribute is always enabled
Definition at line 580 of file GNEAttributeProperties.cpp.
References ALWAYSENABLED, and myAttributeProperty.
Referenced by GNEAttributesEditorRow::isAttributeEnabled().
bool GNEAttributeProperties::isAngle | ( | ) | const |
return true if attribute is an angle
Definition at line 478 of file GNEAttributeProperties.cpp.
References ANGLE, and myAttributeProperty.
Referenced by getDescription().
bool GNEAttributeProperties::isBasicEditor | ( | ) | const |
return true if this attribute can be edited in basic editor
Definition at line 586 of file GNEAttributeProperties.cpp.
References isExtendedEditor(), isFlowEditor(), isGeoEditor(), and isNeteditEditor().
bool GNEAttributeProperties::isBool | ( | ) | const |
return true if attribute is boolean
Definition at line 454 of file GNEAttributeProperties.cpp.
References BOOL, and myAttributeProperty.
Referenced by GNEAttributesEditorRow::fillSumoBaseObject(), getDescription(), parseDefaultValues(), and GNEAttributesEditorRow::showAttributeRow().
bool GNEAttributeProperties::isColor | ( | ) | const |
return true if attribute is a color
Definition at line 496 of file GNEAttributeProperties.cpp.
References COLOR, and myAttributeProperty.
Referenced by GNEAttributesEditorRow::fillSumoBaseObject(), getDescription(), and parseDefaultValues().
bool GNEAttributeProperties::isCopyable | ( | ) | const |
return true if attribute is copyable
Definition at line 574 of file GNEAttributeProperties.cpp.
References COPYABLE, and myAttributeProperty.
Referenced by checkAttributeIntegrity().
bool GNEAttributeProperties::isCreateMode | ( | ) | const |
return true if attribute can be modified in create mode
Definition at line 616 of file GNEAttributeProperties.cpp.
References CREATEMODE, and myEditProperty.
bool GNEAttributeProperties::isDiscrete | ( | ) | const |
return true if attribute is discrete
Definition at line 550 of file GNEAttributeProperties.cpp.
References DISCRETE, and myAttributeProperty.
Referenced by GNEAttributesEditorRow::fillSumoBaseObject(), getDescription(), setDiscreteValues(), and GNEAttributesEditorRow::showAttributeRow().
bool GNEAttributeProperties::isEditMode | ( | ) | const |
return true if attribute can be modified in edit mode
Definition at line 622 of file GNEAttributeProperties.cpp.
References EDITMODE, and myEditProperty.
bool GNEAttributeProperties::isExtendedEditor | ( | ) | const |
return true if this attribute cannot be edited in editor
Definition at line 592 of file GNEAttributeProperties.cpp.
References EXTENDEDEDITOR, and myEditProperty.
Referenced by getCategory(), and isBasicEditor().
bool GNEAttributeProperties::isFileOpen | ( | ) | const |
return true if attribute is a filename open
Definition at line 508 of file GNEAttributeProperties.cpp.
References FILEOPEN, and myAttributeProperty.
Referenced by checkAttributeIntegrity(), getDescription(), setFilenameExtensions(), GNEAttributesEditorRow::showAttributeFile(), and GNEAttributesEditorRow::showAttributeRow().
bool GNEAttributeProperties::isFileSave | ( | ) | const |
return true if attribute is a filename save
Definition at line 514 of file GNEAttributeProperties.cpp.
References FILESAVE, and myAttributeProperty.
Referenced by checkAttributeIntegrity(), getDescription(), GNEAttributesEditorRow::onCmdOpenFileDialog(), setFilenameExtensions(), and GNEAttributesEditorRow::showAttributeRow().
bool GNEAttributeProperties::isFloat | ( | ) | const |
return true if attribute is a float
Definition at line 442 of file GNEAttributeProperties.cpp.
References FLOAT, and myAttributeProperty.
Referenced by GNEAttributesEditorRow::fillSumoBaseObject(), getDescription(), isNumerical(), and parseDefaultValues().
bool GNEAttributeProperties::isFlow | ( | ) | const |
return true if attribute is part of a flow definition
Definition at line 568 of file GNEAttributeProperties.cpp.
References FLOW, and myAttributeProperty.
Referenced by GNEAttributesEditorRow::showAttributeRow().
bool GNEAttributeProperties::isFlowEditor | ( | ) | const |
return true if this attribute can be edited only in flow editor
Definition at line 604 of file GNEAttributeProperties.cpp.
References FLOWEDITOR, and myEditProperty.
Referenced by getCategory(), and isBasicEditor().
bool GNEAttributeProperties::isGeoEditor | ( | ) | const |
return true if this attribute can be edited only in GEO editor
Definition at line 598 of file GNEAttributeProperties.cpp.
References GEOEDITOR, and myEditProperty.
Referenced by getCategory(), and isBasicEditor().
bool GNEAttributeProperties::isInt | ( | ) | const |
return true if attribute is an integer
Definition at line 436 of file GNEAttributeProperties.cpp.
References INT, and myAttributeProperty.
Referenced by GNEAttributesEditorRow::fillSumoBaseObject(), getDescription(), isNumerical(), GNEAttributesEditorRow::onCmdSetAttribute(), and parseDefaultValues().
bool GNEAttributeProperties::isList | ( | ) | const |
return true if attribute is a list
Definition at line 532 of file GNEAttributeProperties.cpp.
References LIST, and myAttributeProperty.
Referenced by checkAttributeIntegrity(), GNEAttributesEditorRow::fillSumoBaseObject(), getDescription(), and isSVCPermission().
bool GNEAttributeProperties::isNeteditEditor | ( | ) | const |
return true if this attribute can be edited only in netedit editor
Definition at line 610 of file GNEAttributeProperties.cpp.
References myEditProperty, and NETEDITEDITOR.
Referenced by getCategory(), and isBasicEditor().
bool GNEAttributeProperties::isNumerical | ( | ) | const |
return true if attribute is numerical (int or float)
Definition at line 484 of file GNEAttributeProperties.cpp.
References isFloat(), isInt(), and isSUMOTime().
Referenced by checkAttributeIntegrity(), GNEMatchAttribute::getMatches(), and GNEMatchAttribute::onCmdProcessString().
bool GNEAttributeProperties::isPosition | ( | ) | const |
return true if attribute is a position
Definition at line 466 of file GNEAttributeProperties.cpp.
References myAttributeProperty, and POSITION.
Referenced by GNEAttributesEditorRow::fillSumoBaseObject(), getDescription(), and parseDefaultValues().
bool GNEAttributeProperties::isPositive | ( | ) | const |
return true if attribute is positive
Definition at line 490 of file GNEAttributeProperties.cpp.
References myAttributeProperty, and POSITIVE.
Referenced by checkAttributeIntegrity(), GNEAttributesEditorRow::fillSumoBaseObject(), and getDescription().
bool GNEAttributeProperties::isProbability | ( | ) | const |
return true if attribute is a probability
Definition at line 472 of file GNEAttributeProperties.cpp.
References myAttributeProperty, and PROBABILITY.
Referenced by GNEAttributesEditorRow::fillSumoBaseObject(), and getDescription().
bool GNEAttributeProperties::isSecuential | ( | ) | const |
return true if attribute is sequential
Definition at line 538 of file GNEAttributeProperties.cpp.
References myAttributeProperty, and SECUENCIAL.
Referenced by checkAttributeIntegrity().
bool GNEAttributeProperties::isString | ( | ) | const |
return true if attribute is a string
Definition at line 460 of file GNEAttributeProperties.cpp.
References myAttributeProperty, and STRING.
Referenced by getDescription().
bool GNEAttributeProperties::isSUMOTime | ( | ) | const |
return true if attribute is a SUMOTime
Definition at line 448 of file GNEAttributeProperties.cpp.
References myAttributeProperty, and SUMOTIME.
Referenced by GNEAttributesEditorRow::fillSumoBaseObject(), getDescription(), isNumerical(), and parseDefaultValues().
bool GNEAttributeProperties::isSVCPermission | ( | ) | const |
return true if attribute is a VehicleClass
Definition at line 526 of file GNEAttributeProperties.cpp.
References isList(), and isVClass().
bool GNEAttributeProperties::isUnique | ( | ) | const |
return true if attribute is unique
Definition at line 544 of file GNEAttributeProperties.cpp.
References myAttributeProperty, and UNIQUE.
Referenced by checkAttributeIntegrity(), getDescription(), and GNEAttributesEditorRow::showAttributeRow().
bool GNEAttributeProperties::isVClass | ( | ) | const |
return true if attribute is a VehicleClass
Definition at line 520 of file GNEAttributeProperties.cpp.
References myAttributeProperty, and VCLASS.
Referenced by getDescription(), isSVCPermission(), GNEAttributesEditorRow::onCmdSetAttribute(), and GNEAttributesEditorRow::showAttributeRow().
bool GNEAttributeProperties::isVType | ( | ) | const |
return true if attribute is a VType or vTypeDistribution
Definition at line 502 of file GNEAttributeProperties.cpp.
References myAttributeProperty, and VTYPE.
Referenced by GNEAttributesEditorRow::showAttributeRow(), and GNEAttributesEditorRow::showValueComboBox().
|
privatedelete |
Invalidated assignment operator.
|
private |
parse default values
Definition at line 654 of file GNEAttributeProperties.cpp.
References GNEAttributeCarrier::False, isBool(), isColor(), isFloat(), isInt(), isPosition(), isSUMOTime(), myDefaultBoolValue, myDefaultColorValue, myDefaultDoubleValue, myDefaultIntValue, myDefaultPositionValue, myDefaultStringValue, myDefaultTimeValue, time2string(), toString(), and GNEAttributeCarrier::True.
Referenced by GNEAttributeProperties(), and GNEAttributeProperties().
bool GNEAttributeProperties::requireUpdateGeometry | ( | ) | const |
return true if attribute requires a update geometry in setAttribute(...)
Definition at line 556 of file GNEAttributeProperties.cpp.
References myAttributeProperty, and UPDATEGEOMETRY.
void GNEAttributeProperties::setAlternativeName | ( | const std::string & | alternativeName | ) |
set alternative name
Definition at line 204 of file GNEAttributeProperties.cpp.
References myAttrStr.
Referenced by GNETagPropertiesDatabase::fillCommonAttributes().
void GNEAttributeProperties::setDefaultActivated | ( | const bool | value | ) |
set default activated value
Definition at line 159 of file GNEAttributeProperties.cpp.
References isActivatable(), and myDefaultActivated.
void GNEAttributeProperties::setDiscreteValues | ( | const std::vector< std::string > & | discreteValues | ) |
set discrete values
Definition at line 139 of file GNEAttributeProperties.cpp.
References isDiscrete(), and myDiscreteValues.
void GNEAttributeProperties::setFilenameExtensions | ( | const std::string & | extensions | ) |
set discrete values
Definition at line 149 of file GNEAttributeProperties.cpp.
References isFileOpen(), isFileSave(), and myFilenameExtensions.
Referenced by GNETagPropertiesDatabase::fillCommonAttributes(), and GNETagPropertiesDatabase::fillImgFileAttribute().
void GNEAttributeProperties::setRange | ( | const double | minimum, |
const double | maximum | ||
) |
set range
Definition at line 179 of file GNEAttributeProperties.cpp.
References hasAttrRange(), myMaximumRange, and myMinimumRange.
void GNEAttributeProperties::setSynonym | ( | const SumoXMLAttr | synonym | ) |
set synonim
Definition at line 169 of file GNEAttributeProperties.cpp.
References hasAttrSynonym(), and myAttrSynonym.
void GNEAttributeProperties::setTagPropertyParent | ( | GNETagProperties * | tagPropertyParent | ) |
set tag property parent
Definition at line 198 of file GNEAttributeProperties.cpp.
References myTagPropertyParent.
|
private |
XML Attribute.
Definition at line 300 of file GNEAttributeProperties.h.
Referenced by checkBuildConstraints(), getAttr(), and getPositionListed().
|
private |
attribute properties
Definition at line 306 of file GNEAttributeProperties.h.
Referenced by checkAttributeIntegrity(), checkBuildConstraints(), hasAttrRange(), hasAttrSynonym(), hasDefaultValue(), isActivatable(), isAlwaysEnabled(), isAngle(), isBool(), isColor(), isCopyable(), isDiscrete(), isFileOpen(), isFileSave(), isFloat(), isFlow(), isInt(), isList(), isPosition(), isPositive(), isProbability(), isSecuential(), isString(), isSUMOTime(), isUnique(), isVClass(), isVType(), and requireUpdateGeometry().
|
private |
string with the Attribute in text format (to avoid unnecesaries toStrings(...) calls)
Definition at line 303 of file GNEAttributeProperties.h.
Referenced by getAttrStr(), and setAlternativeName().
|
private |
Attribute written in XML (If is SUMO_ATTR_NOTHING), original Attribute will be written)
Definition at line 345 of file GNEAttributeProperties.h.
Referenced by checkAttributeIntegrity(), getAttrSynonym(), and setSynonym().
|
private |
default activated (by default false)
Definition at line 336 of file GNEAttributeProperties.h.
Referenced by getDefaultActivated(), and setDefaultActivated().
|
private |
default bool value
Definition at line 327 of file GNEAttributeProperties.h.
Referenced by getDefaultBoolValue(), and parseDefaultValues().
|
private |
get default bool value
Definition at line 330 of file GNEAttributeProperties.h.
Referenced by getDefaultColorValue(), and parseDefaultValues().
|
private |
default double value
Definition at line 321 of file GNEAttributeProperties.h.
Referenced by getDefaultDoubleValue(), and parseDefaultValues().
|
private |
default int value
Definition at line 318 of file GNEAttributeProperties.h.
Referenced by getDefaultIntValue(), and parseDefaultValues().
|
private |
get default position value
Definition at line 333 of file GNEAttributeProperties.h.
Referenced by getDefaultPositionValue(), and parseDefaultValues().
|
private |
default string value
Definition at line 315 of file GNEAttributeProperties.h.
Referenced by checkBuildConstraints(), getDefaultStringValue(), and parseDefaultValues().
|
private |
default time value
Definition at line 324 of file GNEAttributeProperties.h.
Referenced by getDefaultTimeValue(), and parseDefaultValues().
|
private |
text with a definition of attribute
Definition at line 312 of file GNEAttributeProperties.h.
Referenced by checkBuildConstraints(), and getDefinition().
|
private |
discrete values that can take this Attribute (by default empty)
Definition at line 339 of file GNEAttributeProperties.h.
Referenced by getDiscreteValues(), and setDiscreteValues().
|
private |
edit properties
Definition at line 309 of file GNEAttributeProperties.h.
Referenced by isCreateMode(), isEditMode(), isExtendedEditor(), isFlowEditor(), isGeoEditor(), and isNeteditEditor().
|
private |
filename extensions used in open dialogs (by default empty)
Definition at line 342 of file GNEAttributeProperties.h.
Referenced by checkAttributeIntegrity(), getFilenameExtensions(), and setFilenameExtensions().
|
private |
maxium Range
Definition at line 351 of file GNEAttributeProperties.h.
Referenced by checkAttributeIntegrity(), getMaximumRange(), and setRange().
|
private |
minimun Range
Definition at line 348 of file GNEAttributeProperties.h.
Referenced by checkAttributeIntegrity(), getMinimumRange(), and setRange().
|
private |
pointer to tagProperty parent
Definition at line 297 of file GNEAttributeProperties.h.
Referenced by checkBuildConstraints(), getPositionListed(), getTagPropertyParent(), and setTagPropertyParent().