Rerun C++ SDK
Loading...
Searching...
No Matches
column_type.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/build/re_type_definitions/rerun/blueprint/components/column_type.def.rs".
3
4#pragma once
5
6#include "../../blueprint/encodings/column_type.hpp"
7#include "../../result.hpp"
8
9#include <cstdint>
10#include <memory>
11#include <utility>
12
13namespace rerun::blueprint::components {
14 /// **Component**: Overrides the component a table column's values are shown as.
15 ///
16 /// ⚠ **This type is _unstable_ and may change significantly in a way that the data won't be backwards compatible.**
17 ///
18 struct ColumnType {
20
21 public:
22 ColumnType() = default;
23
25 : column_type(std::move(column_type_)) {}
26
28 column_type = std::move(column_type_);
29 return *this;
30 }
31
32 /// Cast to the underlying ColumnType encoding
34 return column_type;
35 }
36 };
37} // namespace rerun::blueprint::components
38
39namespace rerun {
40 static_assert(
42 );
43
44 /// \private
45 template <>
46 struct Loggable<blueprint::components::ColumnType> {
47 static constexpr std::string_view ComponentType = "rerun.blueprint.components.ColumnType";
48
49 /// Returns the arrow data type this type corresponds to.
50 static const std::shared_ptr<arrow::DataType>& arrow_data_type() {
52 }
53
54 /// Serializes an array of `rerun::blueprint:: components::ColumnType` into an arrow array.
55 static Result<std::shared_ptr<arrow::Array>> to_arrow(
56 const blueprint::components::ColumnType* instances, size_t num_instances
57 ) {
58 if (num_instances == 0) {
59 return Loggable<rerun::blueprint::encodings::ColumnType>::to_arrow(nullptr, 0);
60 } else if (instances == nullptr) {
61 return rerun::Error(
62 ErrorCode::UnexpectedNullArgument,
63 "Passed array instances is null when num_elements> 0."
64 );
65 } else {
66 return Loggable<rerun::blueprint::encodings::ColumnType>::to_arrow(
67 &instances->column_type,
68 num_instances
69 );
70 }
71 }
72 };
73} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:104
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:26
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: Overrides the component a table column's values are shown as.
Definition column_type.hpp:18
Encoding: Overrides the component a table column's values are shown as.
Definition column_type.hpp:24