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