Eclipse SUMO - Simulation of Urban MObility
GUITrafficLightLogicWrapper.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 /****************************************************************************/
17 // A wrapper for tl-logics to allow their visualisation and interaction
18 /****************************************************************************/
19 #ifndef GUITrafficLightLogicWrapper_h
20 #define GUITrafficLightLogicWrapper_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
31 
32 
33 // ===========================================================================
34 // class declarations
35 // ===========================================================================
37 class GUIMainWindow;
38 
39 
40 // ===========================================================================
41 // class definition
42 // ===========================================================================
49 public:
52 
55 
56 
57 
59 
60 
69  GUISUMOAbstractView& parent);
70 
71 
80  GUISUMOAbstractView& parent);
81 
82 
89 
90 
95  void drawGL(const GUIVisualizationSettings& s) const;
97 
98 
100  void begin2TrackPhases();
101 
103  void showPhases();
104 
106  void switchTLSLogic(int to);
107 
109  int getLinkIndex(const MSLink* const link) const;
110 
112  return myTLLogic;
113  }
114 
115 public:
123  public:
126  GUISUMOAbstractView& parent, GUIGlObject& o);
127 
130 
132  long onCmdShowPhases(FXObject*, FXSelector, void*);
133 
135  long onCmdBegin2TrackPhases(FXObject*, FXSelector, void*);
136  long onCmdShowDetectors(FXObject*, FXSelector, void*);
137 
138  long onCmdSwitchTLS2Off(FXObject*, FXSelector, void*);
139  long onCmdSwitchTLSLogic(FXObject*, FXSelector, void*);
140 
141  protected:
144 
145  };
146 
147 private:
150 
153 
156 
157 };
158 
159 
160 #endif
161 
162 /****************************************************************************/
163 
long onCmdBegin2TrackPhases(FXObject *, FXSelector, void *)
Called if the phases shall be begun to track.
MSTrafficLightLogic & getTLLogic() const
Stores the information about how to visualize structures.
void begin2TrackPhases()
Builds a GUITLLogicPhasesTrackerWindow which will receive new phases.
MSTLLogicControl & myTLLogicControl
Reference to the according tls.
GUIMainWindow * myApp
The main application.
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:42
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
void showPhases()
Builds a GUITLLogicPhasesTrackerWindow which displays the phase diagram.
A class that stores and controls tls and switching of their programs.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
void switchTLSLogic(int to)
Builds a GUITLLogicPhasesTrackerWindow which displays the phase diagram.
MSTrafficLightLogic & myTLLogic
The wrapped tl-logic.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
int getLinkIndex(const MSLink *const link) const
Returns the index of the given link within the according tls.
The popup menu of a globject.
GUITrafficLightLogicWrapper(MSTLLogicControl &control, MSTrafficLightLogic &tll)
Constructor.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
The parent class for traffic light logics.
A window containing a gl-object&#39;s parameter.
long onCmdShowPhases(FXObject *, FXSelector, void *)
Called if the phases shall be shown.