Rerun C++ SDK
Loading...
Searching...
No Matches
range1d.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/datatypes/range1d.fbs".
3
4#pragma once
5
6#include "../result.hpp"
7
8#include <array>
9#include <cstdint>
10#include <memory>
11
12namespace arrow {
13 class Array;
14 class DataType;
15 class FixedSizeListBuilder;
16} // namespace arrow
17
18namespace rerun::datatypes {
19 /// **Datatype**: A 1D range, specifying a lower and upper bound.
20 struct Range1D {
21 std::array<double, 2> range;
22
23 public:
24 Range1D() = default;
25
26 Range1D(std::array<double, 2> range_) : range(range_) {}
27
28 Range1D& operator=(std::array<double, 2> range_) {
29 range = range_;
30 return *this;
31 }
32 };
33} // namespace rerun::datatypes
34
35namespace rerun {
36 template <typename T>
37 struct Loggable;
38
39 /// \private
40 template <>
41 struct Loggable<datatypes::Range1D> {
42 static constexpr const char Name[] = "rerun.datatypes.Range1D";
43
44 /// Returns the arrow data type this type corresponds to.
45 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
46
47 /// Serializes an array of `rerun::datatypes::Range1D` into an arrow array.
49 const datatypes::Range1D* instances, size_t num_instances
50 );
51
52 /// Fills an arrow array builder with an array of this type.
53 static rerun::Error fill_arrow_array_builder(
54 arrow::FixedSizeListBuilder* builder, const datatypes::Range1D* elements,
55 size_t num_elements
56 );
57 };
58} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:88
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:78
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
Datatype: A 1D range, specifying a lower and upper bound.
Definition range1d.hpp:20