62 if (line.find(
';') == std::string::npos) {
73 if (time < myStartTime || time >=
myEndTime) {
76 WRITE_WARNING(
TL(
"At least one value lies beyond given time boundaries."));
104 WRITE_WARNING(
TL(
"At least one line does not contain the correct number of columns."));
109 +
" The following values must be supplied : 'Detector', 'Time', 'qPKW'\n"
110 +
" The according column names must be given in the first line of the file.");
#define WRITE_WARNING(msg)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Retrieves a file linewise and reports the lines to a handler.
bool readLine(LineHandler &lh)
Reads a single (the next) line from the file and reports it to the given LineHandler.
bool hasMore() const
Returns whether another line may be read (the file was not read completely).
std::string getFileName() const
Returns the name of the used file.
const SUMOTime myStartTime
The first and the last time step to read.
const SUMOTime myTimeOffset
The time offset to apply to read time values.
RODFDetFlowLoader(const RODFDetectorCon &dets, RODFDetectorFlows &into, SUMOTime startTime, SUMOTime endTime, SUMOTime timeOffset, SUMOTime timeScale)
Constructor.
RODFDetectorFlows & myStorage
The container for read detector values.
const SUMOTime myTimeScale
The time scale to apply to read time values.
NamedColumnsParser myLineHandler
The value extractor.
bool myHaveWarnedAboutPartialDefs
Whether a warning about partial definitions was already written.
const RODFDetectorCon & myDetectorContainer
Container holding known detectors.
void read(const std::string &file)
Reads the given file assuming it contains detector values.
~RODFDetFlowLoader()
Destructor.
bool myHaveWarnedAboutOverridingBoundaries
Whether a warning about overriding boundaries was already written.
A container for RODFDetectors.
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
Definition of the traffic during a certain time containing the flows and speeds.