Rerun C++ SDK
Loading...
Searching...
No Matches
key_value_pairs.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/components/key_value_pairs.fbs".
3
4#pragma once
5
6#include "../collection.hpp"
7#include "../datatypes/utf8pair.hpp"
8#include "../result.hpp"
9
10#include <cstdint>
11#include <memory>
12#include <utility>
13
14namespace arrow {
15 class Array;
16 class DataType;
17 class ListBuilder;
18} // namespace arrow
19
20namespace rerun::components {
21 /// **Component**: A map of string keys to string values.
22 ///
23 /// This component can be used to attach arbitrary metadata or annotations to entities.
24 /// Each key-value pair is stored as a UTF-8 string mapping.
25 ///
26 /// ⚠ **This type is _unstable_ and may change significantly in a way that the data won't be backwards compatible.**
27 ///
29 /// The key-value pairs that make up this string map.
31
32 public:
33 KeyValuePairs() = default;
34
36 : pairs(std::move(pairs_)) {}
37
39 pairs = std::move(pairs_);
40 return *this;
41 }
42 };
43} // namespace rerun::components
44
45namespace rerun {
46 template <typename T>
47 struct Loggable;
48
49 /// \private
50 template <>
51 struct Loggable<components::KeyValuePairs> {
52 static constexpr std::string_view ComponentType = "rerun.components.KeyValuePairs";
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::components::KeyValuePairs` into an arrow array.
58 static Result<std::shared_ptr<arrow::Array>> to_arrow(
59 const components::KeyValuePairs* 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::ListBuilder* builder, const components::KeyValuePairs* elements,
65 size_t num_elements
66 );
67 };
68} // namespace rerun
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:49
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:103
All built-in components. See Types in the Rerun manual.
Definition rerun.hpp:79
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
Component: A map of string keys to string values.
Definition key_value_pairs.hpp:28
rerun::Collection< rerun::datatypes::Utf8Pair > pairs
The key-value pairs that make up this string map.
Definition key_value_pairs.hpp:30