35#ifndef OPENSWMM_ENGINE_INITIAL_QUALITY_DATA_HPP
36#define OPENSWMM_ENGINE_INITIAL_QUALITY_DATA_HPP
111 void add(
bool link,
const std::string& name,
const std::string& cons,
double v,
int ei = -1,
132 if (idx < 0 || idx >=
count())
134 const auto u =
static_cast<std::size_t
>(idx);
Definition ExchangeLaw.hpp:60
Definition InitialQualityData.hpp:47
std::vector< uint8_t > from_file
Definition InitialQualityData.hpp:91
static constexpr int kKindWaterAge
Classified constituent kinds (see kind).
Definition InitialQualityData.hpp:49
std::vector< std::string > constituent
Raw constituent name (writer round-trip)
Definition InitialQualityData.hpp:85
static constexpr int msxSpecies(int k) noexcept
Decode a negative MSX kind into its reaction-species index.
Definition InitialQualityData.hpp:72
int count() const
Count initial-quality rows from the element-kind column.
Definition InitialQualityData.hpp:80
std::vector< int > kind
>=0 pollutant idx; kKind* otherwise
Definition InitialQualityData.hpp:86
std::vector< int > elem_idx
Resolved node/link index (-1 until resolved)
Definition InitialQualityData.hpp:84
std::string file
Definition InitialQualityData.hpp:95
static constexpr int msxKind(int species) noexcept
Encode a reaction-species index as a negative constituent kind.
Definition InitialQualityData.hpp:64
void add(bool link, const std::string &name, const std::string &cons, double v, int ei=-1, int k=kKindUnresolved, bool fromFile=false)
Append an initial-quality row without resolving its names.
Definition InitialQualityData.hpp:111
std::vector< std::string > elem_name
Raw element name (post-parse re-resolution)
Definition InitialQualityData.hpp:83
std::vector< uint8_t > is_link
0 = NODE row, 1 = LINK row
Definition InitialQualityData.hpp:82
static constexpr int kKindMsxFirst
Definition InitialQualityData.hpp:57
static constexpr int kKindUnresolved
Definition InitialQualityData.hpp:51
static constexpr int kKindTemperature
TEMPERATURE (degC)
Definition InitialQualityData.hpp:50
void erase(int idx)
Remove a stored initial-quality row when its index exists.
Definition InitialQualityData.hpp:131
std::vector< double > value
Definition InitialQualityData.hpp:87