![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
#include <observedcsvrunlayer.h>
Public Member Functions | |
| ~ObservedCsvRunLayer () override=default | |
| const QStringList & | columnLabels () const noexcept |
| Column labels for all loaded series — order matches the CSV's column order. Useful for the dialog to populate a picker. | |
| const QString & | sourcePath () const noexcept |
| File path used to load. | |
| 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). | |
Public Member Functions inherited from openswmmvis::plot::IRunLayer | |
| virtual | ~IRunLayer ()=default |
| virtual void | getSeriesAt (const ObjectRef &ref, const ResultDescriptor &descriptor, SeriesData &out) const |
Y2b-2 (amendment D-Y4): resolve a series by DESCRIPTOR. Fixed attributes forward to the enum overload above; a species refuses with a precise message — only sources that actually carry species columns override this (SwmmOutRunLayer). | |
| virtual QVector< ResultDescriptor > | resultDescriptorsForKind (ObjectRef::Kind kind) const |
Y2b-1 (amendment D-Y4): everything plottable for kind on THIS run — the fixed attribute set as descriptors, plus any dynamic species the run carries. Base impl serves the fixed set only, which is exactly right for sources with no species (observed CSV, mesh layers, a legacy .out with no quality). SwmmOutRunLayer overrides to append the open run's species by name. | |
Static Public Member Functions | |
| static std::unique_ptr< ObservedCsvRunLayer > | load (const QString &path, PlotAttribute defaultAttr, UnitSystem unitSys=UnitSystem::SI, QString *errorOut=nullptr) |
| Load a CSV / TSV file and assign all its columns to a single chart attribute (the row they land on). | |
|
overridedefault |
|
inlinenoexcept |
Column labels for all loaded series — order matches the CSV's column order. Useful for the dialog to populate a picker.
|
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.
|
static |
Load a CSV / TSV file and assign all its columns to a single chart attribute (the row they land on).
| path | File path. |
| defaultAttr | PlotAttribute the columns plot against (e.g. PlotAttribute::NodeDepth). All columns share this; users wanting mixed-attribute observed data load the same file multiple times. |
| unitSys | Unit system to advertise (mostly affects axis labels). Auto-detected from header suffixes if you pass UnitSystem::SI; explicit value wins. |
| errorOut | If non-null, populated with a human-readable message on failure. |
|
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 |
Human label shown in the SeriesPanel tree + legends.
Implements openswmmvis::plot::IRunLayer.
|
inlinenoexcept |
File path used to load.
|
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.
|
inlineoverridevirtual |
Unit system the source advertises (drives axis labels).
Implements openswmmvis::plot::IRunLayer.