Rerun C++ SDK
Loading...
Searching...
No Matches
visualizer_component_mapping.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/components/visualizer_component_mapping.fbs".
3
4#pragma once
5
6#include "../../blueprint/datatypes/visualizer_component_mapping.hpp"
7#include "../../result.hpp"
8
9#include <cstdint>
10#include <memory>
11#include <utility>
12
13namespace rerun::blueprint::components {
14 /// **Component**: Associates components of an entity to components of a visualizer.
15 ///
16 /// ⚠ **This type is _unstable_ and may change significantly in a way that the data won't be backwards compatible.**
17 ///
19 /// The component mapping pairs.
21
22 public:
24
26 : mapping(std::move(mapping_)) {}
27
30 ) {
31 mapping = std::move(mapping_);
32 return *this;
33 }
34
35 /// Cast to the underlying VisualizerComponentMapping datatype
37 return mapping;
38 }
39 };
40} // namespace rerun::blueprint::components
41
42namespace rerun {
43 static_assert(
46 );
47
48 /// \private
49 template <>
50 struct Loggable<blueprint::components::VisualizerComponentMapping> {
51 static constexpr std::string_view ComponentType =
52 "rerun.blueprint.components.VisualizerComponentMapping";
53
54 /// Returns the arrow data type this type corresponds to.
55 static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
56 return Loggable<
58 }
59
60 /// Serializes an array of `rerun::blueprint:: components::VisualizerComponentMapping` into an arrow array.
61 static Result<std::shared_ptr<arrow::Array>> to_arrow(
62 const blueprint::components::VisualizerComponentMapping* instances, size_t num_instances
63 ) {
64 if (num_instances == 0) {
65 return Loggable<rerun::blueprint::datatypes::VisualizerComponentMapping>::to_arrow(
66 nullptr,
67 0
68 );
69 } else if (instances == nullptr) {
70 return rerun::Error(
71 ErrorCode::UnexpectedNullArgument,
72 "Passed array instances is null when num_elements> 0."
73 );
74 } else {
75 return Loggable<rerun::blueprint::datatypes::VisualizerComponentMapping>::to_arrow(
76 &instances->mapping,
77 num_instances
78 );
79 }
80 }
81 };
82} // 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
A type of component that can be registered.
Definition component_type.hpp:19
The Loggable trait is used by all built-in implementation of rerun::AsComponents to serialize a colle...
Definition loggable.hpp:11
Component: Associates components of an entity to components of a visualizer.
Definition visualizer_component_mapping.hpp:18
rerun::blueprint::datatypes::VisualizerComponentMapping mapping
The component mapping pairs.
Definition visualizer_component_mapping.hpp:20
Datatype: Associate components of an entity to components of a visualizer.
Definition visualizer_component_mapping.hpp:25