49 throw ProcessError(
"If myTlDef is null, forward cannot be false");
53 if (
myJunction->getNBNode()->isTLControlled()) {
55 type = (*
myJunction->getNBNode()->getControllingTLS().begin())->getType();
63 bool forceInsert,
const std::string tlID) :
72 throw ProcessError(
"If myTlDef is null, forward cannot be false");
74 if (
myJunction->getNBNode()->isTLControlled()) {
76 type = (*
myJunction->getNBNode()->getControllingTLS().begin())->getType();
96 if (
myJunction->getNet()->getViewNet()->getViewParent()->getGNEAppWindows()->isUndoRedoAllowed()) {
125 myJunction->getNet()->getSavingStatus()->requireSaveNetwork();
149 myJunction->getNet()->getSavingStatus()->requireSaveNetwork();
156 return (
TL(
"Undo create TLS '") +
myJunction->getID() +
"'");
158 return (
TL(
"Undo delete TLS '") +
myJunction->getID() +
"'");
166 return (
TL(
"Redo create TLS '") +
myJunction->getID() +
"'");
168 return (
TL(
"Redo delete TLS '") +
myJunction->getID() +
"'");
Supermode
@brie enum for supermodes
@ NETWORK
Network mode (Edges, junctions, etc..).
GNEJunction * myJunction
we need the junction because it is the target of our change commands
GNEChange_TLS(GNEJunction *junction, NBTrafficLightDefinition *tlDef, bool forward, bool forceInsert=false, const std::string tlID="")
Constructor for creating/deleting a TLS.
const std::string myNewID
std::string undoName() const
return undoName
~GNEChange_TLS()
Destructor.
const std::string myOldID
variables used for renaming TLS
std::string redoName() const
get Redo name
NBTrafficLightDefinition * myTlDef
the traffic light to be created/deleted. We assume no responsibility for the pointer
const bool myForceInsert
check if forceInsert is enabled
the function-object for an editing operation (abstract base)
bool myForward
we group antagonistic commands (create junction/delete junction) and keep them apart by this flag
GNEChange(Supermode supermode, bool forward, const bool selectedElement)
Constructor.
A traffic light logics which must be computed (only nodes/edges are given).
The base class for traffic light logic definitions.
static OptionsCont & getOptions()
Retrieves the options.
static StringBijection< TrafficLightType > TrafficLightTypes
traffic light types