|
SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00007 // The gui-version of the MSInstantInductLoop 00008 /****************************************************************************/ 00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00010 // Copyright (C) 2001-2011 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 GUIInstantInductLoop_h 00020 #define GUIInstantInductLoop_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 <utils/foxtools/MFXMutex.h> 00033 #include <microsim/output/MSInstantInductLoop.h> 00034 #include <utils/geom/Position.h> 00035 #include "GUIDetectorWrapper.h" 00036 00037 00038 // =========================================================================== 00039 // class declarations 00040 // =========================================================================== 00041 class GUILaneWrapper; 00042 00043 00044 // =========================================================================== 00045 // class definitions 00046 // =========================================================================== 00051 class GUIInstantInductLoop : public MSInstantInductLoop { 00052 public: 00060 GUIInstantInductLoop(const std::string& id, OutputDevice& od, 00061 MSLane* const lane, SUMOReal positionInMeters) throw(); 00062 00063 00065 ~GUIInstantInductLoop() throw(); 00066 00067 00068 00072 virtual GUIDetectorWrapper* buildDetectorGUIRepresentation(); 00073 00074 00075 public: 00080 class MyWrapper : public GUIDetectorWrapper { 00081 public: 00083 MyWrapper(GUIInstantInductLoop& detector, 00084 GUILaneWrapper& wrapper, 00085 SUMOReal pos) throw(); 00086 00088 ~MyWrapper() throw(); 00089 00090 00092 00093 00101 GUIParameterTableWindow* getParameterWindow( 00102 GUIMainWindow& app, GUISUMOAbstractView& parent) throw(); 00103 00104 00110 Boundary getCenteringBoundary() const throw(); 00111 00112 00117 void drawGL(const GUIVisualizationSettings& s) const throw(); 00119 00120 00122 GUIInstantInductLoop& getLoop(); 00123 00124 00125 private: 00127 GUIInstantInductLoop& myDetector; 00128 00130 Boundary myBoundary; 00131 00133 Position myFGPosition; 00134 00136 SUMOReal myFGRotation; 00137 00139 SUMOReal myPosition; 00140 00141 private: 00143 MyWrapper(const MyWrapper&); 00144 00146 MyWrapper& operator=(const MyWrapper&); 00147 00148 }; 00149 00150 00152 mutable MFXMutex myLock; 00153 00154 }; 00155 00156 00157 #endif 00158 00159 /****************************************************************************/ 00160