![]() |
SUMO - Simulation of Urban MObility
|
the function-object for an editing operation (abstract base) More...
#include <GNEChange_Attribute.h>
Public Member Functions | |
GNEChange_Attribute (GNEAttributeCarrier *ac, const SumoXMLAttr key, const std::string &value, bool customOrigValue=false, const std::string &origValue="") | |
Constructor. More... | |
void | redo () |
FXString | redoName () const |
virtual FXuint | size () const |
bool | trueChange () |
wether original and new value differ More... | |
void | undo () |
FXString | undoName () const |
~GNEChange_Attribute () | |
Destructor. More... | |
Protected Attributes | |
bool | myForward |
we group antagonistic commands (create junction/delete junction) and keep them apart by this flag More... | |
GNENet * | myNet |
the net to which operations shall be applied or which shall be informed about gui updates (we are not responsible for the pointer) More... | |
Private Attributes | |
GNEAttributeCarrier * | myAC |
the net to which all operations shall be applied (we are not responsible for the pointer) More... | |
SumoXMLAttr | myKey |
The attribute name. More... | |
std::string | myNewValue |
the original value More... | |
std::string | myOrigValue |
the original value More... | |
the function-object for an editing operation (abstract base)
Definition at line 49 of file GNEChange_Attribute.h.
GNEChange_Attribute::GNEChange_Attribute | ( | GNEAttributeCarrier * | ac, |
const SumoXMLAttr | key, | ||
const std::string & | value, | ||
bool | customOrigValue = false , |
||
const std::string & | origValue = "" |
||
) |
Constructor.
[in] | ac | The attribute-carrier to be modified |
[in] | key | The attribute key |
[in] | value | The new value |
[in] | net | Optionally the net on which to apply changes |
Definition at line 48 of file GNEChange_Attribute.cpp.
References toString().
GNEChange_Attribute::~GNEChange_Attribute | ( | ) |
Destructor.
Definition at line 62 of file GNEChange_Attribute.cpp.
References GNEReferenceCounter::decRef(), myAC, myKey, toString(), and GNEReferenceCounter::unreferenced().
|
virtual |
Reimplemented from GNEChange.
Definition at line 76 of file GNEChange_Attribute.cpp.
References myAC, myKey, myNewValue, and GNEAttributeCarrier::setAttribute().
|
virtual |
Reimplemented from GNEChange.
Definition at line 86 of file GNEChange_Attribute.cpp.
References GNEAttributeCarrier::getDescription(), and myAC.
|
inlinevirtualinherited |
Definition at line 62 of file GNEChange.h.
|
inline |
wether original and new value differ
Definition at line 75 of file GNEChange_Attribute.h.
References myNewValue, and myOrigValue.
Referenced by GNEUndoList::p_add().
|
virtual |
Reimplemented from GNEChange.
Definition at line 71 of file GNEChange_Attribute.cpp.
References myAC, myKey, myOrigValue, and GNEAttributeCarrier::setAttribute().
|
virtual |
Reimplemented from GNEChange.
Definition at line 81 of file GNEChange_Attribute.cpp.
References GNEAttributeCarrier::getDescription(), and myAC.
|
private |
the net to which all operations shall be applied (we are not responsible for the pointer)
Definition at line 84 of file GNEChange_Attribute.h.
Referenced by redo(), redoName(), undo(), undoName(), and ~GNEChange_Attribute().
|
protectedinherited |
we group antagonistic commands (create junction/delete junction) and keep them apart by this flag
Definition at line 86 of file GNEChange.h.
Referenced by GNEChange_Selection::redo(), GNEChange_Edge::redo(), GNEChange_Junction::redo(), GNEChange_TLS::redo(), GNEChange_Lane::redo(), GNEChange_Connection::redo(), GNEChange_Selection::redoName(), GNEChange_Edge::redoName(), GNEChange_Junction::redoName(), GNEChange_TLS::redoName(), GNEChange_Lane::redoName(), GNEChange_Connection::redoName(), GNEChange_Selection::undo(), GNEChange_Edge::undo(), GNEChange_Junction::undo(), GNEChange_TLS::undo(), GNEChange_Lane::undo(), GNEChange_Connection::undo(), GNEChange_Selection::undoName(), GNEChange_Edge::undoName(), GNEChange_Junction::undoName(), GNEChange_TLS::undoName(), GNEChange_Lane::undoName(), and GNEChange_Connection::undoName().
|
private |
The attribute name.
Definition at line 87 of file GNEChange_Attribute.h.
Referenced by redo(), undo(), and ~GNEChange_Attribute().
|
protectedinherited |
the net to which operations shall be applied or which shall be informed about gui updates (we are not responsible for the pointer)
Definition at line 73 of file GNEChange.h.
Referenced by GNEChange_Edge::redo(), GNEChange_Junction::redo(), GNEChange::redo(), GNEChange_Junction::undo(), and GNEChange_Edge::undo().
|
private |
the original value
Definition at line 93 of file GNEChange_Attribute.h.
Referenced by redo(), and trueChange().
|
private |
the original value
Definition at line 90 of file GNEChange_Attribute.h.
Referenced by trueChange(), and undo().