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 |
NBTrafficLightDefinition * | myTlDef |
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.
[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.
References StringBijection< T >::get(), OptionsCont::getOptions(), and SUMOXMLDefinitions::TrafficLightTypes.
GNEChange_TLS::~GNEChange_TLS | ( | ) |
Destructor.
Definition at line 69 of file GNEChange_TLS.cpp.
References GNEReferenceCounter::decRef(), myJunction, and GNEReferenceCounter::unreferenced().
|
virtual |
redo action
Reimplemented from GNEChange.
Definition at line 87 of file GNEChange_TLS.cpp.
References GNEJunction::addTrafficLight(), myForceInsert, GNEChange::myForward, myJunction, myTlDef, and GNEJunction::removeTrafficLight().
|
virtual |
get Redo name
Reimplemented from GNEChange.
Definition at line 105 of file GNEChange_TLS.cpp.
References GNEChange::myForward.
|
virtualinherited |
return actual size
Definition at line 57 of file GNEChange.cpp.
|
virtual |
undo action
Reimplemented from GNEChange.
Definition at line 78 of file GNEChange_TLS.cpp.
References GNEJunction::addTrafficLight(), myForceInsert, GNEChange::myForward, myJunction, myTlDef, and GNEJunction::removeTrafficLight().
|
virtual |
return undoName
Reimplemented from GNEChange.
Definition at line 96 of file GNEChange_TLS.cpp.
References GNEChange::myForward.
|
private |
check if forceInsert is enabled
Definition at line 91 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_Selection::redo(), GNEChange_Additional::redo(), GNEChange_Junction::redo(), redo(), GNEChange_Connection::redo(), GNEChange_Lane::redo(), GNEChange_Edge::redo(), GNEChange_Selection::redoName(), GNEChange_Junction::redoName(), GNEChange_Additional::redoName(), redoName(), GNEChange_Connection::redoName(), GNEChange_Lane::redoName(), GNEChange_Edge::redoName(), GNEChange_Selection::undo(), GNEChange_Additional::undo(), GNEChange_Junction::undo(), undo(), GNEChange_Connection::undo(), GNEChange_Lane::undo(), GNEChange_Edge::undo(), GNEChange_Selection::undoName(), GNEChange_Additional::undoName(), GNEChange_Junction::undoName(), undoName(), GNEChange_Connection::undoName(), GNEChange_Lane::undoName(), and GNEChange_Edge::undoName().
|
private |
Definition at line 84 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_Selection::redo(), GNEChange_Additional::redo(), GNEChange_Junction::redo(), GNEChange_Lane::redo(), GNEChange_Edge::redo(), GNEChange_Selection::undo(), GNEChange_Junction::undo(), GNEChange_Additional::undo(), GNEChange_Lane::undo(), and GNEChange_Edge::undo().
|
private |
Definition at line 88 of file GNEChange_TLS.h.