Rerun C++ SDK
Loading...
Searching...
No Matches
range1d.hpp
1// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
2// Based on "crates/store/re_types/definitions/rerun/datatypes/range1d.fbs".
3
4#pragma once
5
6#include "../component_descriptor.hpp"
7#include "../result.hpp"
8
9#include <array>
10#include <cstdint>
11#include <memory>
12
13namespace arrow {
14 class Array;
15 class DataType;
16 class FixedSizeListBuilder;
17} // namespace arrow
18
19namespace rerun::datatypes {
20 /// **Datatype**: A 1D range, specifying a lower and upper bound.
21 struct Range1D {
22 std::array<double, 2> range;
23
24 public:
25 Range1D() = default;
26
27 Range1D(std::array<double, 2> range_) : range(range_) {}
28
29 Range1D& operator=(std::array<double, 2> range_) {
30 range = range_;
31 return *this;
32 }
33 };
34} // namespace rerun::datatypes
35
36namespace rerun {
37 template <typename T>
38 struct Loggable;
39
40 /// \private
41 template <>
42 struct Loggable<datatypes::Range1D> {
43 static constexpr ComponentDescriptor Descriptor = "rerun.datatypes.Range1D";
44
45 /// Returns the arrow data type this type corresponds to.
46 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
47
48 /// Serializes an array of `rerun::datatypes::Range1D` into an arrow array.
50 const datatypes::Range1D* instances, size_t num_instances
51 );
52
53 /// Fills an arrow array builder with an array of this type.
54 static rerun::Error fill_arrow_array_builder(
55 arrow::FixedSizeListBuilder* builder, const datatypes::Range1D* elements,
56 size_t num_elements
57 );
58 };
59} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:95
A class for representing either a usable value, or an error.
Definition result.hpp:14
All built-in datatypes. See Types in the Rerun manual.
Definition rerun.hpp:83
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
A ComponentDescriptor fully describes the semantics of a column of data.
Definition component_descriptor.hpp:13
The Loggable trait is used by all built-in implementation of rerun::AsComponents to serialize a colle...
Definition loggable.hpp:11
Datatype: A 1D range, specifying a lower and upper bound.
Definition range1d.hpp:21