Rerun C++ SDK
Loading...
Searching...
No Matches
dataframe_query.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/dataframe_query.fbs".
3
4#pragma once
5
6#include "../../blueprint/components/apply_latest_at.hpp"
7#include "../../blueprint/components/column_order.hpp"
8#include "../../blueprint/components/filter_by_range.hpp"
9#include "../../blueprint/components/filter_is_not_null.hpp"
10#include "../../blueprint/components/selected_columns.hpp"
11#include "../../blueprint/components/timeline_name.hpp"
12#include "../../collection.hpp"
13#include "../../component_batch.hpp"
14#include "../../component_column.hpp"
15#include "../../result.hpp"
16
17#include <cstdint>
18#include <optional>
19#include <utility>
20#include <vector>
21
22namespace rerun::blueprint::archetypes {
23 /// **Archetype**: The query for the dataframe view.
24 ///
25 /// ⚠ **This type is _unstable_ and may change significantly in a way that the data won't be backwards compatible.**
26 ///
28 /// The timeline for this query.
29 ///
30 /// If unset, the timeline currently active on the time panel is used.
31 std::optional<ComponentBatch> timeline;
32
33 /// If provided, only rows whose timestamp is within this range will be shown.
34 ///
35 /// Note: will be unset as soon as `timeline` is changed.
36 std::optional<ComponentBatch> filter_by_range;
37
38 /// If provided, only show rows which contains a logged event for the specified component.
39 std::optional<ComponentBatch> filter_is_not_null;
40
41 /// Should empty cells be filled with latest-at queries?
42 std::optional<ComponentBatch> apply_latest_at;
43
44 /// Selected columns. If unset, all columns are selected.
45 std::optional<ComponentBatch> select;
46
47 /// The order of entity path column groups. If unset, the default order is used.
48 ///
49 /// This affects the order of component columns, which are always grouped by entity path. Timeline columns always
50 /// come first. Entities not listed here are appended at the end in default order.
51 ///
52 /// If `entity_order` contains any entity path that is not included in the view, they are ignored.
53 std::optional<ComponentBatch> entity_order;
54
55 public:
56 /// The name of the archetype as used in `ComponentDescriptor`s.
57 static constexpr const char ArchetypeName[] = "rerun.blueprint.archetypes.DataframeQuery";
58
59 /// `ComponentDescriptor` for the `timeline` field.
61 ArchetypeName, "DataframeQuery:timeline",
63 );
64 /// `ComponentDescriptor` for the `filter_by_range` field.
66 ArchetypeName, "DataframeQuery:filter_by_range",
68 );
69 /// `ComponentDescriptor` for the `filter_is_not_null` field.
71 ArchetypeName, "DataframeQuery:filter_is_not_null",
73 );
74 /// `ComponentDescriptor` for the `apply_latest_at` field.
76 ArchetypeName, "DataframeQuery:apply_latest_at",
78 );
79 /// `ComponentDescriptor` for the `select` field.
80 static constexpr auto Descriptor_select = ComponentDescriptor(
81 ArchetypeName, "DataframeQuery:select",
83 );
84 /// `ComponentDescriptor` for the `entity_order` field.
86 ArchetypeName, "DataframeQuery:entity_order",
88 );
89
90 public:
91 DataframeQuery() = default;
92 DataframeQuery(DataframeQuery&& other) = default;
93 DataframeQuery(const DataframeQuery& other) = default;
94 DataframeQuery& operator=(const DataframeQuery& other) = default;
95 DataframeQuery& operator=(DataframeQuery&& other) = default;
96
97 /// Update only some specific fields of a `DataframeQuery`.
99 return DataframeQuery();
100 }
101
102 /// Clear all the fields of a `DataframeQuery`.
104
105 /// The timeline for this query.
106 ///
107 /// If unset, the timeline currently active on the time panel is used.
109 ) && {
110 timeline =
111 ComponentBatch::from_loggable(_timeline, Descriptor_timeline).value_or_throw();
112 return std::move(*this);
113 }
114
115 /// If provided, only rows whose timestamp is within this range will be shown.
116 ///
117 /// Note: will be unset as soon as `timeline` is changed.
119 const rerun::blueprint::components::FilterByRange& _filter_by_range
120 ) && {
123 .value_or_throw();
124 return std::move(*this);
125 }
126
127 /// If provided, only show rows which contains a logged event for the specified component.
129 const rerun::blueprint::components::FilterIsNotNull& _filter_is_not_null
130 ) && {
133 .value_or_throw();
134 return std::move(*this);
135 }
136
137 /// Should empty cells be filled with latest-at queries?
139 const rerun::blueprint::components::ApplyLatestAt& _apply_latest_at
140 ) && {
143 .value_or_throw();
144 return std::move(*this);
145 }
146
147 /// Selected columns. If unset, all columns are selected.
149 ) && {
150 select = ComponentBatch::from_loggable(_select, Descriptor_select).value_or_throw();
151 return std::move(*this);
152 }
153
154 /// The order of entity path column groups. If unset, the default order is used.
155 ///
156 /// This affects the order of component columns, which are always grouped by entity path. Timeline columns always
157 /// come first. Entities not listed here are appended at the end in default order.
158 ///
159 /// If `entity_order` contains any entity path that is not included in the view, they are ignored.
162 ) && {
164 .value_or_throw();
165 return std::move(*this);
166 }
167
168 /// Partitions the component data into multiple sub-batches.
169 ///
170 /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s
171 /// instead, via `ComponentBatch::partitioned`.
172 ///
173 /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun.
174 ///
175 /// The specified `lengths` must sum to the total length of the component batch.
177
178 /// Partitions the component data into unit-length sub-batches.
179 ///
180 /// This is semantically similar to calling `columns` with `std::vector<uint32_t>(n, 1)`,
181 /// where `n` is automatically guessed.
183 };
184
185} // namespace rerun::blueprint::archetypes
186
187namespace rerun {
188 /// \private
189 template <typename T>
190 struct AsComponents;
191
192 /// \private
193 template <>
194 struct AsComponents<blueprint::archetypes::DataframeQuery> {
195 /// Serialize all set component batches.
196 static Result<Collection<ComponentBatch>> as_batches(
198 );
199 };
200} // 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: The query for the dataframe view.
Definition dataframe_query.hpp:27
std::optional< ComponentBatch > timeline
The timeline for this query.
Definition dataframe_query.hpp:31
std::optional< ComponentBatch > select
Selected columns. If unset, all columns are selected.
Definition dataframe_query.hpp:45
std::optional< ComponentBatch > entity_order
The order of entity path column groups.
Definition dataframe_query.hpp:53
static DataframeQuery clear_fields()
Clear all the fields of a DataframeQuery.
DataframeQuery with_timeline(const rerun::blueprint::components::TimelineName &_timeline) &&
The timeline for this query.
Definition dataframe_query.hpp:108
static constexpr auto Descriptor_timeline
ComponentDescriptor for the timeline field.
Definition dataframe_query.hpp:60
DataframeQuery with_select(const rerun::blueprint::components::SelectedColumns &_select) &&
Selected columns. If unset, all columns are selected.
Definition dataframe_query.hpp:148
static constexpr auto Descriptor_filter_is_not_null
ComponentDescriptor for the filter_is_not_null field.
Definition dataframe_query.hpp:70
std::optional< ComponentBatch > filter_by_range
If provided, only rows whose timestamp is within this range will be shown.
Definition dataframe_query.hpp:36
DataframeQuery with_filter_by_range(const rerun::blueprint::components::FilterByRange &_filter_by_range) &&
If provided, only rows whose timestamp is within this range will be shown.
Definition dataframe_query.hpp:118
static constexpr auto Descriptor_select
ComponentDescriptor for the select field.
Definition dataframe_query.hpp:80
DataframeQuery with_apply_latest_at(const rerun::blueprint::components::ApplyLatestAt &_apply_latest_at) &&
Should empty cells be filled with latest-at queries?
Definition dataframe_query.hpp:138
Collection< ComponentColumn > columns()
Partitions the component data into unit-length sub-batches.
std::optional< ComponentBatch > apply_latest_at
Should empty cells be filled with latest-at queries?
Definition dataframe_query.hpp:42
static constexpr auto Descriptor_filter_by_range
ComponentDescriptor for the filter_by_range field.
Definition dataframe_query.hpp:65
Collection< ComponentColumn > columns(const Collection< uint32_t > &lengths_)
Partitions the component data into multiple sub-batches.
static constexpr auto Descriptor_apply_latest_at
ComponentDescriptor for the apply_latest_at field.
Definition dataframe_query.hpp:75
std::optional< ComponentBatch > filter_is_not_null
If provided, only show rows which contains a logged event for the specified component.
Definition dataframe_query.hpp:39
static constexpr auto Descriptor_entity_order
ComponentDescriptor for the entity_order field.
Definition dataframe_query.hpp:85
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition dataframe_query.hpp:57
static DataframeQuery update_fields()
Update only some specific fields of a DataframeQuery.
Definition dataframe_query.hpp:98
DataframeQuery with_entity_order(const rerun::blueprint::components::ColumnOrder &_entity_order) &&
The order of entity path column groups.
Definition dataframe_query.hpp:160
DataframeQuery with_filter_is_not_null(const rerun::blueprint::components::FilterIsNotNull &_filter_is_not_null) &&
If provided, only show rows which contains a logged event for the specified component.
Definition dataframe_query.hpp:128
Component: Whether empty cells in a dataframe should be filled with a latest-at query.
Definition apply_latest_at.hpp:17
Component: The order of component columns (which remain always grouped by entity path) in the datafra...
Definition column_order.hpp:28
Component: Configuration for a filter-by-range feature of the dataframe view.
Definition filter_by_range.hpp:17
Component: Configuration for the filter is not null feature of the dataframe view.
Definition filter_is_not_null.hpp:18
Component: Describe a component column to be selected in the dataframe view.
Definition selected_columns.hpp:18
Component: A timeline identified by its name.
Definition timeline_name.hpp:19