Rerun C++ SDK
Loading...
Searching...
No Matches
included_content.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_content.fbs".
3
4#pragma once
5
6#include "../../component_descriptor.hpp"
7#include "../../datatypes/entity_path.hpp"
8#include "../../result.hpp"
9
10#include <cstdint>
11#include <memory>
12#include <string>
13#include <utility>
14
15namespace rerun::blueprint::components {
16 /// **Component**: All the contents in the container.
18 /// List of the contents by `datatypes::EntityPath`.
19 ///
20 /// This must be a path in the blueprint store.
21 /// Typically structure as `<blueprint_registry>/<uuid>`.
23
24 public:
25 IncludedContent() = default;
26
27 IncludedContent(rerun::datatypes::EntityPath contents_) : contents(std::move(contents_)) {}
28
29 IncludedContent& operator=(rerun::datatypes::EntityPath contents_) {
30 contents = std::move(contents_);
31 return *this;
32 }
33
34 IncludedContent(std::string path_) : contents(std::move(path_)) {}
35
36 IncludedContent& operator=(std::string path_) {
37 contents = std::move(path_);
38 return *this;
39 }
40
41 /// Cast to the underlying EntityPath datatype
43 return contents;
44 }
45 };
46} // namespace rerun::blueprint::components
47
48namespace rerun {
49 static_assert(
51 );
52
53 /// \private
54 template <>
55 struct Loggable<blueprint::components::IncludedContent> {
56 static constexpr ComponentDescriptor Descriptor =
57 "rerun.blueprint.components.IncludedContent";
58
59 /// Returns the arrow data type this type corresponds to.
60 static const std::shared_ptr<arrow::DataType>& arrow_datatype() {
62 }
63
64 /// Serializes an array of `rerun::blueprint:: components::IncludedContent` into an arrow array.
65 static Result<std::shared_ptr<arrow::Array>> to_arrow(
66 const blueprint::components::IncludedContent* instances, size_t num_instances
67 ) {
68 if (num_instances == 0) {
69 return Loggable<rerun::datatypes::EntityPath>::to_arrow(nullptr, 0);
70 } else if (instances == nullptr) {
71 return rerun::Error(
72 ErrorCode::UnexpectedNullArgument,
73 "Passed array instances is null when num_elements> 0."
74 );
75 } else {
76 return Loggable<rerun::datatypes::EntityPath>::to_arrow(
77 &instances->contents,
78 num_instances
79 );
80 }
81 }
82 };
83} // 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:23
A ComponentDescriptor fully describes the semantics of a column of data.
Definition component_descriptor.hpp:13
The Loggable trait is used by all built-in implementation of rerun::AsComponents to serialize a colle...
Definition loggable.hpp:11
Component: All the contents in the container.
Definition included_content.hpp:17
rerun::datatypes::EntityPath contents
List of the contents by datatypes::EntityPath.
Definition included_content.hpp:22
Datatype: A path to an entity in the ChunkStore.
Definition entity_path.hpp:22