An editable, reusable classified lookup table. More...
#include <mesh/meshinfil.h>
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. | |
An editable, reusable classified lookup table.
Saved/loaded as CSV so an agency's standard table travels between projects.
| 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.
| [in] | k1 | Borrowed first key, compared without trimming, unchanged. |
| [in] | k2 | Borrowed second key, used only when twoKey is true; unchanged. |
| [out] | matched | Optional borrowed flag, true for an entry hit and false for fallback. |
Lookup with fallback. matched receives whether a real entry hit.
| QVector<InfilLookupEntry> mesh::InfilLookupTable::entries |
Searched in order; the first match wins.
| InfilRow mesh::InfilLookupTable::fallback |
Applied to unmatched keys.
| QString mesh::InfilLookupTable::key1Label |
Caption of the first key column (CSV # KEY1:)
| QString mesh::InfilLookupTable::key2Label |
Caption of the second key column (CSV # KEY2:), two-key only.
| QString mesh::InfilLookupTable::name |
Display name (CSV # NAME:); the loader falls back to the file basename.
| bool mesh::InfilLookupTable::twoKey = false |
True: entries match key1 AND key2; false: key2 is ignored.