Rerun C++ SDK
Loading...
Searching...
No Matches
component_source_kind.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_sdk_types/definitions/rerun/blueprint/datatypes/visualizer_component_mapping.fbs".
3
4#pragma once
5
6#include "../../result.hpp"
7
8#include <cstdint>
9#include <memory>
10
11namespace arrow {
12 /// \private
13 template <typename T>
14 class NumericBuilder;
15
16 class Array;
17 class DataType;
18 class UInt8Type;
19 using UInt8Builder = NumericBuilder<UInt8Type>;
20} // namespace arrow
21
22namespace rerun::blueprint::datatypes {
23 /// **Datatype**: What kind of source to use for a visualizer component mapping.
24 enum class ComponentSourceKind : uint8_t {
25
26 /// Use an explicit selection defined by `source_component`.
27 ///
28 /// May or may not make use of a selector string.
29 ///
30 /// If the source component is not found on the entity,
31 /// a heuristically determined value will be used instead.
32 SourceComponent = 1,
33
34 /// Use a timeless override value that is defined in the blueprint.
35 ///
36 /// The override value is stored on the same entity as the visualizer instruction
37 /// and uses the `target` as its component name.
38 ///
39 /// If there is no override value with the target component name,
40 /// a heuristically determined value will be used instead.
41 Override = 2,
42
43 /// Default as specified on the view's blueprint.
44 ///
45 /// If the view doesn't specify a default for the target component name,
46 /// a heuristically determined value will be used instead.
47 Default = 3,
48 };
49} // namespace rerun::blueprint::datatypes
50
51namespace rerun {
52 template <typename T>
53 struct Loggable;
54
55 /// \private
56 template <>
57 struct Loggable<blueprint::datatypes::ComponentSourceKind> {
58 static constexpr std::string_view ComponentType =
59 "rerun.blueprint.datatypes.ComponentSourceKind";
60
61 /// Returns the arrow data type this type corresponds to.
62 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
63
64 /// Serializes an array of `rerun::blueprint:: datatypes::ComponentSourceKind` into an arrow array.
65 static Result<std::shared_ptr<arrow::Array>> to_arrow(
66 const blueprint::datatypes::ComponentSourceKind* instances, size_t num_instances
67 );
68
69 /// Fills an arrow array builder with an array of this type.
70 static rerun::Error fill_arrow_array_builder(
71 arrow::UInt8Builder* builder, const blueprint::datatypes::ComponentSourceKind* elements,
72 size_t num_elements
73 );
74 };
75} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:103
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23