Rerun C++ SDK
Loading...
Searching...
No Matches
channel_datatype.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/channel_datatype.fbs".
3
4#pragma once
5
6#include "../component_descriptor.hpp"
7#include "../result.hpp"
8
9#include <cstdint>
10#include <memory>
11
12namespace arrow {
13 /// \private
14 template <typename T>
15 class NumericBuilder;
16
17 class Array;
18 class DataType;
19 class UInt8Type;
20 using UInt8Builder = NumericBuilder<UInt8Type>;
21} // namespace arrow
22
23namespace rerun::datatypes {
24 /// **Datatype**: The innermost datatype of an image.
25 ///
26 /// How individual color channel components are encoded.
27 enum class ChannelDatatype : uint8_t {
28
29 /// 8-bit unsigned integer.
30 U8 = 6,
31
32 /// 8-bit signed integer.
33 I8 = 7,
34
35 /// 16-bit unsigned integer.
36 U16 = 8,
37
38 /// 16-bit signed integer.
39 I16 = 9,
40
41 /// 32-bit unsigned integer.
42 U32 = 10,
43
44 /// 32-bit signed integer.
45 I32 = 11,
46
47 /// 64-bit unsigned integer.
48 U64 = 12,
49
50 /// 64-bit signed integer.
51 I64 = 13,
52
53 /// 16-bit IEEE-754 floating point, also known as `half`.
54 F16 = 33,
55
56 /// 32-bit IEEE-754 floating point, also known as `float` or `single`.
57 F32 = 34,
58
59 /// 64-bit IEEE-754 floating point, also known as `double`.
60 F64 = 35,
61 };
62} // namespace rerun::datatypes
63
64namespace rerun {
65 template <typename T>
66 struct Loggable;
67
68 /// \private
69 template <>
70 struct Loggable<datatypes::ChannelDatatype> {
71 static constexpr ComponentDescriptor Descriptor = "rerun.datatypes.ChannelDatatype";
72
73 /// Returns the arrow data type this type corresponds to.
74 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
75
76 /// Serializes an array of `rerun::datatypes::ChannelDatatype` into an arrow array.
77 static Result<std::shared_ptr<arrow::Array>> to_arrow(
78 const datatypes::ChannelDatatype* instances, size_t num_instances
79 );
80
81 /// Fills an arrow array builder with an array of this type.
82 static rerun::Error fill_arrow_array_builder(
83 arrow::UInt8Builder* builder, const datatypes::ChannelDatatype* elements,
84 size_t num_elements
85 );
86 };
87} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:95
All built-in datatypes. See Types in the Rerun manual.
Definition rerun.hpp:83
ChannelDatatype
Datatype: The innermost datatype of an image.
Definition channel_datatype.hpp:27
@ F64
64-bit IEEE-754 floating point, also known as double.
@ U64
64-bit unsigned integer.
@ F32
32-bit IEEE-754 floating point, also known as float or single.
@ F16
16-bit IEEE-754 floating point, also known as half.
@ I8
8-bit signed integer.
@ U8
8-bit unsigned integer.
@ I16
16-bit signed integer.
@ U32
32-bit unsigned integer.
@ I32
32-bit signed integer.
@ I64
64-bit signed integer.
@ U16
16-bit unsigned integer.
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23