00001 /****************************************************************************/ 00007 // The gui-version of the MSInductLoop, together with the according 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 GUIInductLoop_h 00020 #define GUIInductLoop_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 <microsim/output/MSInductLoop.h> 00033 #include <utils/geom/Position2D.h> 00034 #include "GUIDetectorWrapper.h" 00035 00036 00037 // =========================================================================== 00038 // class declarations 00039 // =========================================================================== 00040 class GUIGlObjectStorage; 00041 class GUILaneWrapper; 00042 00043 00044 // =========================================================================== 00045 // class definitions 00046 // =========================================================================== 00053 class GUIInductLoop : public MSInductLoop { 00054 public: 00064 GUIInductLoop(const std::string &id, MSLane * const lane, SUMOReal position) throw(); 00065 00066 00068 ~GUIInductLoop() throw(); 00069 00070 00073 virtual GUIDetectorWrapper *buildDetectorWrapper( 00074 GUIGlObjectStorage &idStorage, GUILaneWrapper &lane); 00075 00076 public: 00081 class MyWrapper : public GUIDetectorWrapper { 00082 public: 00084 MyWrapper(GUIInductLoop &detector, 00085 GUIGlObjectStorage &idStorage, GUILaneWrapper &wrapper, 00086 SUMOReal pos) throw(); 00087 00089 ~MyWrapper() throw(); 00090 00091 00093 00094 00102 GUIParameterTableWindow *getParameterWindow( 00103 GUIMainWindow &app, GUISUMOAbstractView &parent) throw(); 00104 00105 00111 const std::string &getMicrosimID() const throw(); 00112 00113 00119 Boundary getCenteringBoundary() const throw(); 00120 00121 00126 void drawGL(const GUIVisualizationSettings &s) const throw(); 00128 00129 00130 00132 GUIInductLoop &getLoop(); 00133 00134 private: 00136 GUIInductLoop &myDetector; 00137 00139 Boundary myBoundary; 00140 00142 Position2D myFGPosition; 00143 00145 SUMOReal myFGRotation; 00146 00148 SUMOReal myPosition; 00149 00150 private: 00152 MyWrapper(const MyWrapper&); 00153 00155 MyWrapper& operator=(const MyWrapper&); 00156 00157 }; 00158 00159 }; 00160 00161 00162 #endif 00163 00164 /****************************************************************************/ 00165
1.5.6