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...
 
virtual FXuint size () const
 return actual size More...
 
bool trueChange ()
 wether original and new value differ More...
 
 ~GNEChange_Attribute ()
 Destructor. More...
 
inherited from GNEChange

get undo Name

FXString undoName () const
 return undoName More...
 
FXString redoName () const
 get Redo name More...
 
void undo ()
 undo action More...
 
void redo ()
 redo action 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 More...
 
GNEAdditionalmyAdditional
 used if Ac is an additional element More...
 
SumoXMLAttr myKey
 The attribute name. More...
 
std::string myNewValue
 the original value More...
 
std::string myOrigValue
 the original value More...
 
GNEShapemyShape
 used if Ac is a shape element More...
 

Detailed Description

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

Definition at line 51 of file GNEChange_Attribute.h.

Constructor & Destructor Documentation

◆ GNEChange_Attribute()

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]testingModeflag to indicate if netedit is running in testing mode

Definition at line 49 of file GNEChange_Attribute.cpp.

References toString().

◆ ~GNEChange_Attribute()

Member Function Documentation

◆ redo()

◆ redoName()

FXString GNEChange_Attribute::redoName ( ) const
virtual

get Redo name

Reimplemented from GNEChange.

Definition at line 136 of file GNEChange_Attribute.cpp.

References GNEAttributeCarrier::getTag(), myAC, and toString().

◆ size()

FXuint GNEChange::size ( ) const
virtualinherited

return actual size

Definition at line 52 of file GNEChange.cpp.

◆ trueChange()

bool GNEChange_Attribute::trueChange ( )

wether original and new value differ

Definition at line 124 of file GNEChange_Attribute.cpp.

References myNewValue, and myOrigValue.

Referenced by GNEUndoList::p_add().

◆ undo()

◆ undoName()

FXString GNEChange_Attribute::undoName ( ) const
virtual

return undoName

Reimplemented from GNEChange.

Definition at line 130 of file GNEChange_Attribute.cpp.

References GNEAttributeCarrier::getTag(), myAC, and toString().

Field Documentation

◆ myAC

GNEAttributeCarrier* GNEChange_Attribute::myAC
private

the net to which all operations shall be applied

Note
we are not responsible for the pointer

Definition at line 93 of file GNEChange_Attribute.h.

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

◆ myAdditional

GNEAdditional* GNEChange_Attribute::myAdditional
private

used if Ac is an additional element

Definition at line 105 of file GNEChange_Attribute.h.

Referenced by redo(), and undo().

◆ myForward

◆ myKey

SumoXMLAttr GNEChange_Attribute::myKey
private

The attribute name.

Definition at line 96 of file GNEChange_Attribute.h.

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

◆ myNet

◆ myNewValue

std::string GNEChange_Attribute::myNewValue
private

the original value

Definition at line 102 of file GNEChange_Attribute.h.

Referenced by redo(), and trueChange().

◆ myOrigValue

std::string GNEChange_Attribute::myOrigValue
private

the original value

Definition at line 99 of file GNEChange_Attribute.h.

Referenced by trueChange(), and undo().

◆ myShape

GNEShape* GNEChange_Attribute::myShape
private

used if Ac is a shape element

Definition at line 108 of file GNEChange_Attribute.h.

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


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