SUMO - Simulation of Urban MObility
GNEChange_TLS.h
Go to the documentation of this file.
1 /****************************************************************************/
7 // A network change in which a traffic light is created or deleted
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
10 // Copyright (C) 2001-2016 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software: you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation, either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 #ifndef GNEChange_TLS_h
21 #define GNEChange_TLS_h
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 
64  FXString undoName() const;
65  FXString redoName() const;
66  void undo();
67  void redo();
68 
69 
70 private:
71  /* we need the junction because it is the target of our change commands
72  * we assume shared responsiblity for the junction via reference counting */
74 
75  /* the traffic light to be created/deleted. We assume no responsiblity for the pointer
76  * since it is hard to track by which NBnodes a tlDef is used (may be more than one). */
78 
80 };
81 
82 #endif
83 /****************************************************************************/
GNEJunction * myJunction
Definition: GNEChange_TLS.h:73
the function-object for an editing operation (abstract base)
Definition: GNEChange.h:48
The base class for traffic light logic definitions.
NBTrafficLightDefinition * myTlDef
Definition: GNEChange_TLS.h:77
~GNEChange_TLS()
Destructor.
FXString redoName() const
FXString undoName() const
GNEChange_TLS(GNEJunction *junction, NBTrafficLightDefinition *tlDef, bool forward, bool forceInsert=false, const std::string tlID="")
Constructor for creating/deleting an edge.