GUI_E2_ZS_Collector.h

Go to the documentation of this file.
00001 /****************************************************************************/
00007 // The gui-version of the MS_E2_ZS_Collector
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 GUI_E2_ZS_Collector_h
00020 #define GUI_E2_ZS_Collector_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/common/PhysicalTypeDefs.h>
00033 #include <microsim/output/MSE2Collector.h>
00034 #include <microsim/MSNet.h>
00035 #include <utils/geom/Position2D.h>
00036 #include <utils/geom/Position2DVector.h>
00037 #include <utils/common/VectorHelper.h>
00038 #include <utils/common/ValueSource.h>
00039 #include "GUIDetectorWrapper.h"
00040 
00041 
00042 // ===========================================================================
00043 // class declarations
00044 // ===========================================================================
00045 class GUIGlObjectStorage;
00046 class GUILaneWrapper;
00047 class GUI_E2_ZS_CollectorOverLanes;
00048 
00049 
00050 // ===========================================================================
00051 // class definitions
00052 // ===========================================================================
00062 class GUI_E2_ZS_Collector : public MSE2Collector {
00063 public:
00076     GUI_E2_ZS_Collector(const std::string &id, DetectorUsage usage,
00077                         MSLane * const lane, SUMOReal startPos, SUMOReal detLength,
00078                         SUMOTime haltingTimeThreshold, SUMOReal haltingSpeedThreshold,
00079                         SUMOReal jamDistThreshold) throw();
00080 
00081 
00083     ~GUI_E2_ZS_Collector() throw();
00084 
00085 
00086     // valid for gui-version only
00087     virtual GUIDetectorWrapper *buildDetectorWrapper(
00088         GUIGlObjectStorage &idStorage,
00089         GUILaneWrapper &wrapper);
00090 
00091 
00092     // valid for gui-version and joined collectors only
00093     virtual GUIDetectorWrapper *buildDetectorWrapper(
00094         GUIGlObjectStorage &idStorage,
00095         GUILaneWrapper &wrapper, GUI_E2_ZS_CollectorOverLanes& p,
00096         GLuint glID);
00097 
00098 public:
00103     class MyWrapper : public GUIDetectorWrapper {
00104     public:
00106         MyWrapper(GUI_E2_ZS_Collector &detector,
00107                   GUIGlObjectStorage &idStorage, GUILaneWrapper &wrapper) throw();
00108 
00110         MyWrapper(GUI_E2_ZS_Collector &detector,
00111                   GUIGlObjectStorage &idStorage, GLuint glID,
00112                   GUI_E2_ZS_CollectorOverLanes &mustBe,
00113                   GUILaneWrapper &wrapper) throw();
00114 
00116         ~MyWrapper() throw();
00117 
00118 
00120 
00121 
00129         GUIParameterTableWindow *getParameterWindow(
00130             GUIMainWindow &app, GUISUMOAbstractView &parent) throw();
00131 
00132 
00138         const std::string &getMicrosimID() const throw();
00139 
00140 
00146         Boundary getCenteringBoundary() const throw();
00147 
00148 
00153         void drawGL(const GUIVisualizationSettings &s) const throw();
00155 
00156 
00158         GUI_E2_ZS_Collector &getDetector();
00159 
00160 
00161     private:
00162         void myConstruct(GUI_E2_ZS_Collector &detector,
00163                          GUILaneWrapper &wrapper);
00164 
00165     private:
00167         GUI_E2_ZS_Collector &myDetector;
00168 
00170         Boundary myBoundary;
00171 
00173         Position2DVector myFullGeometry;
00174 
00176         DoubleVector myShapeLengths;
00177 
00179         DoubleVector myShapeRotations;
00180 
00181     private:
00183         MyWrapper(const MyWrapper&);
00184 
00186         MyWrapper& operator=(const MyWrapper&);
00187 
00188     };
00189 
00190 };
00191 
00192 
00193 #endif
00194 
00195 /****************************************************************************/
00196 

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