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::Species Namespace Reference

Classes

class  SpeciesMissWarner
 D-G1 warn-on-miss (Y2b-3): a saved theme or series may name a species the currently-open run does not carry (saved against a 3-species run, reopened against 1). Resolution already degrades to "no theme" (−1); this class supplies the WORDS — once per token, so per-frame resolution cannot spam the log. One instance per results layer; reset() when the run changes (the new run may carry it). More...
 

Functions

QString speciesAttributeName (const QString &species)
 "TSS""qual:TSS" — the token persisted in .oswp.
 
bool isSpeciesAttribute (const QString &attr)
 True if attr is a species attribute token.
 
QString speciesFromAttribute (const QString &attr)
 "qual:TSS""TSS"; empty for a non-species attribute.
 
QString speciesDisplayLabel (const QString &species)
 Picker label for a species: friendly text for the reserved pair, the bare name for an ordinary pollutant.
 
QString speciesUnitLabel (const QString &species, const QString &concentrationUnit)
 Unit string for a species. The reserved pair carry fixed units the .out enum cannot express (hours / °C — engine A2b); an ordinary pollutant uses concentrationUnit as reported.
 
bool isReservedSpecies (const QString &species)
 True for the reserved species (age / temperature).
 
int speciesOutCode (const QString &attr, const QStringList &species, int pollutBase)
 Resolve attr to an engine output variable code.
 
QStringList inflowConstituentNames (const QStringList &pollutants)
 Y4 (amendment D-Y4): constituent choices for an [INFLOWS] editor — FLOW, every pollutant, then the reserved AGE species (§3.3's exclusion lifted for age ONLY; temperature keeps the dedicated-page treatment until heat's round and must NOT appear). Engine NAMES — combo labels come from inflowConstituentLabel().
 
QString inflowConstituentLabel (const QString &name)
 Combo label for an inflow constituent: the species display label for the reserved pair ("Water age (hours)" — the row's value column means HOURS, never mg/L), the bare name otherwise.
 
bool inflowMassAllowed (const QString &name)
 MASS is a pollutant-only inflow type: meaningless for FLOW and for the age species (the engine takes a MASS-typed age row as hours WITH a warning — the editor must not author what warns).
 

Variables

constexpr const char * kWaterAgeName = "__WATER_AGE__"
 
constexpr const char * kTemperatureName = "__TEMPERATURE__"
 
constexpr const char * kSpeciesAttrPrefix = "qual:"
 

Function Documentation

◆ inflowConstituentLabel()

QString OpenSWMMVis::Species::inflowConstituentLabel ( const QString &  name)

Combo label for an inflow constituent: the species display label for the reserved pair ("Water age (hours)" — the row's value column means HOURS, never mg/L), the bare name otherwise.

Here is the call graph for this function:

◆ inflowConstituentNames()

QStringList OpenSWMMVis::Species::inflowConstituentNames ( const QStringList &  pollutants)

Y4 (amendment D-Y4): constituent choices for an [INFLOWS] editor — FLOW, every pollutant, then the reserved AGE species (§3.3's exclusion lifted for age ONLY; temperature keeps the dedicated-page treatment until heat's round and must NOT appear). Engine NAMES — combo labels come from inflowConstituentLabel().

◆ inflowMassAllowed()

bool OpenSWMMVis::Species::inflowMassAllowed ( const QString &  name)

MASS is a pollutant-only inflow type: meaningless for FLOW and for the age species (the engine takes a MASS-typed age row as hours WITH a warning — the editor must not author what warns).

Here is the call graph for this function:

◆ isReservedSpecies()

bool OpenSWMMVis::Species::isReservedSpecies ( const QString &  species)

True for the reserved species (age / temperature).

Here is the caller graph for this function:

◆ isSpeciesAttribute()

bool OpenSWMMVis::Species::isSpeciesAttribute ( const QString &  attr)

True if attr is a species attribute token.

Here is the caller graph for this function:

◆ speciesAttributeName()

QString OpenSWMMVis::Species::speciesAttributeName ( const QString &  species)

"TSS""qual:TSS" — the token persisted in .oswp.

◆ speciesDisplayLabel()

QString OpenSWMMVis::Species::speciesDisplayLabel ( const QString &  species)

Picker label for a species: friendly text for the reserved pair, the bare name for an ordinary pollutant.

Here is the caller graph for this function:

◆ speciesFromAttribute()

QString OpenSWMMVis::Species::speciesFromAttribute ( const QString &  attr)

"qual:TSS""TSS"; empty for a non-species attribute.

Note
An empty species name after the prefix is NOT valid and returns empty too, so "qual:" cannot resolve to index 0.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ speciesOutCode()

int OpenSWMMVis::Species::speciesOutCode ( const QString &  attr,
const QStringList &  species,
int  pollutBase 
)

Resolve attr to an engine output variable code.

Parameters
attra "qual:<name>" token.
speciesthe loaded run's species list, in .out order.
pollutBaseSWMM_OUT_NODE_POLLUT_BASE, …_LINK_… or …_SUBCATCH_… for the element kind being themed.
Returns
pollutBase + index, or −1 when attr is not a species token or names a species this run does not carry.
Here is the call graph for this function:

◆ speciesUnitLabel()

QString OpenSWMMVis::Species::speciesUnitLabel ( const QString &  species,
const QString &  concentrationUnit 
)

Unit string for a species. The reserved pair carry fixed units the .out enum cannot express (hours / °C — engine A2b); an ordinary pollutant uses concentrationUnit as reported.

Here is the caller graph for this function:

Variable Documentation

◆ kSpeciesAttrPrefix

constexpr const char* OpenSWMMVis::Species::kSpeciesAttrPrefix = "qual:"
inlineconstexpr

Prefix marking a themeable attribute as a species column.

◆ kTemperatureName

constexpr const char* OpenSWMMVis::Species::kTemperatureName = "__TEMPERATURE__"
inlineconstexpr

◆ kWaterAgeName

constexpr const char* OpenSWMMVis::Species::kWaterAgeName = "__WATER_AGE__"
inlineconstexpr

The reserved species names the engine writes into the .out species list. They are transported like pollutants but are not concentrations, so pickers label and unit them differently (GUI plan §3.3).