Rerun C++ SDK
Loading...
Searching...
No Matches
bool.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/datatypes/bool.fbs".
3
4#pragma once
5
6#include "../component_descriptor.hpp"
7#include "../result.hpp"
8
9#include <cstdint>
10#include <memory>
11
12namespace arrow {
13 class Array;
14 class BooleanBuilder;
15 class DataType;
16} // namespace arrow
17
18namespace rerun::datatypes {
19 /// **Datatype**: A single boolean.
20 struct Bool {
21 bool value;
22
23 public:
24 Bool() = default;
25
26 Bool(bool value_) : value(value_) {}
27
28 Bool& operator=(bool value_) {
29 value = value_;
30 return *this;
31 }
32 };
33} // namespace rerun::datatypes
34
35namespace rerun {
36 template <typename T>
37 struct Loggable;
38
39 /// \private
40 template <>
41 struct Loggable<datatypes::Bool> {
42 static constexpr ComponentDescriptor Descriptor = "rerun.datatypes.Bool";
43
44 /// Returns the arrow data type this type corresponds to.
45 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
46
47 /// Serializes an array of `rerun::datatypes::Bool` into an arrow array.
49 const datatypes::Bool* instances, size_t num_instances
50 );
51
52 /// Fills an arrow array builder with an array of this type.
53 static rerun::Error fill_arrow_array_builder(
54 arrow::BooleanBuilder* builder, const datatypes::Bool* elements, size_t num_elements
55 );
56 };
57} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:96
A class for representing either a usable value, or an error.
Definition result.hpp:14
All built-in datatypes. See Types in the Rerun manual.
Definition rerun.hpp:82
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:14
The Loggable trait is used by all built-in implementation of rerun::AsComponents to serialize a colle...
Definition loggable.hpp:11
Datatype: A single boolean.
Definition bool.hpp:20