![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEChange_Children.h>
Public Types | |
enum | Operation { MOVE_FRONT = 0, MOVE_BACK = 1 } |
Public Member Functions | |
GNEChange_Children (GNEDemandElement *demandElementParent, GNEDemandElement *demandElementChild, const Operation operation) | |
Constructor for creating/deleting an additional element. More... | |
virtual FXuint | size () const |
return actual size More... | |
~GNEChange_Children () | |
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... | |
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 | |
GNEDemandElement * | myChildDemandElement |
demand element which position will be edited edited More... | |
std::vector< GNEDemandElement * > | myEditedChildElements |
element childrens after apply operation More... | |
const Operation | myOperation |
const std::vector< GNEDemandElement * > | myOriginalChildElements |
copy of child demand elementss before apply operation More... | |
GNEDemandElement * | myParentDemandElement |
full information regarding the parent demand element element that will be modified More... | |
A network change in which a additional element is created or deleted
Definition at line 40 of file GNEChange_Children.h.
Enumerator | |
---|---|
MOVE_FRONT | |
MOVE_BACK |
Definition at line 45 of file GNEChange_Children.h.
GNEChange_Children::GNEChange_Children | ( | GNEDemandElement * | demandElementParent, |
GNEDemandElement * | demandElementChild, | ||
const Operation | operation | ||
) |
Constructor for creating/deleting an additional element.
[in] | additional | The additional element to be created/deleted |
[in] | forward | Whether to create/delete (true/false) |
Definition at line 37 of file GNEChange_Children.cpp.
GNEChange_Children::~GNEChange_Children | ( | ) |
Destructor.
Definition at line 64 of file GNEChange_Children.cpp.
References GNEReferenceCounter::decRef(), and myParentDemandElement.
|
virtual |
redo action
Reimplemented from GNEChange.
Definition at line 105 of file GNEChange_Children.cpp.
References GNEAttributeCarrier::getID(), GNEAttributeCarrier::getTagStr(), myChildDemandElement, GNEHierarchicalChildElements::myChildDemandElements, myEditedChildElements, GNEChange::myForward, GNEChange::myNet, myOperation, myOriginalChildElements, myParentDemandElement, GNENet::requireSaveDemandElements(), and WRITE_DEBUG.
|
virtual |
get Redo name
Reimplemented from GNEChange.
Definition at line 163 of file GNEChange_Children.cpp.
References GNEAttributeCarrier::getTagStr(), GNEChange::myForward, myOperation, and myParentDemandElement.
|
virtualinherited |
return actual size
Definition at line 44 of file GNEChange.cpp.
|
virtual |
undo action
Reimplemented from GNEChange.
Definition at line 71 of file GNEChange_Children.cpp.
References GNEAttributeCarrier::getID(), GNEAttributeCarrier::getTagStr(), myChildDemandElement, GNEHierarchicalChildElements::myChildDemandElements, myEditedChildElements, GNEChange::myForward, GNEChange::myNet, myOperation, myOriginalChildElements, myParentDemandElement, GNENet::requireSaveDemandElements(), and WRITE_DEBUG.
|
virtual |
return undoName
Reimplemented from GNEChange.
Definition at line 139 of file GNEChange_Children.cpp.
References GNEAttributeCarrier::getTagStr(), myChildDemandElement, GNEChange::myForward, and myOperation.
|
private |
demand element which position will be edited edited
Definition at line 81 of file GNEChange_Children.h.
Referenced by redo(), undo(), and undoName().
|
private |
element childrens after apply operation
Definition at line 90 of file GNEChange_Children.h.
|
protectedinherited |
we group antagonistic commands (create junction/delete junction) and keep them apart by this flag
Definition at line 80 of file GNEChange.h.
Referenced by GNEChange_Junction::redo(), GNEChange_Shape::redo(), GNEChange_Additional::redo(), GNEChange_TLS::redo(), GNEChange_DemandElement::redo(), redo(), GNEChange_Connection::redo(), GNEChange_Edge::redo(), GNEChange_Lane::redo(), GNEChange_Crossing::redo(), GNEChange_Shape::redoName(), GNEChange_Junction::redoName(), GNEChange_TLS::redoName(), GNEChange_Additional::redoName(), GNEChange_DemandElement::redoName(), redoName(), GNEChange_Connection::redoName(), GNEChange_Edge::redoName(), GNEChange_Lane::redoName(), GNEChange_Crossing::redoName(), GNEChange_Junction::undo(), GNEChange_Shape::undo(), GNEChange_TLS::undo(), GNEChange_Additional::undo(), GNEChange_DemandElement::undo(), undo(), GNEChange_Connection::undo(), GNEChange_Edge::undo(), GNEChange_Lane::undo(), GNEChange_Crossing::undo(), GNEChange_Junction::undoName(), GNEChange_Shape::undoName(), GNEChange_TLS::undoName(), GNEChange_Additional::undoName(), GNEChange_DemandElement::undoName(), undoName(), GNEChange_Connection::undoName(), GNEChange_Edge::undoName(), GNEChange_Lane::undoName(), and GNEChange_Crossing::undoName().
|
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 75 of file GNEChange.h.
Referenced by GNEChange_Crossing::GNEChange_Crossing(), GNEChange_Junction::redo(), GNEChange_Shape::redo(), GNEChange_Additional::redo(), GNEChange_TLS::redo(), GNEChange_DemandElement::redo(), GNEChange_EnableAttribute::redo(), redo(), GNEChange_Connection::redo(), GNEChange_Edge::redo(), GNEChange_Lane::redo(), GNEChange_Crossing::redo(), GNEChange_Attribute::redo(), GNEChange_Junction::undo(), GNEChange_Shape::undo(), GNEChange_Additional::undo(), GNEChange_TLS::undo(), GNEChange_DemandElement::undo(), undo(), GNEChange_EnableAttribute::undo(), GNEChange_Connection::undo(), GNEChange_Edge::undo(), GNEChange_Lane::undo(), GNEChange_Crossing::undo(), GNEChange_Attribute::undo(), GNEChange_Additional::~GNEChange_Additional(), GNEChange_Attribute::~GNEChange_Attribute(), GNEChange_Crossing::~GNEChange_Crossing(), GNEChange_DemandElement::~GNEChange_DemandElement(), GNEChange_EnableAttribute::~GNEChange_EnableAttribute(), and GNEChange_Shape::~GNEChange_Shape().
|
private |
Definition at line 84 of file GNEChange_Children.h.
Referenced by redo(), redoName(), undo(), and undoName().
|
private |
copy of child demand elementss before apply operation
Definition at line 87 of file GNEChange_Children.h.
|
private |
full information regarding the parent demand element element that will be modified
Definition at line 78 of file GNEChange_Children.h.
Referenced by redo(), redoName(), undo(), and ~GNEChange_Children().