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/build/re_type_definitions/rerun/blueprint/encodings/visualizer_component_mapping.def.rs".
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::encodings {
23 /// **Encoding**: 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 /// Selecting a source component that is not found on the entity is an error.
31 SourceComponent = 1,
32
33 /// Use a timeless override value that is defined in the blueprint.
34 ///
35 /// The override value is stored on the same entity as the visualizer instruction
36 /// and uses the `target` as its component name.
37 ///
38 /// Selecting this source without an override value for the target component is an error.
39 Override = 2,
40
41 /// Default as specified on the view's blueprint.
42 ///
43 /// If the view doesn't specify a default for the target component name,
44 /// a heuristically determined value will be used instead.
45 Default = 3,
46
47 /// Resolve the value from class and keypoint IDs using the recording's annotation context.
48 ///
49 /// If the annotation context does not provide a value, default values are used instead.
50 /// (Any overlapping recording values for the target component are ignored.)
51 ///
52 /// This is only available for visualizers that support annotation context.
53 /// Selecting it for an unsupported component is an error.
54 AnnotationContext = 4,
55 };
56} // namespace rerun::blueprint::encodings
57
58namespace rerun {
59 template <typename T>
60 struct Loggable;
61
62 /// \private
63 template <>
64 struct Loggable<blueprint::encodings::ComponentSourceKind> {
65 static constexpr std::string_view ComponentType =
66 "rerun.blueprint.encodings.ComponentSourceKind";
67
68 /// Returns the arrow data type this type corresponds to.
69 static const std::shared_ptr<arrow::DataType>& arrow_data_type();
70
71 /// Serializes an array of `rerun::blueprint:: encodings::ComponentSourceKind` into an arrow array.
72 static Result<std::shared_ptr<arrow::Array>> to_arrow(
73 const blueprint::encodings::ComponentSourceKind* instances, size_t num_instances
74 );
75
76 /// Fills an arrow array builder with an array of this type.
77 static rerun::Error fill_arrow_array_builder(
78 arrow::UInt8Builder* builder, const blueprint::encodings::ComponentSourceKind* elements,
79 size_t num_elements
80 );
81 };
82} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:104
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:26