43#ifndef OPENSWMMVIS_MESHINFIL_H
44#define OPENSWMMVIS_MESHINFIL_H
247 InfilRow lookup(
const QString &k1,
const QString &k2,
bool *matched =
nullptr)
const;
const char * token
Definition diagramspec.cpp:20
bool ok
Definition inpmeshwriter.cpp:575
QString err
Definition inpmeshwriter.cpp:575
MaskMode m
Definition maskspec.cpp:18
Mesh2DInterp method
Definition mesh2dresultsexport.cpp:543
const char * key
Definition meshcellparams.cpp:24
QString tag
r.tag or inherited from a dropped RegionMarker.
Definition meshgenerator.cpp:167
Definition meshcommands.h:302
QString infilDestHint(InfilDest d)
A one-sentence tooltip for destination d: where the water goes and what the choice needs.
Definition meshinfil.cpp:356
int infilParamCount(InfilMethod method)
Number of meaningful positional parameters for method.
Definition meshinfil.cpp:147
ResolvedInfil resolveInfil(const MeshResult &mesh, int tri)
Resolve one triangle's infiltration per engine D-I3 precedence: ‘override > tag row > ’*' row > none`...
Definition meshinfil.cpp:93
bool loadLookupTableCsv(InfilLookupTable *table, const QString &path, QString *err)
Definition meshinfil.cpp:505
InfilDest
Definition meshinfil.h:72
@ Aquifer2D
G1: recharges the integrated two-zone kernel.
@ SubcatchAquifer
U3: recharges the containing subcatchment's aquifer.
int indexOfDefault(const MeshResult &mesh, const QString &tag)
Index of tag in MeshResult::infilDefaults, or -1.
Definition meshinfil.cpp:69
InfilRow starDefault(const MeshResult &mesh)
Convenience: the '*' row from mesh, or a None row when absent.
Definition meshinfil.cpp:76
int infilSlotForKey(InfilMethod method, const QByteArray &key)
Inverse of infilParamKey(): maps a registry key to the positional slot it occupies under method,...
Definition meshinfil.cpp:227
InfilMethod
Definition meshinfil.h:61
QString infilMethodLabel(InfilMethod m)
Translated UI label.
Definition meshinfil.cpp:292
QString infilDestToken(InfilDest d)
"LOST", …
Definition meshinfil.cpp:314
InfilMethod infilMethodFromToken(const QString &token, bool *ok=nullptr)
Definition meshinfil.cpp:270
QString infilMethodToken(InfilMethod m)
"HORTON", "CURVE_NUMBER", "NONE", …
Definition meshinfil.cpp:256
constexpr int kInfilMaxParams
Definition meshinfil.h:79
QString infilParamLabel(InfilMethod method, int slot)
Display label for positional slot slot under method, e.g. ("Horton", 0) → "Max Rate (f0)"....
Definition meshinfil.cpp:163
QStringList infilMethodLabels()
For EnumComboDelegate, in enum order.
Definition meshinfil.cpp:306
QByteArray infilParamKey(InfilMethod method, int slot)
Registry key for positional slot slot under method, e.g. "infil.f0". Empty when unused.
Definition meshinfil.cpp:193
const QVector< QByteArray > & infilParamKeys()
Every named parameter key, in registration order. The attribute table and the assign dialog iterate t...
Definition meshinfil.cpp:235
InfilProvenance
Definition meshinfil.h:127
@ Star
From the '*' default row.
@ None
No model resolves for this cell.
@ Override
From a per-cell override.
@ Tag
From a tag default row.
QString infilDestLabel(InfilDest d)
Definition meshinfil.cpp:338
QStringList infilDestLabels()
Definition meshinfil.cpp:348
InfilDest infilDestFromToken(const QString &token, bool *ok=nullptr)
Definition meshinfil.cpp:324
bool saveLookupTableCsv(const InfilLookupTable &table, const QString &path, QString *err)
CSV round-trip. Column order: key1[,key2],method,p0,p1,p2,p3,p4,dest, # comments, header row optional...
Definition meshinfil.cpp:458
bool infilUsesParam(InfilMethod method, int slot)
True when method uses positional slot slot.
Definition meshinfil.cpp:129
int path
Definition pslgminsize.cpp:234
One [2D_INFILTRATION_DEFAULTS] row. tag == "*" is the mesh-wide fallback and may appear anywhere in t...
Definition meshinfil.h:111
InfilRow row
Definition meshinfil.h:113
QString tag
Definition meshinfil.h:112
One row of a classified lookup: a key (or key pair, for the Curve-Number landuse×HSG case) mapping to...
Definition meshinfil.h:229
InfilRow row
Definition meshinfil.h:232
QString key2
Empty for single-key lookups.
Definition meshinfil.h:231
QString key1
Definition meshinfil.h:230
An editable, reusable classified lookup table. Saved/loaded as CSV so an agency's standard table trav...
Definition meshinfil.h:238
QString key2Label
Definition meshinfil.h:242
bool twoKey
Definition meshinfil.h:240
QVector< InfilLookupEntry > entries
Definition meshinfil.h:243
QString key1Label
Definition meshinfil.h:241
InfilRow fallback
Applied to unmatched keys.
Definition meshinfil.h:244
InfilRow lookup(const QString &k1, const QString &k2, bool *matched=nullptr) const
Definition meshinfil.cpp:395
QString name
Definition meshinfil.h:239
[2D_INFILTRATION_OPTIONS].
Definition meshinfil.h:118
double infilStep
Definition meshinfil.h:121
One infiltration specification: method + positional parameters + destination.
Definition meshinfil.h:98
InfilMethod method
Definition meshinfil.h:99
bool operator==(const InfilRow &o) const
Definition meshinfil.cpp:57
bool operator!=(const InfilRow &o) const
Definition meshinfil.h:105
double p[kInfilMaxParams]
Definition meshinfil.h:100
InfilDest dest
Definition meshinfil.h:101
bool isNone() const
Definition meshinfil.h:103
Result of resolving one triangle's infiltration.
Definition meshinfil.h:136
InfilProvenance provenance
Definition meshinfil.h:138
InfilRow row
Definition meshinfil.h:137
bool isOverride() const
Definition meshinfil.h:141
bool isInherited() const
Definition meshinfil.h:142
QString sourceTag
Tag that supplied it (Tag/Star only)
Definition meshinfil.h:139