Rerun C++ SDK
Loading...
Searching...
No Matches
active_tab.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/active_tab.fbs".
3
4#pragma once
5
6#include "../../datatypes/entity_path.hpp"
7#include "../../result.hpp"
8
9#include <cstdint>
10#include <memory>
11#include <string>
12#include <utility>
13
14namespace rerun::blueprint::components {
15 /// **Component**: The active tab in a tabbed container.
16 struct ActiveTab {
17 /// Which tab is currently active.
18 ///
19 /// This should always correspond to a tab in the container.
21
22 public:
23 ActiveTab() = default;
24
25 ActiveTab(rerun::datatypes::EntityPath tab_) : tab(std::move(tab_)) {}
26
28 tab = std::move(tab_);
29 return *this;
30 }
31
32 ActiveTab(std::string path_) : tab(std::move(path_)) {}
33
34 ActiveTab& operator=(std::string path_) {
35 tab = std::move(path_);
36 return *this;
37 }
38
39 /// Cast to the underlying EntityPath datatype
41 return tab;
42 }
43 };
44} // namespace rerun::blueprint::components
45
46namespace rerun {
47 static_assert(sizeof(rerun::datatypes::EntityPath) == sizeof(blueprint::components::ActiveTab));
48
49 /// \private
50 template <>
51 struct Loggable<blueprint::components::ActiveTab> {
52 static constexpr const char Name[] = "rerun.blueprint.components.ActiveTab";
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::ActiveTab` into an arrow array.
60 static Result<std::shared_ptr<arrow::Array>> to_arrow(
61 const blueprint::components::ActiveTab* instances, size_t num_instances
62 ) {
63 return Loggable<rerun::datatypes::EntityPath>::to_arrow(&instances->tab, num_instances);
64 }
65 };
66} // namespace rerun
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 active tab in a tabbed container.
Definition active_tab.hpp:16
rerun::datatypes::EntityPath tab
Which tab is currently active.
Definition active_tab.hpp:20
Datatype: A path to an entity in the ChunkStore.
Definition entity_path.hpp:21