SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
timeseriesparse.h
Go to the documentation of this file.
1
23#ifndef OPENSWMMVIS_IO_TIMESERIESPARSE_H
24#define OPENSWMMVIS_IO_TIMESERIESPARSE_H
25
26#include <QChar>
27#include <QString>
28
29#include <vector>
30
31namespace openswmmvis::io {
32
39QChar guessDelimiter(const QString& sampleLine);
40
50bool tryParseTimestamp(const QString& s, double& jOut, double fallbackBase);
51
62bool parseRow(const QString& line,
63 QChar delim,
64 double& timeJulianOut,
65 std::vector<double>& valuesOut,
66 double hoursSinceStartFallbackBase);
67
76{
82 double lastDateJulian = 0.0;
83
87 bool anyDateSeen = false;
88};
89
107bool parseSwmmDatLine(const QString& line,
108 SwmmDatState& state,
109 double& timeJulianOut,
110 double& valueOut);
111
112} // namespace openswmmvis::io
113
114#endif // OPENSWMMVIS_IO_TIMESERIESPARSE_H
double s
Scene px per model length unit.
Definition inletdrawingview.cpp:82
Definition gdaldrivers.h:22
bool parseRow(const QString &line, QChar delim, double &timeJulianOut, std::vector< double > &valuesOut, double hoursSinceStartFallbackBase)
Parse one delimited row into a timestamp + N value cells.
Definition timeseriesparse.cpp:76
QChar guessDelimiter(const QString &sampleLine)
Guess the per-row delimiter from a sample line.
Definition timeseriesparse.cpp:20
bool tryParseTimestamp(const QString &s, double &jOut, double fallbackBase)
Try to parse s as a timestamp into a SWMM Julian date.
Definition timeseriesparse.cpp:30
bool parseSwmmDatLine(const QString &line, SwmmDatState &state, double &timeJulianOut, double &valueOut)
Parse one line of a SWMM .dat timeseries file.
Definition timeseriesparse.cpp:178
State carried across lines when reading a SWMM .dat timeseries file.
Definition timeseriesparse.h:76
double lastDateJulian
SWMM DateTime used as the anchor for 2-token lines (the whole-day part). Initialise to a sensible bas...
Definition timeseriesparse.h:82
bool anyDateSeen
Set to true once a 3-token line has been parsed. Lets the caller distinguish "anchor came from the fi...
Definition timeseriesparse.h:87