36 GNEChange(ac->getTagProperty().getSupermode(), true, false),
39 myOrigValue(ac->isAttributeEnabled(key)),
41 myPreviousParameters(-1) {
42 myAC->incRef(
"GNEChange_EnableAttribute " + myAC->getTagProperty().getTagStr());
47 GNEChange(ac->getTagProperty().getSupermode(), true, false),
50 myOrigValue(ac->isAttributeEnabled(key)),
52 myPreviousParameters(previousParameters) {
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
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
virtual void toogleAttribute(SumoXMLAttr key, const bool value, const int previousParameters)=0
method for enable or disable the attribute and nothing else (used in GNEChange_EnableAttribute)
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
GNENet * getNet() const
get pointer to net
the function-object for an editing operation (abstract base)
GNEAttributeCarrier * myAC
the net to which all operations shall be applied
~GNEChange_EnableAttribute()
Destructor.
std::string redoName() const
get Redo name
const bool myNewValue
the new value
const int myPreviousParameters
previous values (used by flows)
const SumoXMLAttr myKey
The attribute name.
GNEChange_EnableAttribute(GNEAttributeCarrier *ac, const SumoXMLAttr key, const bool value)
constructor
const bool myOrigValue
the original value
std::string undoName() const
return undoName
the function-object for an editing operation (abstract base)
void requireSaveNet(bool value)
inform that net has to be saved
void requireSaveAdditionals(bool value)
inform that additionals has to be saved
void requireSaveDemandElements(bool value)
inform that demand elements 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
const std::string & getTagStr() const
get Tag vinculated with this attribute Property in String Format (used to avoid multiple calls to toS...
bool isNetworkElement() const
return true if tag correspond to a network 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