Rerun C++ SDK
Loading...
Searching...
No Matches
included_space_view.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/included_space_view.fbs".
3
4#pragma once
5
6#include "../../datatypes/uuid.hpp"
7#include "../../result.hpp"
8
9#include <array>
10#include <cstdint>
11#include <memory>
12
13namespace rerun::blueprint::components {
14 /// **Component**: The unique id of a space view, used to refer to views in containers.
16 rerun::datatypes::Uuid space_view_id;
17
18 public:
19 IncludedSpaceView() = default;
20
21 IncludedSpaceView(rerun::datatypes::Uuid space_view_id_) : space_view_id(space_view_id_) {}
22
23 IncludedSpaceView& operator=(rerun::datatypes::Uuid space_view_id_) {
24 space_view_id = space_view_id_;
25 return *this;
26 }
27
28 IncludedSpaceView(std::array<uint8_t, 16> bytes_) : space_view_id(bytes_) {}
29
30 IncludedSpaceView& operator=(std::array<uint8_t, 16> bytes_) {
31 space_view_id = bytes_;
32 return *this;
33 }
34
35 /// Cast to the underlying Uuid datatype
36 operator rerun::datatypes::Uuid() const {
37 return space_view_id;
38 }
39 };
40} // namespace rerun::blueprint::components
41
42namespace rerun {
43 static_assert(
45 );
46
47 /// \private
48 template <>
49 struct Loggable<blueprint::components::IncludedSpaceView> {
50 static constexpr const char Name[] = "rerun.blueprint.components.IncludedSpaceView";
51
52 /// Returns the arrow data type this type corresponds to.
53 static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
55 }
56
57 /// Serializes an array of `rerun::blueprint:: components::IncludedSpaceView` into an arrow array.
58 static Result<std::shared_ptr<arrow::Array>> to_arrow(
59 const blueprint::components::IncludedSpaceView* instances, size_t num_instances
60 ) {
61 if (num_instances == 0) {
62 return Loggable<rerun::datatypes::Uuid>::to_arrow(nullptr, 0);
63 } else if (instances == nullptr) {
64 return rerun::Error(
65 ErrorCode::UnexpectedNullArgument,
66 "Passed array instances is null when num_elements> 0."
67 );
68 } else {
69 return Loggable<rerun::datatypes::Uuid>::to_arrow(
70 &instances->space_view_id,
71 num_instances
72 );
73 }
74 }
75 };
76} // 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:22
The Loggable trait is used by all built-in implementation of rerun::AsComponents to serialize a colle...
Definition loggable.hpp:11
Component: The unique id of a space view, used to refer to views in containers.
Definition included_space_view.hpp:15
Datatype: A 16-byte UUID.
Definition uuid.hpp:20