Loading...
Searching...
No Matches
mesh::InfilLookupTable Struct Reference

An editable, reusable classified lookup table. More...

#include <mesh/meshinfil.h>

Collaboration diagram for mesh::InfilLookupTable:

Public Member Functions

InfilRow lookup (const QString &k1, const QString &k2, bool *matched=nullptr) const
 Copy the first classified entry matching one or two case-insensitive keys.
 

Public Attributes

QString name
 Display name (CSV # NAME:); the loader falls back to the file basename.
 
bool twoKey = false
 True: entries match key1 AND key2; false: key2 is ignored.
 
QString key1Label
 Caption of the first key column (CSV # KEY1:)
 
QString key2Label
 Caption of the second key column (CSV # KEY2:), two-key only.
 
QVector< InfilLookupEntry > entries
 Searched in order; the first match wins.
 
InfilRow fallback
 Applied to unmatched keys.
 

Detailed Description

An editable, reusable classified lookup table.

Saved/loaded as CSV so an agency's standard table travels between projects.

Member Function Documentation

◆ lookup()

InfilRow mesh::InfilLookupTable::lookup ( const QString & k1,
const QString & k2,
bool * matched = nullptr ) const

Copy the first classified entry matching one or two case-insensitive keys.

Parameters
[in]k1Borrowed first key, compared without trimming, unchanged.
[in]k2Borrowed second key, used only when twoKey is true; unchanged.
[out]matchedOptional borrowed flag, true for an entry hit and false for fallback.
Returns
Owned matching InfilRow or fallback, retaining project-unit values exactly. Entries are searched in order; duplicates select first, and literal * has no special matching behavior here. No validation, interpolation, unit conversion, source mutation or pointer retention.

Lookup with fallback. matched receives whether a real entry hit.

Member Data Documentation

◆ entries

QVector<InfilLookupEntry> mesh::InfilLookupTable::entries

Searched in order; the first match wins.

◆ fallback

InfilRow mesh::InfilLookupTable::fallback

Applied to unmatched keys.

◆ key1Label

QString mesh::InfilLookupTable::key1Label

Caption of the first key column (CSV # KEY1:)

◆ key2Label

QString mesh::InfilLookupTable::key2Label

Caption of the second key column (CSV # KEY2:), two-key only.

◆ name

QString mesh::InfilLookupTable::name

Display name (CSV # NAME:); the loader falls back to the file basename.

◆ twoKey

bool mesh::InfilLookupTable::twoKey = false

True: entries match key1 AND key2; false: key2 is ignored.


The documentation for this struct was generated from the following files: