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

Function dispatchNumericKind

pj_datastore/src/chunk.cpp:23–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21// Returns true if kind is numeric (kFloat32..kUint64), false for kBool/kString.
22template <typename F>
23bool dispatchNumericKind(StorageKind kind, F&& fn) {
24 switch (kind) {
25 case StorageKind::kFloat32:
26 fn(static_cast<const float*>(nullptr));
27 return true;
28 case StorageKind::kFloat64:
29 fn(static_cast<const double*>(nullptr));
30 return true;
31 case StorageKind::kInt32:
32 fn(static_cast<const int32_t*>(nullptr));
33 return true;
34 case StorageKind::kInt64:
35 fn(static_cast<const int64_t*>(nullptr));
36 return true;
37 case StorageKind::kUint64:
38 fn(static_cast<const uint64_t*>(nullptr));
39 return true;
40 default:
41 return false;
42 }
43}
44
45// Read a raw numeric value from a buffer, dispatching on StorageKind.
46template <typename R>

Callers 3

readRawAsFunction · 0.85
readColumnAsDoublesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected