Rerun C++ SDK
Loading...
Searching...
No Matches
text_log_columns.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_sdk_types/definitions/rerun/blueprint/archetypes/text_log_columns.fbs".
3
4#pragma once
5
6#include "../../blueprint/components/text_log_column.hpp"
7#include "../../blueprint/components/timeline_column.hpp"
8#include "../../collection.hpp"
9#include "../../component_batch.hpp"
10#include "../../component_column.hpp"
11#include "../../result.hpp"
12
13#include <cstdint>
14#include <optional>
15#include <utility>
16#include <vector>
17
18namespace rerun::blueprint::archetypes {
19 /// **Archetype**: Configuration of the text log columns.
20 ///
21 /// ⚠ **This type is _unstable_ and may change significantly in a way that the data won't be backwards compatible.**
22 ///
24 /// What timeline columns to show.
25 ///
26 /// Defaults to displaying all timelines.
27 std::optional<ComponentBatch> timeline_columns;
28
29 /// All columns to be displayed.
30 ///
31 /// Defaults to showing all text log column kinds in the order of the enum.
32 std::optional<ComponentBatch> text_log_columns;
33
34 public:
35 /// The name of the archetype as used in `ComponentDescriptor`s.
36 static constexpr const char ArchetypeName[] = "rerun.blueprint.archetypes.TextLogColumns";
37
38 /// `ComponentDescriptor` for the `timeline_columns` field.
40 ArchetypeName, "TextLogColumns:timeline_columns",
42 );
43 /// `ComponentDescriptor` for the `text_log_columns` field.
45 ArchetypeName, "TextLogColumns:text_log_columns",
47 );
48
49 public:
50 TextLogColumns() = default;
51 TextLogColumns(TextLogColumns&& other) = default;
52 TextLogColumns(const TextLogColumns& other) = default;
53 TextLogColumns& operator=(const TextLogColumns& other) = default;
54 TextLogColumns& operator=(TextLogColumns&& other) = default;
55
56 /// Update only some specific fields of a `TextLogColumns`.
58 return TextLogColumns();
59 }
60
61 /// Clear all the fields of a `TextLogColumns`.
63
64 /// What timeline columns to show.
65 ///
66 /// Defaults to displaying all timelines.
69 ) && {
72 .value_or_throw();
73 return std::move(*this);
74 }
75
76 /// All columns to be displayed.
77 ///
78 /// Defaults to showing all text log column kinds in the order of the enum.
81 ) && {
84 .value_or_throw();
85 return std::move(*this);
86 }
87
88 /// Partitions the component data into multiple sub-batches.
89 ///
90 /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s
91 /// instead, via `ComponentBatch::partitioned`.
92 ///
93 /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun.
94 ///
95 /// The specified `lengths` must sum to the total length of the component batch.
97
98 /// Partitions the component data into unit-length sub-batches.
99 ///
100 /// This is semantically similar to calling `columns` with `std::vector<uint32_t>(n, 1)`,
101 /// where `n` is automatically guessed.
103 };
104
105} // namespace rerun::blueprint::archetypes
106
107namespace rerun {
108 /// \private
109 template <typename T>
110 struct AsComponents;
111
112 /// \private
113 template <>
114 struct AsComponents<blueprint::archetypes::TextLogColumns> {
115 /// Serialize all set component batches.
116 static Result<Collection<ComponentBatch>> as_batches(
118 );
119 };
120} // namespace rerun
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:49
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:23
static Result< ComponentBatch > from_loggable(const rerun::Collection< T > &components, const ComponentDescriptor &descriptor)
Creates a new component batch from a collection of component instances.
Definition component_batch.hpp:46
A ComponentDescriptor fully describes the semantics of a column of data.
Definition component_descriptor.hpp:16
The Loggable trait is used by all built-in implementation of rerun::AsComponents to serialize a colle...
Definition loggable.hpp:11
Archetype: Configuration of the text log columns.
Definition text_log_columns.hpp:23
static constexpr auto Descriptor_text_log_columns
ComponentDescriptor for the text_log_columns field.
Definition text_log_columns.hpp:44
Collection< ComponentColumn > columns()
Partitions the component data into unit-length sub-batches.
std::optional< ComponentBatch > text_log_columns
All columns to be displayed.
Definition text_log_columns.hpp:32
std::optional< ComponentBatch > timeline_columns
What timeline columns to show.
Definition text_log_columns.hpp:27
TextLogColumns with_text_log_columns(const Collection< rerun::blueprint::components::TextLogColumn > &_text_log_columns) &&
All columns to be displayed.
Definition text_log_columns.hpp:79
static TextLogColumns update_fields()
Update only some specific fields of a TextLogColumns.
Definition text_log_columns.hpp:57
Collection< ComponentColumn > columns(const Collection< uint32_t > &lengths_)
Partitions the component data into multiple sub-batches.
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition text_log_columns.hpp:36
TextLogColumns with_timeline_columns(const Collection< rerun::blueprint::components::TimelineColumn > &_timeline_columns) &&
What timeline columns to show.
Definition text_log_columns.hpp:67
static constexpr auto Descriptor_timeline_columns
ComponentDescriptor for the timeline_columns field.
Definition text_log_columns.hpp:39
static TextLogColumns clear_fields()
Clear all the fields of a TextLogColumns.