SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00010 // Base of value-generating classes (detectors) 00011 /****************************************************************************/ 00012 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00013 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors 00014 /****************************************************************************/ 00015 // 00016 // This file is part of SUMO. 00017 // SUMO is free software: you can redistribute it and/or modify 00018 // it under the terms of the GNU General Public License as published by 00019 // the Free Software Foundation, either version 3 of the License, or 00020 // (at your option) any later version. 00021 // 00022 /****************************************************************************/ 00023 #ifndef MSDetectorFileOutput_h 00024 #define MSDetectorFileOutput_h 00025 00026 00027 // =========================================================================== 00028 // included modules 00029 // =========================================================================== 00030 #ifdef _MSC_VER 00031 #include <windows_config.h> 00032 #else 00033 #include <config.h> 00034 #endif 00035 00036 #include <string> 00037 00038 #include <utils/common/SUMOTime.h> 00039 #include <utils/iodevices/OutputDevice.h> 00040 #include <utils/common/Named.h> 00041 00042 00043 // =========================================================================== 00044 // class declarations 00045 // =========================================================================== 00046 class GUIDetectorWrapper; 00047 00048 00049 // =========================================================================== 00050 // class definitions 00051 // =========================================================================== 00052 enum DetectorUsage { 00053 DU_USER_DEFINED, 00054 DU_SUMO_INTERNAL, 00055 DU_TL_CONTROL 00056 }; 00057 00065 class MSDetectorFileOutput : public Named { 00066 public: 00068 MSDetectorFileOutput(const std::string& id) : Named(id) { } 00069 00070 00072 virtual ~MSDetectorFileOutput() { } 00073 00074 00077 00084 virtual void writeXMLOutput(OutputDevice& dev, 00085 SUMOTime startTime, SUMOTime stopTime) = 0; 00086 00087 00096 virtual void writeXMLDetectorProlog(OutputDevice& dev) const = 0; 00097 00098 00106 virtual void reset() { } 00107 00108 00113 virtual void detectorUpdate(const SUMOTime step) { 00114 UNUSED_PARAMETER(step); 00115 } 00116 00117 00123 virtual GUIDetectorWrapper* buildDetectorGUIRepresentation() { 00124 return 0; 00125 } 00126 00127 00128 private: 00130 MSDetectorFileOutput(const MSDetectorFileOutput&); 00131 00133 MSDetectorFileOutput& operator=(const MSDetectorFileOutput&); 00134 00135 00136 }; 00137 00138 00139 #endif 00140 00141 /****************************************************************************/ 00142