Rerun C++ SDK
Loading...
Searching...
No Matches
view_maximized.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/view_maximized.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**: Whether a view is maximized.
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:
22 ViewMaximized() = default;
23
24 ViewMaximized(rerun::datatypes::Uuid view_id_) : view_id(view_id_) {}
25
26 ViewMaximized& operator=(rerun::datatypes::Uuid view_id_) {
27 view_id = view_id_;
28 return *this;
29 }
30
31 ViewMaximized(std::array<uint8_t, 16> bytes_) : view_id(bytes_) {}
32
33 ViewMaximized& operator=(std::array<uint8_t, 16> bytes_) {
34 view_id = bytes_;
35 return *this;
36 }
37
38 /// Cast to the underlying Uuid datatype
39 operator rerun::datatypes::Uuid() const {
40 return view_id;
41 }
42 };
43} // namespace rerun::blueprint::components
44
45namespace rerun {
46 static_assert(sizeof(rerun::datatypes::Uuid) == sizeof(blueprint::components::ViewMaximized));
47
48 /// \private
49 template <>
50 struct Loggable<blueprint::components::ViewMaximized> {
51 static constexpr std::string_view ComponentType =
52 "rerun.blueprint.components.ViewMaximized";
53
54 /// Returns the arrow data type this type corresponds to.
55 static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
57 }
58
59 /// Serializes an array of `rerun::blueprint:: components::ViewMaximized` into an arrow array.
60 static Result<std::shared_ptr<arrow::Array>> to_arrow(
61 const blueprint::components::ViewMaximized* instances, size_t num_instances
62 ) {
63 if (num_instances == 0) {
64 return Loggable<rerun::datatypes::Uuid>::to_arrow(nullptr, 0);
65 } else if (instances == nullptr) {
66 return rerun::Error(
67 ErrorCode::UnexpectedNullArgument,
68 "Passed array instances is null when num_elements> 0."
69 );
70 } else {
71 return Loggable<rerun::datatypes::Uuid>::to_arrow(
72 &instances->view_id,
73 num_instances
74 );
75 }
76 }
77 };
78} // 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: Whether a view is maximized.
Definition view_maximized.hpp:18
Datatype: A 16-byte UUID.
Definition uuid.hpp:20