GUITrafficLightLogicWrapper.h

Go to the documentation of this file.
00001 /****************************************************************************/
00007 // A wrapper for tl-logics to allow their visualisation and interaction
00008 /****************************************************************************/
00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/
00010 // Copyright 2001-2010 DLR (http://www.dlr.de/) and contributors
00011 /****************************************************************************/
00012 //
00013 //   This program is free software; you can redistribute it and/or modify
00014 //   it under the terms of the GNU General Public License as published by
00015 //   the Free Software Foundation; either version 2 of the License, or
00016 //   (at your option) any later version.
00017 //
00018 /****************************************************************************/
00019 #ifndef GUITrafficLightLogicWrapper_h
00020 #define GUITrafficLightLogicWrapper_h
00021 
00022 
00023 // ===========================================================================
00024 // included modules
00025 // ===========================================================================
00026 #ifdef _MSC_VER
00027 #include <windows_config.h>
00028 #else
00029 #include <config.h>
00030 #endif
00031 
00032 #include <gui/GUITLLogicPhasesTrackerWindow.h>
00033 #include <utils/gui/globjects/GUIGlObject.h>
00034 #include <utils/gui/globjects/GUIGLObjectPopupMenu.h>
00035 
00036 
00037 // ===========================================================================
00038 // class declarations
00039 // ===========================================================================
00040 class GUIGlObjectStorage;
00041 class MSTrafficLightLogic;
00042 class GUIMainWindow;
00043 
00044 
00045 // ===========================================================================
00046 // class definition
00047 // ===========================================================================
00053 class GUITrafficLightLogicWrapper : public GUIGlObject {
00054 public:
00056     GUITrafficLightLogicWrapper(GUIGlObjectStorage &idStorage,
00057                                 MSTLLogicControl &control, MSTrafficLightLogic &tll) throw();
00058 
00060     ~GUITrafficLightLogicWrapper() throw();
00061 
00062 
00063 
00065 
00066 
00074     GUIGLObjectPopupMenu *getPopUpMenu(GUIMainWindow &app,
00075                                        GUISUMOAbstractView &parent) throw();
00076 
00077 
00085     GUIParameterTableWindow *getParameterWindow(GUIMainWindow &app,
00086             GUISUMOAbstractView &parent) throw();
00087 
00088 
00094     const std::string &getMicrosimID() const throw();
00095 
00096 
00103     GUIGlObjectType getType() const throw() {
00104         return GLO_TLLOGIC;
00105     }
00106 
00107 
00113     Boundary getCenteringBoundary() const throw();
00114 
00115 
00120     void drawGL(const GUIVisualizationSettings &s) const throw();
00122 
00123 
00125     void begin2TrackPhases();
00126 
00128     void showPhases();
00129 
00131     void switchTLSLogic(int to);
00132 
00134     int getLinkIndex(const MSLink * const link) const;
00135 
00136 
00137 public:
00143     class GUITrafficLightLogicWrapperPopupMenu : public GUIGLObjectPopupMenu {
00144         FXDECLARE(GUITrafficLightLogicWrapperPopupMenu)
00145     public:
00147         GUITrafficLightLogicWrapperPopupMenu(GUIMainWindow &app,
00148                                              GUISUMOAbstractView &parent, GUIGlObject &o);
00149 
00151         ~GUITrafficLightLogicWrapperPopupMenu() throw();
00152 
00154         long onCmdShowPhases(FXObject*,FXSelector,void*);
00155 
00157         long onCmdBegin2TrackPhases(FXObject*,FXSelector,void*);
00158 
00159         long onCmdSwitchTLS2Off(FXObject*,FXSelector,void*);
00160         long onCmdSwitchTLSLogic(FXObject*,FXSelector,void*);
00161 
00162     protected:
00164         GUITrafficLightLogicWrapperPopupMenu() { }
00165 
00166     };
00167 
00168 private:
00170     MSTLLogicControl &myTLLogicControl;
00171 
00173     MSTrafficLightLogic &myTLLogic;
00174 
00176     GUIMainWindow *myApp;
00177 
00178 };
00179 
00180 
00181 #endif
00182 
00183 /****************************************************************************/
00184 

Generated on Wed May 5 00:06:30 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6