Rerun C++ SDK
Loading...
Searching...
No Matches
scalar.hpp
1// DO NOT EDIT! This file was auto-generated by crates/re_types_builder/src/codegen/cpp/mod.rs
2// Based on "crates/re_types/definitions/rerun/components/scalar.fbs".
3
4#pragma once
5
6#include "../result.hpp"
7
8#include <cstdint>
9#include <memory>
10
11namespace arrow {
12 /// \private
13 template <typename T>
14 class NumericBuilder;
15
16 class Array;
17 class DataType;
18 class DoubleType;
19 using DoubleBuilder = NumericBuilder<DoubleType>;
20} // namespace arrow
21
22namespace rerun::components {
23 /// **Component**: A double-precision scalar.
24 ///
25 /// Used for time series plots.
26 struct Scalar {
27 double value;
28
29 public:
30 Scalar() = default;
31
32 Scalar(double value_) : value(value_) {}
33
34 Scalar& operator=(double value_) {
35 value = value_;
36 return *this;
37 }
38 };
39} // namespace rerun::components
40
41namespace rerun {
42 template <typename T>
43 struct Loggable;
44
45 /// \private
46 template <>
47 struct Loggable<components::Scalar> {
48 static constexpr const char Name[] = "rerun.components.Scalar";
49
50 /// Returns the arrow data type this type corresponds to.
51 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
52
53 /// Serializes an array of `rerun::components::Scalar` into an arrow array.
55 const components::Scalar* instances, size_t num_instances
56 );
57
58 /// Fills an arrow array builder with an array of this type.
59 static rerun::Error fill_arrow_array_builder(
60 arrow::DoubleBuilder* builder, const components::Scalar* elements, size_t num_elements
61 );
62 };
63} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:89
A class for representing either a usable value, or an error.
Definition result.hpp:14
All built-in components. See Types in the Rerun manual.
Definition rerun.hpp:75
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:21
The Loggable trait is used by all built-in implementation of rerun::AsComponents to serialize a colle...
Definition loggable.hpp:11
Archetype: Log a double-precision scalar.
Definition scalar.hpp:50
Component: A double-precision scalar.
Definition scalar.hpp:26