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
openswmmvis::plot::IRunLayer Class Referenceabstract

Abstract source backing one comparison-plot run. More...

#include <irunlayer.h>

Inheritance diagram for openswmmvis::plot::IRunLayer:
Collaboration diagram for openswmmvis::plot::IRunLayer:

Public Member Functions

virtual ~IRunLayer ()=default
 
virtual QString scenarioName () const =0
 Human label shown in the SeriesPanel tree + legends.
 
virtual UnitSystem unitSystem () const =0
 Unit system the source advertises (drives axis labels).
 
virtual double startDateJulian () const =0
 Start date of the simulation as SWMM Julian, or NaN if unknown.
 
virtual int periodCount () const =0
 Total number of time periods available (grows during live mode).
 
virtual int reportStepSeconds () const =0
 Report step in seconds. 0 if unknown.
 
virtual void getSeriesAt (const ObjectRef &ref, PlotAttribute attr, SeriesData &out) const =0
 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.
 
virtual bool supportsAttribute (PlotAttribute) const
 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).
 
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< ResultDescriptorresultDescriptorsForKind (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.
 
virtual QString persistenceKey () const
 Stable identity string for .oswp round-trip. Defaults to the scenario name; subclasses may override with a file path or layer GUID.
 

Detailed Description

Abstract source backing one comparison-plot run.

Constructor & Destructor Documentation

◆ ~IRunLayer()

virtual openswmmvis::plot::IRunLayer::~IRunLayer ( )
virtualdefault

Member Function Documentation

◆ getSeriesAt() [1/2]

virtual void openswmmvis::plot::IRunLayer::getSeriesAt ( const ObjectRef ref,
const ResultDescriptor descriptor,
SeriesData out 
) const
inlinevirtual

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).

Note
INLINE for the same header-only-interface reason as resultDescriptorsForKind below: nothing reachable from a default may live in a .cpp the stub tests do not link.

Reimplemented in openswmmvis::plot::SwmmOutRunLayer.

Here is the call graph for this function:

◆ getSeriesAt() [2/2]

virtual void openswmmvis::plot::IRunLayer::getSeriesAt ( const ObjectRef ref,
PlotAttribute  attr,
SeriesData out 
) const
pure virtual

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.

Implemented in openswmmvis::plot::Mesh2DRunLayer, openswmmvis::plot::ObservedCsvRunLayer, and openswmmvis::plot::SwmmOutRunLayer.

Here is the caller graph for this function:

◆ periodCount()

virtual int openswmmvis::plot::IRunLayer::periodCount ( ) const
pure virtual

Total number of time periods available (grows during live mode).

Implemented in openswmmvis::plot::Mesh2DRunLayer, openswmmvis::plot::ObservedCsvRunLayer, and openswmmvis::plot::SwmmOutRunLayer.

◆ persistenceKey()

virtual QString openswmmvis::plot::IRunLayer::persistenceKey ( ) const
inlinevirtual

Stable identity string for .oswp round-trip. Defaults to the scenario name; subclasses may override with a file path or layer GUID.

Reimplemented in openswmmvis::plot::Mesh2DRunLayer, openswmmvis::plot::ObservedCsvRunLayer, and openswmmvis::plot::SwmmOutRunLayer.

Here is the call graph for this function:

◆ reportStepSeconds()

virtual int openswmmvis::plot::IRunLayer::reportStepSeconds ( ) const
pure virtual

◆ resultDescriptorsForKind()

virtual QVector< ResultDescriptor > openswmmvis::plot::IRunLayer::resultDescriptorsForKind ( ObjectRef::Kind  kind) const
inlinevirtual

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.

Note
INLINE on purpose: IRunLayer is a header-only interface — hundreds of tests stub it without linking plot TUs, and any out-of-line virtual would become the key function and anchor the vtable in a .cpp those tests do not link (measured: undefined vtable/typeinfo in test_plotvariablepickerdialog).

Reimplemented in openswmmvis::plot::SwmmOutRunLayer.

Here is the call graph for this function:

◆ scenarioName()

virtual QString openswmmvis::plot::IRunLayer::scenarioName ( ) const
pure virtual

Human label shown in the SeriesPanel tree + legends.

Implemented in openswmmvis::plot::Mesh2DRunLayer, openswmmvis::plot::ObservedCsvRunLayer, and openswmmvis::plot::SwmmOutRunLayer.

Here is the caller graph for this function:

◆ startDateJulian()

virtual double openswmmvis::plot::IRunLayer::startDateJulian ( ) const
pure virtual

Start date of the simulation as SWMM Julian, or NaN if unknown.

Implemented in openswmmvis::plot::Mesh2DRunLayer, openswmmvis::plot::ObservedCsvRunLayer, and openswmmvis::plot::SwmmOutRunLayer.

◆ supportsAttribute()

virtual bool openswmmvis::plot::IRunLayer::supportsAttribute ( PlotAttribute  ) const
inlinevirtual

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 in openswmmvis::plot::Mesh2DRunLayer, openswmmvis::plot::ObservedCsvRunLayer, and openswmmvis::plot::SwmmOutRunLayer.

Here is the caller graph for this function:

◆ unitSystem()

virtual UnitSystem openswmmvis::plot::IRunLayer::unitSystem ( ) const
pure virtual

Unit system the source advertises (drives axis labels).

Implemented in openswmmvis::plot::Mesh2DRunLayer, openswmmvis::plot::ObservedCsvRunLayer, and openswmmvis::plot::SwmmOutRunLayer.


The documentation for this class was generated from the following file: