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 "../../component_descriptor.hpp"
9#include "../../result.hpp"
10
11#include <cstdint>
12#include <memory>
13#include <string>
14#include <utility>
15
16namespace rerun::blueprint::components {
17 /// **Component**: Override the visualizers for an entity.
18 ///
19 /// This component is a stop-gap mechanism based on the current implementation details
20 /// of the visualizer system. It is not intended to be a long-term solution, but provides
21 /// enough utility to be useful in the short term.
22 ///
23 /// The long-term solution is likely to be based off: <https://github.com/rerun-io/rerun/issues/6626>
24 ///
25 /// This can only be used as part of blueprints. It will have no effect if used
26 /// in a regular entity.
28 /// Names of the visualizers that should be active.
30
31 public:
32 VisualizerOverrides() = default;
33
35 : visualizers(std::move(visualizers_)) {}
36
38 visualizers = std::move(visualizers_);
39 return *this;
40 }
41
42 VisualizerOverrides(rerun::Collection<std::string> value_)
43 : visualizers(std::move(value_)) {}
44
45 VisualizerOverrides& operator=(rerun::Collection<std::string> value_) {
46 visualizers = std::move(value_);
47 return *this;
48 }
49
50 /// Cast to the underlying Utf8List datatype
52 return visualizers;
53 }
54 };
55} // namespace rerun::blueprint::components
56
57namespace rerun {
58 static_assert(
61 );
62
63 /// \private
64 template <>
65 struct Loggable<blueprint::components::VisualizerOverrides> {
66 static constexpr ComponentDescriptor Descriptor =
67 "rerun.blueprint.components.VisualizerOverrides";
68
69 /// Returns the arrow data type this type corresponds to.
70 static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
72 }
73
74 /// Serializes an array of `rerun::blueprint:: components::VisualizerOverrides` into an arrow array.
75 static Result<std::shared_ptr<arrow::Array>> to_arrow(
76 const blueprint::components::VisualizerOverrides* instances, size_t num_instances
77 ) {
78 if (num_instances == 0) {
79 return Loggable<rerun::blueprint::datatypes::Utf8List>::to_arrow(nullptr, 0);
80 } else if (instances == nullptr) {
81 return rerun::Error(
82 ErrorCode::UnexpectedNullArgument,
83 "Passed array instances is null when num_elements> 0."
84 );
85 } else {
86 return Loggable<rerun::blueprint::datatypes::Utf8List>::to_arrow(
87 &instances->visualizers,
88 num_instances
89 );
90 }
91 }
92 };
93} // 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:96
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
A ComponentDescriptor fully describes the semantics of a column of data.
Definition component_descriptor.hpp:14
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:27
rerun::blueprint::datatypes::Utf8List visualizers
Names of the visualizers that should be active.
Definition visualizer_overrides.hpp:29
Datatype: A list of strings of text, encoded as UTF-8.
Definition utf8list.hpp:23