Rerun C++ SDK
Loading...
Searching...
No Matches
tensor_dimension_index_slider.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/tensor_dimension_index_slider.fbs".
3
4#pragma once
5
6#include "../../blueprint/datatypes/tensor_dimension_index_slider.hpp"
7#include "../../component_descriptor.hpp"
8#include "../../result.hpp"
9
10#include <cstdint>
11#include <memory>
12
13namespace rerun::blueprint::components {
14 /// **Component**: Show a slider for the index of some dimension of a slider.
15 ///
16 /// ⚠ **This type is _unstable_ and may change significantly in a way that the data won't be backwards compatible.**
17 ///
20
21 public:
23
26 )
27 : selection(selection_) {}
28
31 ) {
32 selection = selection_;
33 return *this;
34 }
35
36 TensorDimensionIndexSlider(uint32_t dimension_) : selection(dimension_) {}
37
38 TensorDimensionIndexSlider& operator=(uint32_t dimension_) {
39 selection = dimension_;
40 return *this;
41 }
42
43 /// Cast to the underlying TensorDimensionIndexSlider datatype
45 return selection;
46 }
47 };
48} // namespace rerun::blueprint::components
49
50namespace rerun {
51 static_assert(
54 );
55
56 /// \private
57 template <>
58 struct Loggable<blueprint::components::TensorDimensionIndexSlider> {
59 static constexpr ComponentDescriptor Descriptor =
60 "rerun.blueprint.components.TensorDimensionIndexSlider";
61
62 /// Returns the arrow data type this type corresponds to.
63 static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
64 return Loggable<
66 }
67
68 /// Serializes an array of `rerun::blueprint:: components::TensorDimensionIndexSlider` into an arrow array.
69 static Result<std::shared_ptr<arrow::Array>> to_arrow(
70 const blueprint::components::TensorDimensionIndexSlider* instances, size_t num_instances
71 ) {
72 if (num_instances == 0) {
73 return Loggable<rerun::blueprint::datatypes::TensorDimensionIndexSlider>::to_arrow(
74 nullptr,
75 0
76 );
77 } else if (instances == nullptr) {
78 return rerun::Error(
79 ErrorCode::UnexpectedNullArgument,
80 "Passed array instances is null when num_elements> 0."
81 );
82 } else {
83 return Loggable<rerun::blueprint::datatypes::TensorDimensionIndexSlider>::to_arrow(
84 &instances->selection,
85 num_instances
86 );
87 }
88 }
89 };
90} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:99
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: Show a slider for the index of some dimension of a slider.
Definition tensor_dimension_index_slider.hpp:18
Datatype: Defines a slider for the index of some dimension.
Definition tensor_dimension_index_slider.hpp:23