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.
17
18 public:
20
23 )
24 : selection(selection_) {}
25
28 ) {
29 selection = selection_;
30 return *this;
31 }
32
33 TensorDimensionIndexSlider(uint32_t dimension_) : selection(dimension_) {}
34
35 TensorDimensionIndexSlider& operator=(uint32_t dimension_) {
36 selection = dimension_;
37 return *this;
38 }
39
40 /// Cast to the underlying TensorDimensionIndexSlider datatype
42 return selection;
43 }
44 };
45} // namespace rerun::blueprint::components
46
47namespace rerun {
48 static_assert(
51 );
52
53 /// \private
54 template <>
55 struct Loggable<blueprint::components::TensorDimensionIndexSlider> {
56 static constexpr ComponentDescriptor Descriptor =
57 "rerun.blueprint.components.TensorDimensionIndexSlider";
58
59 /// Returns the arrow data type this type corresponds to.
60 static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
61 return Loggable<
63 }
64
65 /// Serializes an array of `rerun::blueprint:: components::TensorDimensionIndexSlider` into an arrow array.
66 static Result<std::shared_ptr<arrow::Array>> to_arrow(
67 const blueprint::components::TensorDimensionIndexSlider* instances, size_t num_instances
68 ) {
69 if (num_instances == 0) {
70 return Loggable<rerun::blueprint::datatypes::TensorDimensionIndexSlider>::to_arrow(
71 nullptr,
72 0
73 );
74 } else if (instances == nullptr) {
75 return rerun::Error(
76 ErrorCode::UnexpectedNullArgument,
77 "Passed array instances is null when num_elements> 0."
78 );
79 } else {
80 return Loggable<rerun::blueprint::datatypes::TensorDimensionIndexSlider>::to_arrow(
81 &instances->selection,
82 num_instances
83 );
84 }
85 }
86 };
87} // namespace rerun
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:23
A ComponentDescriptor fully describes the semantics of a column of data.
Definition component_descriptor.hpp:13
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:15
Datatype: Defines a slider for the index of some dimension.
Definition tensor_dimension_index_slider.hpp:20