Rerun C++ SDK
Loading...
Searching...
No Matches
apply_latest_at.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/apply_latest_at.fbs".
3
4#pragma once
5
6#include "../../datatypes/bool.hpp"
7#include "../../result.hpp"
8
9#include <cstdint>
10#include <memory>
11
12namespace rerun::blueprint::components {
13 /// **Component**: Whether empty cells in a dataframe should be filled with a latest-at query.
14 ///
15 /// ⚠ **This type is _unstable_ and may change significantly in a way that the data won't be backwards compatible.**
16 ///
18 rerun::datatypes::Bool apply_latest_at;
19
20 public:
21 ApplyLatestAt() = default;
22
24 : apply_latest_at(apply_latest_at_) {}
25
26 ApplyLatestAt& operator=(rerun::datatypes::Bool apply_latest_at_) {
27 apply_latest_at = apply_latest_at_;
28 return *this;
29 }
30
31 ApplyLatestAt(bool value_) : apply_latest_at(value_) {}
32
33 ApplyLatestAt& operator=(bool value_) {
34 apply_latest_at = value_;
35 return *this;
36 }
37
38 /// Cast to the underlying Bool datatype
39 operator rerun::datatypes::Bool() const {
40 return apply_latest_at;
41 }
42 };
43} // namespace rerun::blueprint::components
44
45namespace rerun {
46 static_assert(sizeof(rerun::datatypes::Bool) == sizeof(blueprint::components::ApplyLatestAt));
47
48 /// \private
49 template <>
50 struct Loggable<blueprint::components::ApplyLatestAt> {
51 static constexpr std::string_view ComponentType =
52 "rerun.blueprint.components.ApplyLatestAt";
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::ApplyLatestAt` into an arrow array.
60 static Result<std::shared_ptr<arrow::Array>> to_arrow(
61 const blueprint::components::ApplyLatestAt* instances, size_t num_instances
62 ) {
63 if (num_instances == 0) {
64 return Loggable<rerun::datatypes::Bool>::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::Bool>::to_arrow(
72 &instances->apply_latest_at,
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 empty cells in a dataframe should be filled with a latest-at query.
Definition apply_latest_at.hpp:17
Datatype: A single boolean.
Definition bool.hpp:19