42 bool customOrigValue, const std::
string& origValue) :
46 myOrigValue(customOrigValue ? origValue : netElement->getAttribute(key)),
48 myNet(netElement->getNet()),
49 myNetElement(netElement),
50 myAdditional(
nullptr),
52 assert(myAC && (myNetElement || myAdditional || myShape));
53 myAC->incRef(
"GNEChange_Attribute " +
toString(myKey));
59 bool customOrigValue,
const std::string& origValue) :
63 myOrigValue(customOrigValue ? origValue : additional->getAttribute(key)),
65 myNet(additional->getViewNet()->getNet()),
66 myNetElement(nullptr),
67 myAdditional(additional),
76 bool customOrigValue,
const std::string& origValue) :
80 myOrigValue(customOrigValue ? origValue : shape->getAttribute(key)),
82 myNet(shape->getNet()),
158 return (
"Undo change " +
myAC->
getTagStr() +
" attribute").c_str();
164 return (
"Redo change " +
myAC->
getTagStr() +
" attribute").c_str();
the function-object for an editing operation (abstract base)
SumoXMLAttr myKey
The attribute name.
GNEChange_Attribute(GNENetElement *netElement, const SumoXMLAttr key, const std::string &value, bool customOrigValue=false, const std::string &origValue="")
Constructor for NetElements.
GNENet * myNet
pointer to Net (used to simplify code)
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
begin/end of the description of a Point of interest
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
the function-object for an editing operation (abstract base)
bool trueChange()
wether original and new value differ
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
std::string myNewValue
the original value
~GNEChange_Attribute()
Destructor.
virtual bool removePolygon(const std::string &id)
Removes a polygon from the container.
FXString undoName() const
return undoName
virtual bool removePOI(const std::string &id)
Removes a PoI from the container.
void requiereSaveAdditionals(bool value)
inform that additionals has to be saved
GNEAdditional * myAdditional
used if AC is an additional element
const std::string getID() const
function to support debugging
void incRef(const std::string &debugMsg="")
Increarse reference.
void decRef(const std::string &debugMsg="")
Decrease reference.
GNENetElement * myNetElement
used if AC is an net element
An Element which don't belongs to GNENet but has influency in the simulation.
FXString redoName() const
get Redo name
GNEAttributeCarrier * myAC
the net to which all operations shall be applied
const std::string & getTagStr() const
get tag assigned to this object in string format
void requiereSaveNet(bool value)
inform that net has to be saved
GNEShape * myShape
used if AC is a shape element
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
std::string myOrigValue
the original value
begin/end of the description of a Point of interest over Lane (used by Netedit)
bool unreferenced()
check if object ins't referenced
void requiereSaveShapes(bool value)
inform that shapes has to be saved
begin/end of the description of a polygon