Rerun C++ SDK
Loading...
Searching...
No Matches
table_blueprint_v2.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/archetypes/table_blueprint.def.rs".
3
4#pragma once
5
6#include "../../blueprint/components/table_layout_kind.hpp"
7#include "../../collection.hpp"
8#include "../../component_batch.hpp"
9#include "../../component_column.hpp"
10#include "../../result.hpp"
11
12#include <cstdint>
13#include <optional>
14#include <utility>
15#include <vector>
16
17namespace rerun::blueprint::archetypes {
18 /// **Archetype**: Blueprint for configuring the styling of a table.
19 ///
20 /// TODO(RR-4810): This is not yet in use!
21 ///
22 /// The table blueprint as a whole is distributed across these entity paths:
23 /// * `/table` for this archetype and `archetypes::PreviewsConfig`.
24 /// * `/table/layouts/table` for `archetypes::TableLayout`.
25 /// * `/table/layouts/table/columns/{column_name}` for table `archetypes::TableColumn` archetypes and per-column options such as `archetypes::TableColumnPreview`.
26 /// * `/table/layouts/cards` for `archetypes::CardLayout`.
27 /// * `/table/layouts/cards/fields/{column_name}` for card `archetypes::TableColumn` archetypes and per-field options such as `archetypes::TableColumnPreview`.
28 /// * `/view/{view_id}` for preview `archetypes::ViewBlueprint` definitions.
29 ///
30 /// ⚠ **This type is _unstable_ and may change significantly in a way that the data won't be backwards compatible.**
31 ///
33 /// The layout shown when the table is first opened and no user selection has been persisted.
34 ///
35 /// If unset, defaults to card layout if available.
36 /// `Cards` falls back to table layout when no `archetypes::CardLayout` is configured.
37 std::optional<ComponentBatch> default_layout;
38
39 public:
40 /// The name of the archetype as used in `ComponentDescriptor`s.
41 static constexpr const char ArchetypeName[] = "rerun.blueprint.archetypes.TableBlueprintV2";
42
43 /// `ComponentDescriptor` for the `default_layout` field.
45 ArchetypeName, "TableBlueprintV2:default_layout",
47 );
48
49 public:
50 TableBlueprintV2() = default;
51 TableBlueprintV2(TableBlueprintV2&& other) = default;
52 TableBlueprintV2(const TableBlueprintV2& other) = default;
53 TableBlueprintV2& operator=(const TableBlueprintV2& other) = default;
54 TableBlueprintV2& operator=(TableBlueprintV2&& other) = default;
55
56 /// Update only some specific fields of a `TableBlueprintV2`.
58 return TableBlueprintV2();
59 }
60
61 /// Clear all the fields of a `TableBlueprintV2`.
63
64 /// The layout shown when the table is first opened and no user selection has been persisted.
65 ///
66 /// If unset, defaults to card layout if available.
67 /// `Cards` falls back to table layout when no `archetypes::CardLayout` is configured.
69 const rerun::blueprint::components::TableLayoutKind& _default_layout
70 ) && {
73 .value_or_throw();
74 return std::move(*this);
75 }
76
77 /// Partitions the component data into multiple sub-batches.
78 ///
79 /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s
80 /// instead, via `ComponentBatch::partitioned`.
81 ///
82 /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun.
83 ///
84 /// The specified `lengths` must sum to the total length of the component batch.
86
87 /// Partitions the component data into unit-length sub-batches.
88 ///
89 /// This is semantically similar to calling `columns` with `std::vector<uint32_t>(n, 1)`,
90 /// where `n` is automatically guessed.
92 };
93
94} // namespace rerun::blueprint::archetypes
95
96namespace rerun {
97 /// \private
98 template <typename T>
99 struct AsComponents;
100
101 /// \private
102 template <>
103 struct AsComponents<blueprint::archetypes::TableBlueprintV2> {
104 /// Serialize all set component batches.
105 static Result<Collection<ComponentBatch>> as_batches(
107 );
108 };
109} // 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:26
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: Blueprint for configuring the styling of a table.
Definition table_blueprint_v2.hpp:32
static constexpr auto Descriptor_default_layout
ComponentDescriptor for the default_layout field.
Definition table_blueprint_v2.hpp:44
Collection< ComponentColumn > columns(const Collection< uint32_t > &lengths_)
Partitions the component data into multiple sub-batches.
std::optional< ComponentBatch > default_layout
The layout shown when the table is first opened and no user selection has been persisted.
Definition table_blueprint_v2.hpp:37
Collection< ComponentColumn > columns()
Partitions the component data into unit-length sub-batches.
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition table_blueprint_v2.hpp:41
static TableBlueprintV2 update_fields()
Update only some specific fields of a TableBlueprintV2.
Definition table_blueprint_v2.hpp:57
TableBlueprintV2 with_default_layout(const rerun::blueprint::components::TableLayoutKind &_default_layout) &&
The layout shown when the table is first opened and no user selection has been persisted.
Definition table_blueprint_v2.hpp:68
static TableBlueprintV2 clear_fields()
Clear all the fields of a TableBlueprintV2.