MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / curveFromItem

Function curveFromItem

pj_runtime/src/CatalogModel.cpp:81–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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) {

Callers 3

curvesMethod · 0.85
curveDescriptorMethod · 0.85
descriptorForPathMethod · 0.85

Calls 1

asScalarFieldFunction · 0.85

Tested by

no test coverage detected