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

Function keyForTopic

pj_plotting/tests/plot_widget_replace_curve_test.cpp:35–42  ·  view source on GitHub ↗

Catalog key (opaque "dataset:N/topic:M/column:K") for a given topic id.

Source from the content-addressed store, hash-verified

33
34// Catalog key (opaque "dataset:N/topic:M/column:K") for a given topic id.
35QString keyForTopic(PJ::CatalogModel& catalog, PJ::TopicId topic_id) {
36 for (const auto& curve : catalog.curves()) {
37 if (const auto descriptor = catalog.curveDescriptor(curve.name); descriptor && descriptor->topic_id == topic_id) {
38 return curve.name;
39 }
40 }
41 return {};
42}
43
44} // namespace
45

Callers 1

TESTFunction · 0.70

Calls 2

curvesMethod · 0.80
curveDescriptorMethod · 0.80

Tested by

no test coverage detected