SUMO - Simulation of Urban MObility
GNEChange_TLS.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
17 // A network change in which a traffic light is created or deleted
18 /****************************************************************************/
19 #ifndef GNEChange_TLS_h
20 #define GNEChange_TLS_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #ifdef _MSC_VER
27 #include <windows_config.h>
28 #else
29 #include <config.h>
30 #endif
31 
32 #include <fx.h>
34 #include "GNEChange.h"
35 
36 // ===========================================================================
37 // class declarations
38 // ===========================================================================
40 class GNEJunction;
41 
42 // ===========================================================================
43 // class definitions
44 // ===========================================================================
49 class GNEChange_TLS : public GNEChange {
50  FXDECLARE_ABSTRACT(GNEChange_TLS)
51 
52 public:
59  GNEChange_TLS(GNEJunction* junction, NBTrafficLightDefinition* tlDef, bool forward, bool forceInsert = false, const std::string tlID = "");
60 
63 
67  FXString undoName() const;
68 
70  FXString redoName() const;
71 
73  void undo();
74 
76  void redo();
78 
79 
80 private:
85 
90 
93 };
94 
95 #endif
96 /****************************************************************************/
GNEJunction * myJunction
we need the junction because it is the target of our change commands
Definition: GNEChange_TLS.h:84
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:48
void redo()
redo action
The base class for traffic light logic definitions.
bool myForceInsert
check if forceInsert is enabled
Definition: GNEChange_TLS.h:92
NBTrafficLightDefinition * myTlDef
the traffic light to be created/deleted. We assume no responsiblity for the pointer ...
Definition: GNEChange_TLS.h:89
~GNEChange_TLS()
Destructor.
void undo()
undo action
GNEChange_TLS(GNEJunction *junction, NBTrafficLightDefinition *tlDef, bool forward, bool forceInsert=false, const std::string tlID="")
Constructor for creating/deleting an edge.
FXString undoName() const
return undoName
FXString redoName() const
get Redo name