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
swmmoutrunlayer.h
Go to the documentation of this file.
1
22#ifndef OPENSWMMVIS_PLOT_SWMMOUTRUNLAYER_H
23#define OPENSWMMVIS_PLOT_SWMMOUTRUNLAYER_H
24
25#include "plot/irunlayer.h"
26
27#include <QPointer>
28
30
31namespace openswmmvis::plot {
32
33class SwmmOutRunLayer final : public IRunLayer
34{
35public:
38 ~SwmmOutRunLayer() override = default;
39
41 SWMMResultsLayer *layer() const;
42
43 // IRunLayer
44 QString scenarioName() const override;
45 UnitSystem unitSystem() const override;
46 double startDateJulian() const override;
47 int periodCount() const override;
48 int reportStepSeconds() const override;
49 QString persistenceKey() const override;
50
51 void getSeriesAt(const ObjectRef& ref,
52 PlotAttribute attr,
53 SeriesData& out) const override;
54
55 bool supportsAttribute(PlotAttribute attr) const override;
56
59 QVector<ResultDescriptor> resultDescriptorsForKind(
60 ObjectRef::Kind kind) const override;
61
67 void getSeriesAt(const ObjectRef& ref,
68 const ResultDescriptor& descriptor,
69 SeriesData& out) const override;
70
77 static int speciesVariableCodeFor(const QString& species,
78 const QStringList& runSpecies,
80
87
88private:
91 void fetchSeriesByCode_(const ObjectRef& ref, int varCode,
92 SeriesData& out) const;
93
94 QPointer<SWMMResultsLayer> m_layer;
95};
96
97} // namespace openswmmvis::plot
98
99#endif // OPENSWMMVIS_PLOT_SWMMOUTRUNLAYER_H
Overlays time-stepped simulation results on the SWMM network geometry.
Definition swmmresultslayer.h:96
Per-project flow-units state + label helpers.
Definition unitsystem.h:28
Abstract source backing one comparison-plot run.
Definition irunlayer.h:171
Definition swmmoutrunlayer.h:34
QString persistenceKey() const override
Stable identity string for .oswp round-trip. Defaults to the scenario name; subclasses may override w...
Definition swmmoutrunlayer.cpp:64
bool supportsAttribute(PlotAttribute attr) const override
Convenience: does this source carry the given attribute at all? Default impl returns true; subclasses...
Definition swmmoutrunlayer.cpp:73
SWMMResultsLayer * layer() const
Underlying layer (may be null if it was destroyed).
Definition swmmoutrunlayer.cpp:24
double startDateJulian() const override
Start date of the simulation as SWMM Julian, or NaN if unknown.
Definition swmmoutrunlayer.cpp:42
QString scenarioName() const override
Human label shown in the SeriesPanel tree + legends.
Definition swmmoutrunlayer.cpp:29
int periodCount() const override
Total number of time periods available (grows during live mode).
Definition swmmoutrunlayer.cpp:52
UnitSystem unitSystem() const override
Unit system the source advertises (drives axis labels).
Definition swmmoutrunlayer.cpp:34
static int speciesVariableCodeFor(const QString &species, const QStringList &runSpecies, ObjectRef::Kind kind)
Map a species NAME to the engine's per-object var code: SWMM_OUT_{NODE,LINK,SUBCATCH}_POLLUT_BASE + i...
Definition swmmoutrunlayer_codes.cpp:79
~SwmmOutRunLayer() override=default
int reportStepSeconds() const override
Report step in seconds. 0 if unknown.
Definition swmmoutrunlayer.cpp:59
QVector< ResultDescriptor > resultDescriptorsForKind(ObjectRef::Kind kind) const override
Y2b-1: fixed set + the open run's species BY NAME (D-G1). Legacy .out (no quality) serves the fixed s...
Definition swmmoutrunlayer.cpp:226
void getSeriesAt(const ObjectRef &ref, PlotAttribute attr, SeriesData &out) const override
Resolve a series. Returns timesJulian + values for the spec. Implementations are responsible for reso...
Definition swmmoutrunlayer.cpp:81
static int variableCodeFor(PlotAttribute attr, ObjectRef::Kind kind)
Map a PlotAttribute + ObjectRef::Kind to the engine's per-object var code (SWMM_OUT_NODE_*,...
Definition swmmoutrunlayer_codes.cpp:19
Slice BL — abstract "data-source" that the ComparisonPlotModel reads timeseries from.
Definition chartproperties.h:34
PlotAttribute
What a series plots. One row per attribute in the Nx2 grid.
Definition plotattribute.h:38
EdgeRef ref
Definition pslgminsize.cpp:377
TokenKind kind
Definition queryparser.cpp:34
Identifies what object a series is about. Kind is the discriminator; the active union member is impli...
Definition irunlayer.h:38
Kind
Definition irunlayer.h:39
One plottable result: a fixed attribute OR a species by name.
Definition resultdescriptor.h:39
Result of one series resolution. Times are SWMM DateTime doubles (OLE-Automation epoch,...
Definition irunlayer.h:151