41 myOrigValue(ac->getAttribute(key)),
43 myAC->incRef(
"GNEChange_Attribute " +
toString(myKey));
52 myOrigValue(origValue),
158 return (
"Undo change " +
myAC->
getTagStr() +
" attribute").c_str();
164 return (
"Redo change " +
myAC->
getTagStr() +
" attribute").c_str();
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ GNE_ATTR_SELECTED
element is selected
@ GNE_ATTR_DATASET
data set of a generic data
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
virtual const std::string & getID() const =0
return ID of object
const std::string & getTagStr() const
get tag assigned to this object in string format
const GNETagProperties & getTagProperty() const
get Tag Property assigned to this object
GNENet * getNet() const
get pointer to net
virtual void updateGeometry()=0
update pre-computed geometry information
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
virtual std::string getAttribute(SumoXMLAttr key) const =0
bool requireUpdateGeometry() const
return true if atribute requires a update geometry in setAttribute(...)
the function-object for an editing operation (abstract base)
void forceChange()
force change
const SumoXMLAttr myKey
The attribute name (or the original attribute if we're editing a disjoint attribute)
bool myForceChange
flag used to force set attributes
bool trueChange()
wether original and new value differ
const std::string myNewValue
the new value
GNEChange_Attribute(GNEAttributeCarrier *ac, const SumoXMLAttr key, const std::string &value)
constructor
FXString redoName() const
get Redo name
FXString undoName() const
return undoName
GNEAttributeCarrier * myAC
the net to which all operations shall be applied
~GNEChange_Attribute()
Destructor.
const std::string myOrigValue
the original value
the function-object for an editing operation (abstract base)
void updateAttributeColors()
update attribute colors deprecated
void requireSaveNet(bool value)
inform that net has to be saved
GNEDataSet * retrieveDataSet(const std::string &id, bool hardFail=true) const
Returns the named data set.
void requireSaveAdditionals(bool value)
inform that additionals has to be saved
void requireSaveDemandElements(bool value)
inform that demand elements has to be saved
void requireSaveDataElements(bool value)
inform that data sets has to be saved
void decRef(const std::string &debugMsg="")
Decrease reference.
void incRef(const std::string &debugMsg="")
Increarse reference.
bool unreferenced()
check if object ins't referenced
bool isShape() const
return true if tag correspond to a shape
bool isTAZElement() const
return true if tag correspond to a TAZ element
bool isGenericData() const
return true if tag correspond to a generic data element
const GNEAttributeProperties & getAttributeProperties(SumoXMLAttr attr) const
get attribute (throw error if doesn't exist)
bool isNetworkElement() const
return true if tag correspond to a network element
bool isDataElement() const
return true if tag correspond to a data element
bool isDemandElement() const
return true if tag correspond to a demand element
bool isAdditionalElement() const
return true if tag correspond to an additional element
bool hasAttribute(SumoXMLAttr attr) const
check if current TagProperties owns the attribute "attr"