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/encodings/column_type.def.rs".
3
4#pragma once
5
6#include "../../result.hpp"
7
8#include <cstdint>
9#include <memory>
10#include <optional>
11#include <string>
12
13namespace arrow {
14 class Array;
15 class DataType;
16 class StructBuilder;
17} // namespace arrow
18
19namespace rerun::blueprint::encodings {
20 /// **Encoding**: Overrides the component a table column's values are shown as.
21 ///
22 /// ⚠ **This type is _unstable_ and may change significantly in a way that the data won't be backwards compatible.**
23 ///
24 struct ColumnType {
25 /// The component identifier, e.g. `GridMap:colormap`.
26 ///
27 /// Some components have a UI specific to the archetype field they are logged as.
28 /// If not set, the component identifier of the source column is used.
29 std::optional<std::string> component;
30
31 /// The fully qualified component type, e.g. `rerun.components.Flag`.
32 ///
33 /// If not set, the component type of the source column is used, or the Viewer infers one from the column's datatype.
34 std::optional<std::string> component_type_name;
35
36 public:
37 ColumnType() = default;
38 };
39} // namespace rerun::blueprint::encodings
40
41namespace rerun {
42 template <typename T>
43 struct Loggable;
44
45 /// \private
46 template <>
47 struct Loggable<blueprint::encodings::ColumnType> {
48 static constexpr std::string_view ComponentType = "rerun.blueprint.encodings.ColumnType";
49
50 /// Returns the arrow data type this type corresponds to.
51 static const std::shared_ptr<arrow::DataType>& arrow_data_type();
52
53 /// Serializes an array of `rerun::blueprint:: encodings::ColumnType` into an arrow array.
55 const blueprint::encodings::ColumnType* instances, size_t num_instances
56 );
57
58 /// Fills an arrow array builder with an array of this type.
59 static rerun::Error fill_arrow_array_builder(
60 arrow::StructBuilder* builder, const blueprint::encodings::ColumnType* elements,
61 size_t num_elements
62 );
63 };
64} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:104
A class for representing either a usable value, or an error.
Definition result.hpp:14
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
Encoding: Overrides the component a table column's values are shown as.
Definition column_type.hpp:24
std::optional< std::string > component_type_name
The fully qualified component type, e.g.
Definition column_type.hpp:34
std::optional< std::string > component
The component identifier, e.g.
Definition column_type.hpp:29