![]() |
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 50 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 53 of file GNEChange_TLS.cpp.
GNEChange_TLS::~GNEChange_TLS | ( | ) |
Destructor.
Definition at line 69 of file GNEChange_TLS.cpp.
References GNEReferenceCounter::decRef(), GNEAttributeCarrier::getID(), GNEAttributeCarrier::getTag(), GNENet::getViewNet(), GNEViewNet::isTestingModeEnabled(), myJunction, GNEChange::myNet, toString(), GNEReferenceCounter::unreferenced(), and WRITE_WARNING.
|
virtual |
redo action
Reimplemented from GNEChange.
Definition at line 103 of file GNEChange_TLS.cpp.
References GNEJunction::addTrafficLight(), GNEAttributeCarrier::getID(), GNENetElement::getNet(), GNEAttributeCarrier::getTag(), GNENet::getViewNet(), GNEViewNet::isTestingModeEnabled(), myForceInsert, GNEChange::myForward, myJunction, myTlDef, GNEJunction::removeTrafficLight(), toString(), and WRITE_WARNING.
|
virtual |
get Redo name
Reimplemented from GNEChange.
Definition at line 133 of file GNEChange_TLS.cpp.
References GNEChange::myForward, SUMO_TAG_TRAFFIC_LIGHT, and toString().
|
virtualinherited |
return actual size
Definition at line 53 of file GNEChange.cpp.
|
virtual |
undo action
Reimplemented from GNEChange.
Definition at line 83 of file GNEChange_TLS.cpp.
References GNEJunction::addTrafficLight(), GNEAttributeCarrier::getID(), GNENetElement::getNet(), GNEAttributeCarrier::getTag(), GNENet::getViewNet(), GNEViewNet::isTestingModeEnabled(), myForceInsert, GNEChange::myForward, myJunction, myTlDef, GNEJunction::removeTrafficLight(), toString(), and WRITE_WARNING.
|
virtual |
return undoName
Reimplemented from GNEChange.
Definition at line 123 of file GNEChange_TLS.cpp.
References GNEChange::myForward, SUMO_TAG_TRAFFIC_LIGHT, and toString().
|
private |
check if forceInsert is enabled
Definition at line 93 of file GNEChange_TLS.h.
|
protectedinherited |
we group antagonistic commands (create junction/delete junction) and keep them apart by this flag
Definition at line 87 of file GNEChange.h.
Referenced by GNEChange_Junction::redo(), GNEChange_Selection::redo(), redo(), GNEChange_Connection::redo(), GNEChange_Lane::redo(), GNEChange_Additional::redo(), GNEChange_Edge::redo(), GNEChange_Crossing::redo(), GNEChange_Junction::redoName(), GNEChange_Selection::redoName(), redoName(), GNEChange_Connection::redoName(), GNEChange_Lane::redoName(), GNEChange_Additional::redoName(), GNEChange_Edge::redoName(), GNEChange_Crossing::redoName(), GNEChange_Junction::undo(), GNEChange_Selection::undo(), undo(), GNEChange_Connection::undo(), GNEChange_Lane::undo(), GNEChange_Additional::undo(), GNEChange_Edge::undo(), GNEChange_Crossing::undo(), GNEChange_Junction::undoName(), GNEChange_Selection::undoName(), undoName(), GNEChange_Connection::undoName(), GNEChange_Lane::undoName(), GNEChange_Additional::undoName(), GNEChange_Edge::undoName(), and GNEChange_Crossing::undoName().
|
private |
we need the junction because it is the target of our change commands
Definition at line 85 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 82 of file GNEChange.h.
Referenced by GNEChange_Junction::redo(), GNEChange_Selection::redo(), GNEChange_Lane::redo(), GNEChange_Additional::redo(), GNEChange_Edge::redo(), GNEChange_Crossing::redo(), GNEChange_Junction::undo(), GNEChange_Selection::undo(), GNEChange_Lane::undo(), GNEChange_Additional::undo(), GNEChange_Edge::undo(), GNEChange_Crossing::undo(), GNEChange_Additional::~GNEChange_Additional(), GNEChange_Lane::~GNEChange_Lane(), and ~GNEChange_TLS().
|
private |
the traffic light to be created/deleted. We assume no responsiblity for the pointer
Definition at line 90 of file GNEChange_TLS.h.