Rerun C++ SDK
Loading...
Searching...
No Matches
visualizer_overrides.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/blueprint/components/visualizer_overrides.fbs".
3
4#pragma once
5
6#include "../../blueprint/datatypes/utf8list.hpp"
7#include "../../collection.hpp"
8#include "../../result.hpp"
9
10#include <cstdint>
11#include <memory>
12#include <string>
13#include <utility>
14
15namespace rerun::blueprint::components {
16 /// **Component**: Override the visualizers for an entity.
17 ///
18 /// This component is a stop-gap mechanism based on the current implementation details
19 /// of the visualizer system. It is not intended to be a long-term solution, but provides
20 /// enough utility to be useful in the short term.
21 ///
22 /// The long-term solution is likely to be based off: <https://github.com/rerun-io/rerun/issues/6626>
23 ///
24 /// This can only be used as part of blueprints. It will have no effect if used
25 /// in a regular entity.
27 /// Names of the visualizers that should be active.
28 ///
29 /// The built-in visualizers are:
30 /// - `BarChart`
31 /// - `Arrows2D`
32 /// - `Arrows3D`
33 /// - `Asset3D`
34 /// - `Boxes2D`
35 /// - `Boxes3D`
36 /// - `Cameras`
37 /// - `DepthImage`
38 /// - `Image`
39 /// - `Lines2D`
40 /// - `Lines3D`
41 /// - `Mesh3D`
42 /// - `Points2D`
43 /// - `Points3D`
44 /// - `Transform3DArrows`
45 /// - `Tensor`
46 /// - `TextDocument`
47 /// - `TextLog`
48 /// - `SegmentationImage`
49 /// - `SeriesLine`
50 /// - `SeriesPoint`
52
53 public:
54 VisualizerOverrides() = default;
55
57 : visualizers(std::move(visualizers_)) {}
58
60 visualizers = std::move(visualizers_);
61 return *this;
62 }
63
64 VisualizerOverrides(rerun::Collection<std::string> value_)
65 : visualizers(std::move(value_)) {}
66
67 VisualizerOverrides& operator=(rerun::Collection<std::string> value_) {
68 visualizers = std::move(value_);
69 return *this;
70 }
71
72 /// Cast to the underlying Utf8List datatype
74 return visualizers;
75 }
76 };
77} // namespace rerun::blueprint::components
78
79namespace rerun {
80 static_assert(
83 );
84
85 /// \private
86 template <>
87 struct Loggable<blueprint::components::VisualizerOverrides> {
88 static constexpr const char Name[] = "rerun.blueprint.components.VisualizerOverrides";
89
90 /// Returns the arrow data type this type corresponds to.
91 static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
93 }
94
95 /// Serializes an array of `rerun::blueprint:: components::VisualizerOverrides` into an arrow array.
96 static Result<std::shared_ptr<arrow::Array>> to_arrow(
97 const blueprint::components::VisualizerOverrides* instances, size_t num_instances
98 ) {
99 if (num_instances == 0) {
100 return Loggable<rerun::blueprint::datatypes::Utf8List>::to_arrow(nullptr, 0);
101 } else if (instances == nullptr) {
102 return rerun::Error(
103 ErrorCode::UnexpectedNullArgument,
104 "Passed array instances is null when num_elements> 0."
105 );
106 } else {
107 return Loggable<rerun::blueprint::datatypes::Utf8List>::to_arrow(
108 &instances->visualizers,
109 num_instances
110 );
111 }
112 }
113 };
114} // 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:95
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:22
The Loggable trait is used by all built-in implementation of rerun::AsComponents to serialize a colle...
Definition loggable.hpp:11
Component: Override the visualizers for an entity.
Definition visualizer_overrides.hpp:26
rerun::blueprint::datatypes::Utf8List visualizers
Names of the visualizers that should be active.
Definition visualizer_overrides.hpp:51
Datatype: A list of strings of text, encoded as UTF-8.
Definition utf8list.hpp:22