![]() |
SUMO - Simulation of Urban MObility
|
#include <GNEChange_TLS.h>
Public Member Functions | |
GNEChange_TLS (GNEJunction *junction, NBTrafficLightDefinition *tlDef, bool forward, bool forceInsert=false, const std::string tlID="") | |
Constructor for creating/deleting an edge. More... | |
virtual FXuint | size () const |
return actual size More... | |
~GNEChange_TLS () | |
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 | |
bool | myForceInsert |
check if forceInsert is enabled More... | |
GNEJunction * | myJunction |
we need the junction because it is the target of our change commands More... | |
NBTrafficLightDefinition * | myTlDef |
the traffic light to be created/deleted. We assume no responsiblity for the pointer More... | |
A network change in which a traffic light is created or deleted
Definition at line 43 of file GNEChange_TLS.h.
GNEChange_TLS::GNEChange_TLS | ( | GNEJunction * | junction, |
NBTrafficLightDefinition * | tlDef, | ||
bool | forward, | ||
bool | forceInsert = false , |
||
const std::string | tlID = "" |
||
) |
Constructor for creating/deleting an edge.
constructor for creating an edge
[in] | junction | The junction to which the traffic light belong |
[in] | tlDef | The traffic light definition (may be 0 on creation) |
[in] | forward | Whether to create/delete (true/false) |
[in] | tlID | The id for the newly created tlDef (set to junction id if * "" is given) |
Definition at line 43 of file GNEChange_TLS.cpp.
GNEChange_TLS::~GNEChange_TLS | ( | ) |
Destructor.
Definition at line 59 of file GNEChange_TLS.cpp.
References GNEReferenceCounter::decRef(), GNEAttributeCarrier::getID(), GNEAttributeCarrier::getTagStr(), myJunction, GNEReferenceCounter::unreferenced(), and WRITE_DEBUG.
|
virtual |
redo action
Reimplemented from GNEChange.
Definition at line 89 of file GNEChange_TLS.cpp.
References GNEJunction::addTrafficLight(), GNEAttributeCarrier::getID(), GNEAttributeCarrier::getTagStr(), myForceInsert, GNEChange::myForward, myJunction, GNEChange::myNet, myTlDef, GNEJunction::removeTrafficLight(), GNENet::requiereSaveNet(), and WRITE_DEBUG.
|
virtual |
get Redo name
Reimplemented from GNEChange.
Definition at line 117 of file GNEChange_TLS.cpp.
References GNEChange::myForward, SUMO_TAG_TRAFFIC_LIGHT, and toString().
|
virtualinherited |
|
virtual |
undo action
Reimplemented from GNEChange.
Definition at line 71 of file GNEChange_TLS.cpp.
References GNEJunction::addTrafficLight(), GNEAttributeCarrier::getID(), GNEAttributeCarrier::getTagStr(), myForceInsert, GNEChange::myForward, myJunction, GNEChange::myNet, myTlDef, GNEJunction::removeTrafficLight(), GNENet::requiereSaveNet(), and WRITE_DEBUG.
|
virtual |
return undoName
Reimplemented from GNEChange.
Definition at line 107 of file GNEChange_TLS.cpp.
References GNEChange::myForward, SUMO_TAG_TRAFFIC_LIGHT, and toString().
|
private |
check if forceInsert is enabled
Definition at line 86 of file GNEChange_TLS.h.
|
protectedinherited |
we group antagonistic commands (create junction/delete junction) and keep them apart by this flag
Definition at line 81 of file GNEChange.h.
Referenced by GNEChange_Junction::redo(), GNEChange_Shape::redo(), redo(), GNEChange_Additional::redo(), GNEChange_Connection::redo(), GNEChange_Edge::redo(), GNEChange_Lane::redo(), GNEChange_Crossing::redo(), GNEChange_Junction::redoName(), GNEChange_Shape::redoName(), redoName(), GNEChange_Additional::redoName(), GNEChange_Connection::redoName(), GNEChange_Edge::redoName(), GNEChange_Lane::redoName(), GNEChange_Crossing::redoName(), GNEChange_Junction::undo(), GNEChange_Shape::undo(), GNEChange_Additional::undo(), undo(), GNEChange_Connection::undo(), GNEChange_Edge::undo(), GNEChange_Lane::undo(), GNEChange_Crossing::undo(), GNEChange_Junction::undoName(), GNEChange_Shape::undoName(), undoName(), GNEChange_Additional::undoName(), GNEChange_Connection::undoName(), GNEChange_Edge::undoName(), GNEChange_Lane::undoName(), and GNEChange_Crossing::undoName().
|
private |
we need the junction because it is the target of our change commands
Definition at line 78 of file GNEChange_TLS.h.
Referenced by redo(), undo(), and ~GNEChange_TLS().
|
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 76 of file GNEChange.h.
Referenced by GNEChange_Crossing::GNEChange_Crossing(), GNEChange_Shape::redo(), GNEChange_Junction::redo(), redo(), GNEChange_Additional::redo(), GNEChange_Connection::redo(), GNEChange_Edge::redo(), GNEChange_Lane::redo(), GNEChange_Crossing::redo(), GNEChange_Shape::undo(), GNEChange_Junction::undo(), undo(), GNEChange_Additional::undo(), GNEChange_Connection::undo(), GNEChange_Edge::undo(), GNEChange_Lane::undo(), GNEChange_Crossing::undo(), GNEChange_Additional::~GNEChange_Additional(), GNEChange_Crossing::~GNEChange_Crossing(), and GNEChange_Shape::~GNEChange_Shape().
|
private |
the traffic light to be created/deleted. We assume no responsiblity for the pointer
Definition at line 83 of file GNEChange_TLS.h.