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`.
24 ///
25 /// ⚠ **This type is _unstable_ and may change significantly in a way that the data won't be backwards compatible.**
26 ///
28 /// The key: the `components::ClassId`.
30
31 /// The value: class name, color, etc.
33
34 public: // START of extensions from class_description_map_elem_ext.cpp:
36 : class_id(_class_description.info.id),
37 class_description(std::move(_class_description)) {}
38
39 // END of extensions from class_description_map_elem_ext.cpp, start of generated code:
40
41 public:
42 ClassDescriptionMapElem() = default;
43 };
44} // namespace rerun::datatypes
45
46namespace rerun {
47 template <typename T>
48 struct Loggable;
49
50 /// \private
51 template <>
52 struct Loggable<datatypes::ClassDescriptionMapElem> {
53 static constexpr ComponentDescriptor Descriptor = "rerun.datatypes.ClassDescriptionMapElem";
54
55 /// Returns the arrow data type this type corresponds to.
56 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
57
58 /// Serializes an array of `rerun::datatypes::ClassDescriptionMapElem` into an arrow array.
59 static Result<std::shared_ptr<arrow::Array>> to_arrow(
60 const datatypes::ClassDescriptionMapElem* instances, size_t num_instances
61 );
62
63 /// Fills an arrow array builder with an array of this type.
64 static rerun::Error fill_arrow_array_builder(
65 arrow::StructBuilder* builder, const datatypes::ClassDescriptionMapElem* elements,
66 size_t num_elements
67 );
68 };
69} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:99
All built-in datatypes. See Types in the Rerun manual.
Definition rerun.hpp:82
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:27
rerun::datatypes::ClassDescription class_description
The value: class name, color, etc.
Definition class_description_map_elem.hpp:32
rerun::datatypes::ClassId class_id
The key: the components::ClassId.
Definition class_description_map_elem.hpp:29
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