Rerun C++ SDK
Loading...
Searching...
No Matches
keypoint_id.hpp
1// DO NOT EDIT! This file was auto-generated by crates/re_types_builder/src/codegen/cpp/mod.rs
2// Based on "crates/re_types/definitions/rerun/components/keypoint_id.fbs".
3
4#pragma once
5
6#include "../datatypes/keypoint_id.hpp"
7#include "../result.hpp"
8
9#include <cstdint>
10#include <memory>
11
12namespace arrow {
13 /// \private
14 template <typename T>
15 class NumericBuilder;
16
17 class Array;
18 class DataType;
19 class UInt16Type;
20 using UInt16Builder = NumericBuilder<UInt16Type>;
21} // namespace arrow
22
23namespace rerun::components {
24 /// **Component**: A 16-bit ID representing a type of semantic keypoint within a class.
25 struct KeypointId {
27
28 public:
29 KeypointId() = default;
30
32
34 id = id_;
35 return *this;
36 }
37
38 KeypointId(uint16_t id_) : id(id_) {}
39
40 KeypointId& operator=(uint16_t id_) {
41 id = id_;
42 return *this;
43 }
44
45 /// Cast to the underlying KeypointId datatype
47 return id;
48 }
49 };
50} // namespace rerun::components
51
52namespace rerun {
53 template <typename T>
54 struct Loggable;
55
56 /// \private
57 template <>
58 struct Loggable<components::KeypointId> {
59 static constexpr const char Name[] = "rerun.components.KeypointId";
60
61 /// Returns the arrow data type this type corresponds to.
62 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
63
64 /// Fills an arrow array builder with an array of this type.
65 static rerun::Error fill_arrow_array_builder(
66 arrow::UInt16Builder* builder, const components::KeypointId* elements,
67 size_t num_elements
68 );
69
70 /// Serializes an array of `rerun::components::KeypointId` into an arrow array.
71 static Result<std::shared_ptr<arrow::Array>> to_arrow(
72 const components::KeypointId* instances, size_t num_instances
73 );
74 };
75} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:87
All built-in components. See Types in the Rerun manual.
Definition rerun.hpp:69
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:20
Component: A 16-bit ID representing a type of semantic keypoint within a class.
Definition keypoint_id.hpp:25
Datatype: A 16-bit ID representing a type of semantic keypoint within a class.
Definition keypoint_id.hpp:24