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