Rerun C++ SDK
Loading...
Searching...
No Matches
class_description_map_elem.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/class_description_map_elem.fbs".
3
4#pragma once
5
6#include "../result.hpp"
7#include "class_description.hpp"
8#include "class_id.hpp"
9
10#include <cstdint>
11#include <memory>
12
13namespace arrow {
14 class Array;
15 class DataType;
16 class StructBuilder;
17} // namespace arrow
18
19namespace rerun::datatypes {
20 /// **Datatype**: A helper type for mapping class IDs to class descriptions.
21 ///
22 /// This is internal to the `AnnotationContext` structure.
24 /// The key: the class ID.
26
27 /// The value: class name, color, etc.
29
30 public:
31 // Extensions to generated type defined in 'class_description_map_elem_ext.cpp'
32
34 : class_id(_class_description.info.id),
35 class_description(std::move(_class_description)) {}
36
37 public:
38 ClassDescriptionMapElem() = default;
39 };
40} // namespace rerun::datatypes
41
42namespace rerun {
43 template <typename T>
44 struct Loggable;
45
46 /// \private
47 template <>
48 struct Loggable<datatypes::ClassDescriptionMapElem> {
49 static constexpr const char Name[] = "rerun.datatypes.ClassDescriptionMapElem";
50
51 /// Returns the arrow data type this type corresponds to.
52 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
53
54 /// Fills an arrow array builder with an array of this type.
55 static rerun::Error fill_arrow_array_builder(
56 arrow::StructBuilder* builder, const datatypes::ClassDescriptionMapElem* elements,
57 size_t num_elements
58 );
59
60 /// Serializes an array of `rerun::datatypes::ClassDescriptionMapElem` into an arrow array.
61 static Result<std::shared_ptr<arrow::Array>> to_arrow(
62 const datatypes::ClassDescriptionMapElem* instances, size_t num_instances
63 );
64 };
65} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:87
All built-in datatypes. See Types in the Rerun manual.
Definition rerun.hpp:72
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:20
Datatype: A helper type for mapping class IDs to class descriptions.
Definition class_description_map_elem.hpp:23
rerun::datatypes::ClassDescription class_description
The value: class name, color, etc.
Definition class_description_map_elem.hpp:28
rerun::datatypes::ClassId class_id
The key: the class ID.
Definition class_description_map_elem.hpp:25
Datatype: The description of a semantic Class.
Definition class_description.hpp:35
Datatype: A 16-bit ID representing a type of semantic class.
Definition class_id.hpp:24