![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
#include <swmmoutrunlayer.h>
Public Member Functions | |
| SwmmOutRunLayer (SWMMResultsLayer *layer) | |
| Wrap an existing on-canvas SWMMResultsLayer (non-owning). | |
| ~SwmmOutRunLayer () override=default | |
| SWMMResultsLayer * | layer () const |
| Underlying layer (may be null if it was destroyed). | |
| QString | scenarioName () const override |
| Human label shown in the SeriesPanel tree + legends. | |
| UnitSystem | unitSystem () const override |
| Unit system the source advertises (drives axis labels). | |
| double | startDateJulian () const override |
| Start date of the simulation as SWMM Julian, or NaN if unknown. | |
| int | periodCount () const override |
| Total number of time periods available (grows during live mode). | |
| int | reportStepSeconds () const override |
| Report step in seconds. 0 if unknown. | |
| QString | persistenceKey () const override |
Stable identity string for .oswp round-trip. Defaults to the scenario name; subclasses may override with a file path or layer GUID. | |
| void | getSeriesAt (const ObjectRef &ref, PlotAttribute attr, SeriesData &out) const override |
Resolve a series. Returns timesJulian + values for the spec. Implementations are responsible for resolving ref against their own indexing (e.g. SWMM ID → output-file index, triIdx → mesh face). When ref or attr is not supported, set out.ok = false and fill out.errorMessage. | |
| bool | supportsAttribute (PlotAttribute attr) const override |
| Convenience: does this source carry the given attribute at all? Default impl returns true; subclasses can refine (e.g. hide velocity attributes when CF.2 edge-flux data is missing). | |
| 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 set only. | |
| void | getSeriesAt (const ObjectRef &ref, const ResultDescriptor &descriptor, SeriesData &out) const override |
Y2b-2: species series resolve NAME → index → per-kind SWMM_OUT_*_POLLUT_BASE + index against the run's live species list on every call (D-G1 — a stored index would repoint when a model edit reorders species). Fixed attributes take the enum path unchanged. | |
Public Member Functions inherited from openswmmvis::plot::IRunLayer | |
| virtual | ~IRunLayer ()=default |
Static Public Member Functions | |
| 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 + indexOf(name). Returns -1 when the run does not carry the species or the kind has no species columns. Pure mapping — exposed for testing, and reorder-safe by construction (the index comes from runSpecies at call time, never from storage). | |
| static int | variableCodeFor (PlotAttribute attr, ObjectRef::Kind kind) |
| Map a PlotAttribute + ObjectRef::Kind to the engine's per-object var code (SWMM_OUT_NODE_*, SWMM_OUT_LINK_*, SWMM_OUT_SUBCATCH_*, SWMM_OUT_SYS_*). Returns -1 when the combination isn't valid (e.g. NodeDepth on a Link, or a Mesh2D attribute on any kind). Pure mapping — exposed for testing. | |
|
explicit |
Wrap an existing on-canvas SWMMResultsLayer (non-owning).
|
overridedefault |
|
overridevirtual |
Y2b-2: species series resolve NAME → index → per-kind SWMM_OUT_*_POLLUT_BASE + index against the run's live species list on every call (D-G1 — a stored index would repoint when a model edit reorders species). Fixed attributes take the enum path unchanged.
Reimplemented from openswmmvis::plot::IRunLayer.
|
overridevirtual |
Resolve a series. Returns timesJulian + values for the spec. Implementations are responsible for resolving ref against their own indexing (e.g. SWMM ID → output-file index, triIdx → mesh face). When ref or attr is not supported, set out.ok = false and fill out.errorMessage.
Implements openswmmvis::plot::IRunLayer.
| SWMMResultsLayer * openswmmvis::plot::SwmmOutRunLayer::layer | ( | ) | const |
Underlying layer (may be null if it was destroyed).
|
overridevirtual |
Total number of time periods available (grows during live mode).
Implements openswmmvis::plot::IRunLayer.
|
overridevirtual |
Stable identity string for .oswp round-trip. Defaults to the scenario name; subclasses may override with a file path or layer GUID.
Reimplemented from openswmmvis::plot::IRunLayer.
|
overridevirtual |
Report step in seconds. 0 if unknown.
Implements openswmmvis::plot::IRunLayer.
|
overridevirtual |
Y2b-1: fixed set + the open run's species BY NAME (D-G1). Legacy .out (no quality) serves the fixed set only.
Reimplemented from openswmmvis::plot::IRunLayer.
|
overridevirtual |
Human label shown in the SeriesPanel tree + legends.
Implements openswmmvis::plot::IRunLayer.
|
static |
Map a species NAME to the engine's per-object var code: SWMM_OUT_{NODE,LINK,SUBCATCH}_POLLUT_BASE + indexOf(name). Returns -1 when the run does not carry the species or the kind has no species columns. Pure mapping — exposed for testing, and reorder-safe by construction (the index comes from runSpecies at call time, never from storage).
|
overridevirtual |
Start date of the simulation as SWMM Julian, or NaN if unknown.
Implements openswmmvis::plot::IRunLayer.
|
overridevirtual |
Convenience: does this source carry the given attribute at all? Default impl returns true; subclasses can refine (e.g. hide velocity attributes when CF.2 edge-flux data is missing).
Reimplemented from openswmmvis::plot::IRunLayer.
|
overridevirtual |
Unit system the source advertises (drives axis labels).
Implements openswmmvis::plot::IRunLayer.
|
static |
Map a PlotAttribute + ObjectRef::Kind to the engine's per-object var code (SWMM_OUT_NODE_*, SWMM_OUT_LINK_*, SWMM_OUT_SUBCATCH_*, SWMM_OUT_SYS_*). Returns -1 when the combination isn't valid (e.g. NodeDepth on a Link, or a Mesh2D attribute on any kind). Pure mapping — exposed for testing.