Eclipse 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-2019 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 /****************************************************************************/
14 // A network change in which a traffic light is created or deleted
15 /****************************************************************************/
16 #ifndef GNEChange_TLS_h
17 #define GNEChange_TLS_h
18 
19 
20 // ===========================================================================
21 // included modules
22 // ===========================================================================
23 #include <config.h>
24 
25 #include <fx.h>
27 #include "GNEChange.h"
28 
29 // ===========================================================================
30 // class declarations
31 // ===========================================================================
33 class GNEJunction;
34 
35 // ===========================================================================
36 // class definitions
37 // ===========================================================================
42 class GNEChange_TLS : public GNEChange {
43  FXDECLARE_ABSTRACT(GNEChange_TLS)
44 
45 public:
52  GNEChange_TLS(GNEJunction* junction, NBTrafficLightDefinition* tlDef, bool forward, bool forceInsert = false, const std::string tlID = "");
53 
56 
60  FXString undoName() const;
61 
63  FXString redoName() const;
64 
66  void undo();
67 
69  void redo();
71 
72 
73 private:
78 
83 
86 };
87 
88 #endif
89 /****************************************************************************/
GNEChange_TLS::redoName
FXString redoName() const
get Redo name
Definition: GNEChange_TLS.cpp:116
fxexdefs.h
GNEChange_TLS::myJunction
GNEJunction * myJunction
we need the junction because it is the target of our change commands
Definition: GNEChange_TLS.h:77
GNEChange.h
GNEChange_TLS::GNEChange_TLS
GNEChange_TLS(GNEJunction *junction, NBTrafficLightDefinition *tlDef, bool forward, bool forceInsert=false, const std::string tlID="")
Constructor for creating/deleting an edge.
Definition: GNEChange_TLS.cpp:42
GNEChange_TLS::myTlDef
NBTrafficLightDefinition * myTlDef
the traffic light to be created/deleted. We assume no responsiblity for the pointer
Definition: GNEChange_TLS.h:82
GNEChange_TLS
Definition: GNEChange_TLS.h:42
GNEChange_TLS::myForceInsert
bool myForceInsert
check if forceInsert is enabled
Definition: GNEChange_TLS.h:85
GNEChange_TLS::redo
void redo()
redo action
Definition: GNEChange_TLS.cpp:88
config.h
GNEChange_TLS::~GNEChange_TLS
~GNEChange_TLS()
Destructor.
Definition: GNEChange_TLS.cpp:58
GNEChange_TLS::undoName
FXString undoName() const
return undoName
Definition: GNEChange_TLS.cpp:106
GNEJunction
Definition: GNEJunction.h:47
GNEChange_TLS::undo
void undo()
undo action
Definition: GNEChange_TLS.cpp:70
GNEChange
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:42
NBTrafficLightDefinition
The base class for traffic light logic definitions.
Definition: NBTrafficLightDefinition.h:67