| 79 | } |
| 80 | |
| 81 | [[nodiscard]] CurveDescriptor curveFromItem(const CatalogItem& item) { |
| 82 | const auto* scalar = asScalarField(item); |
| 83 | Q_ASSERT(scalar != nullptr); // Precondition: caller verified isScalarField(item). |
| 84 | return CurveDescriptor{ |
| 85 | .name = item.key, |
| 86 | .dataset_name = item.dataset_name, |
| 87 | .topic_name = item.topic_name, |
| 88 | .field_name = scalar->field_name, |
| 89 | .topic_id = scalar->topic_id, |
| 90 | .dataset_id = item.dataset_id, |
| 91 | .column_index = scalar->column_index, |
| 92 | .field_path = scalar->field_path, |
| 93 | }; |
| 94 | } |
| 95 | |
| 96 | [[nodiscard]] bool catalogItemLess(const CatalogItem& lhs, const CatalogItem& rhs) { |
| 97 | if (lhs.dataset_id != rhs.dataset_id) { |
no test coverage detected