SUMO - Simulation of Urban MObility
GNEChange_Attribute Class Reference

the function-object for an editing operation (abstract base) More...

#include <GNEChange_Attribute.h>

Inheritance diagram for GNEChange_Attribute:
Inheritance graph
Collaboration diagram for GNEChange_Attribute:
Collaboration graph

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...
 
GNENetmyNet
 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

GNEAttributeCarriermyAC
 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...
 

Detailed Description

the function-object for an editing operation (abstract base)

Definition at line 49 of file GNEChange_Attribute.h.

Constructor & Destructor Documentation

GNEChange_Attribute::GNEChange_Attribute ( GNEAttributeCarrier ac,
const SumoXMLAttr  key,
const std::string &  value,
bool  customOrigValue = false,
const std::string &  origValue = "" 
)

Constructor.

Parameters
[in]acThe attribute-carrier to be modified
[in]keyThe attribute key
[in]valueThe new value
[in]netOptionally the net on which to apply changes

Definition at line 48 of file GNEChange_Attribute.cpp.

References toString().

GNEChange_Attribute::~GNEChange_Attribute ( )

Member Function Documentation

void GNEChange_Attribute::redo ( )
virtual

Reimplemented from GNEChange.

Definition at line 76 of file GNEChange_Attribute.cpp.

References myAC, myKey, myNewValue, and GNEAttributeCarrier::setAttribute().

FXString GNEChange_Attribute::redoName ( ) const
virtual

Reimplemented from GNEChange.

Definition at line 86 of file GNEChange_Attribute.cpp.

References GNEAttributeCarrier::getDescription(), and myAC.

virtual FXuint GNEChange::size ( ) const
inlinevirtualinherited

Definition at line 62 of file GNEChange.h.

bool GNEChange_Attribute::trueChange ( )
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().

void GNEChange_Attribute::undo ( )
virtual

Reimplemented from GNEChange.

Definition at line 71 of file GNEChange_Attribute.cpp.

References myAC, myKey, myOrigValue, and GNEAttributeCarrier::setAttribute().

FXString GNEChange_Attribute::undoName ( ) const
virtual

Reimplemented from GNEChange.

Definition at line 81 of file GNEChange_Attribute.cpp.

References GNEAttributeCarrier::getDescription(), and myAC.

Field Documentation

GNEAttributeCarrier* GNEChange_Attribute::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().

SumoXMLAttr GNEChange_Attribute::myKey
private

The attribute name.

Definition at line 87 of file GNEChange_Attribute.h.

Referenced by redo(), undo(), and ~GNEChange_Attribute().

GNENet* GNEChange::myNet
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().

std::string GNEChange_Attribute::myNewValue
private

the original value

Definition at line 93 of file GNEChange_Attribute.h.

Referenced by redo(), and trueChange().

std::string GNEChange_Attribute::myOrigValue
private

the original value

Definition at line 90 of file GNEChange_Attribute.h.

Referenced by trueChange(), and undo().


The documentation for this class was generated from the following files: