SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00009 // A loader for detector flows 00010 /****************************************************************************/ 00011 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00012 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors 00013 /****************************************************************************/ 00014 // 00015 // This file is part of SUMO. 00016 // SUMO is free software: you can redistribute it and/or modify 00017 // it under the terms of the GNU General Public License as published by 00018 // the Free Software Foundation, either version 3 of the License, or 00019 // (at your option) any later version. 00020 // 00021 /****************************************************************************/ 00022 #ifndef RODFDetFlowLoader_h 00023 #define RODFDetFlowLoader_h 00024 00025 00026 // =========================================================================== 00027 // included modules 00028 // =========================================================================== 00029 #ifdef _MSC_VER 00030 #include <windows_config.h> 00031 #else 00032 #include <config.h> 00033 #endif 00034 00035 #include <string> 00036 #include <vector> 00037 #include <utils/importio/NamedColumnsParser.h> 00038 #include <utils/common/UtilExceptions.h> 00039 #include "RODFDetector.h" 00040 #include "RODFDetectorFlow.h" 00041 00042 00043 // =========================================================================== 00044 // class definitions 00045 // =========================================================================== 00050 class RODFDetFlowLoader { 00051 public: 00060 RODFDetFlowLoader(const RODFDetectorCon& dets, RODFDetectorFlows& into, 00061 SUMOTime startTime, SUMOTime endTime, 00062 SUMOTime timeOffset, int timeScale) ; 00063 00064 00066 ~RODFDetFlowLoader() ; 00067 00068 00083 void read(const std::string& file) throw(IOError, ProcessError); 00084 00085 00086 private: 00088 RODFDetectorFlows& myStorage; 00089 00091 const SUMOTime myTimeOffset; 00092 00094 const SUMOTime myTimeScale; 00095 00097 const SUMOTime myStartTime, myEndTime; 00098 00100 NamedColumnsParser myLineHandler; 00101 00103 const RODFDetectorCon& myDetectorContainer; 00104 00106 bool myHaveWarnedAboutOverridingBoundaries; 00107 00109 bool myHaveWarnedAboutPartialDefs; 00110 00111 00112 private: 00114 RODFDetFlowLoader(const RODFDetFlowLoader& src); 00115 00117 RODFDetFlowLoader& operator=(const RODFDetFlowLoader& src); 00118 00119 }; 00120 00121 00122 #endif 00123 00124 /****************************************************************************/ 00125