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