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-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // A network change in which a traffic light is created or deleted
16 /****************************************************************************/
17 #ifndef GNEChange_TLS_h
18 #define GNEChange_TLS_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include <fx.h>
28 #include "GNEChange.h"
29 
30 // ===========================================================================
31 // class declarations
32 // ===========================================================================
34 class GNEJunction;
35 
36 // ===========================================================================
37 // class definitions
38 // ===========================================================================
43 class GNEChange_TLS : public GNEChange {
44  FXDECLARE_ABSTRACT(GNEChange_TLS)
45 
46 public:
53  GNEChange_TLS(GNEJunction* junction, NBTrafficLightDefinition* tlDef, bool forward, bool forceInsert = false, const std::string tlID = "");
54 
57 
61  FXString undoName() const;
62 
64  FXString redoName() const;
65 
67  void undo();
68 
70  void redo();
72 
73 
74 private:
79 
84 
87 };
88 
89 #endif
90 /****************************************************************************/
GNEJunction * myJunction
we need the junction because it is the target of our change commands
Definition: GNEChange_TLS.h:78
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:43
void redo()
redo action
The base class for traffic light logic definitions.
bool myForceInsert
check if forceInsert is enabled
Definition: GNEChange_TLS.h:86
NBTrafficLightDefinition * myTlDef
the traffic light to be created/deleted. We assume no responsiblity for the pointer ...
Definition: GNEChange_TLS.h:83
~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