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/auto_scroll.hpp"
8#include "../../blueprint/components/column_order.hpp"
9#include "../../blueprint/components/filter_by_range.hpp"
10#include "../../blueprint/components/filter_is_not_null.hpp"
11#include "../../blueprint/components/selected_columns.hpp"
12#include "../../blueprint/components/timeline_name.hpp"
13#include "../../collection.hpp"
14#include "../../component_batch.hpp"
15#include "../../component_column.hpp"
16#include "../../result.hpp"
17
18#include <cstdint>
19#include <optional>
20#include <utility>
21#include <vector>
22
23namespace rerun::blueprint::archetypes {
24 /// **Archetype**: The query for the dataframe view.
25 ///
26 /// ⚠ **This type is _unstable_ and may change significantly in a way that the data won't be backwards compatible.**
27 ///
29 /// The timeline for this query.
30 ///
31 /// If unset, the timeline currently active on the time panel is used.
32 std::optional<ComponentBatch> timeline;
33
34 /// If provided, only rows whose timestamp is within this range will be shown.
35 ///
36 /// Note: will be unset as soon as `timeline` is changed.
37 std::optional<ComponentBatch> filter_by_range;
38
39 /// If provided, only show rows which contains a logged event for the specified component.
40 std::optional<ComponentBatch> filter_is_not_null;
41
42 /// Should empty cells be filled with latest-at queries?
43 std::optional<ComponentBatch> apply_latest_at;
44
45 /// Selected columns. If unset, all columns are selected.
46 std::optional<ComponentBatch> select;
47
48 /// The order of entity path column groups. If unset, the default order is used.
49 ///
50 /// This affects the order of component columns, which are always grouped by entity path. Timeline columns always
51 /// come first. Entities not listed here are appended at the end in default order.
52 ///
53 /// If `entity_order` contains any entity path that is not included in the view, they are ignored.
54 std::optional<ComponentBatch> entity_order;
55
56 /// Whether to auto-scroll to track the time cursor.
57 ///
58 /// When enabled and the view's timeline matches the time panel's active timeline,
59 /// the view will scroll to keep the row at or before the current time cursor visible.
60 std::optional<ComponentBatch> auto_scroll;
61
62 public:
63 /// The name of the archetype as used in `ComponentDescriptor`s.
64 static constexpr const char ArchetypeName[] = "rerun.blueprint.archetypes.DataframeQuery";
65
66 /// `ComponentDescriptor` for the `timeline` field.
68 ArchetypeName, "DataframeQuery:timeline",
70 );
71 /// `ComponentDescriptor` for the `filter_by_range` field.
73 ArchetypeName, "DataframeQuery:filter_by_range",
75 );
76 /// `ComponentDescriptor` for the `filter_is_not_null` field.
78 ArchetypeName, "DataframeQuery:filter_is_not_null",
80 );
81 /// `ComponentDescriptor` for the `apply_latest_at` field.
83 ArchetypeName, "DataframeQuery:apply_latest_at",
85 );
86 /// `ComponentDescriptor` for the `select` field.
87 static constexpr auto Descriptor_select = ComponentDescriptor(
88 ArchetypeName, "DataframeQuery:select",
90 );
91 /// `ComponentDescriptor` for the `entity_order` field.
93 ArchetypeName, "DataframeQuery:entity_order",
95 );
96 /// `ComponentDescriptor` for the `auto_scroll` field.
98 ArchetypeName, "DataframeQuery:auto_scroll",
100 );
101
102 public:
103 DataframeQuery() = default;
104 DataframeQuery(DataframeQuery&& other) = default;
105 DataframeQuery(const DataframeQuery& other) = default;
106 DataframeQuery& operator=(const DataframeQuery& other) = default;
107 DataframeQuery& operator=(DataframeQuery&& other) = default;
108
109 /// Update only some specific fields of a `DataframeQuery`.
111 return DataframeQuery();
112 }
113
114 /// Clear all the fields of a `DataframeQuery`.
116
117 /// The timeline for this query.
118 ///
119 /// If unset, the timeline currently active on the time panel is used.
121 ) && {
122 timeline =
123 ComponentBatch::from_loggable(_timeline, Descriptor_timeline).value_or_throw();
124 return std::move(*this);
125 }
126
127 /// If provided, only rows whose timestamp is within this range will be shown.
128 ///
129 /// Note: will be unset as soon as `timeline` is changed.
131 const rerun::blueprint::components::FilterByRange& _filter_by_range
132 ) && {
135 .value_or_throw();
136 return std::move(*this);
137 }
138
139 /// If provided, only show rows which contains a logged event for the specified component.
141 const rerun::blueprint::components::FilterIsNotNull& _filter_is_not_null
142 ) && {
145 .value_or_throw();
146 return std::move(*this);
147 }
148
149 /// Should empty cells be filled with latest-at queries?
151 const rerun::blueprint::components::ApplyLatestAt& _apply_latest_at
152 ) && {
155 .value_or_throw();
156 return std::move(*this);
157 }
158
159 /// Selected columns. If unset, all columns are selected.
161 ) && {
162 select = ComponentBatch::from_loggable(_select, Descriptor_select).value_or_throw();
163 return std::move(*this);
164 }
165
166 /// The order of entity path column groups. If unset, the default order is used.
167 ///
168 /// This affects the order of component columns, which are always grouped by entity path. Timeline columns always
169 /// come first. Entities not listed here are appended at the end in default order.
170 ///
171 /// If `entity_order` contains any entity path that is not included in the view, they are ignored.
174 ) && {
176 .value_or_throw();
177 return std::move(*this);
178 }
179
180 /// Whether to auto-scroll to track the time cursor.
181 ///
182 /// When enabled and the view's timeline matches the time panel's active timeline,
183 /// the view will scroll to keep the row at or before the current time cursor visible.
185 ) && {
187 .value_or_throw();
188 return std::move(*this);
189 }
190
191 /// Partitions the component data into multiple sub-batches.
192 ///
193 /// Specifically, this transforms the existing `ComponentBatch` data into `ComponentColumn`s
194 /// instead, via `ComponentBatch::partitioned`.
195 ///
196 /// This makes it possible to use `RecordingStream::send_columns` to send columnar data directly into Rerun.
197 ///
198 /// The specified `lengths` must sum to the total length of the component batch.
200
201 /// Partitions the component data into unit-length sub-batches.
202 ///
203 /// This is semantically similar to calling `columns` with `std::vector<uint32_t>(n, 1)`,
204 /// where `n` is automatically guessed.
206 };
207
208} // namespace rerun::blueprint::archetypes
209
210namespace rerun {
211 /// \private
212 template <typename T>
213 struct AsComponents;
214
215 /// \private
216 template <>
217 struct AsComponents<blueprint::archetypes::DataframeQuery> {
218 /// Serialize all set component batches.
219 static Result<Collection<ComponentBatch>> as_batches(
221 );
222 };
223} // 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:28
std::optional< ComponentBatch > timeline
The timeline for this query.
Definition dataframe_query.hpp:32
std::optional< ComponentBatch > select
Selected columns. If unset, all columns are selected.
Definition dataframe_query.hpp:46
std::optional< ComponentBatch > entity_order
The order of entity path column groups.
Definition dataframe_query.hpp:54
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:120
static constexpr auto Descriptor_timeline
ComponentDescriptor for the timeline field.
Definition dataframe_query.hpp:67
DataframeQuery with_select(const rerun::blueprint::components::SelectedColumns &_select) &&
Selected columns. If unset, all columns are selected.
Definition dataframe_query.hpp:160
static constexpr auto Descriptor_filter_is_not_null
ComponentDescriptor for the filter_is_not_null field.
Definition dataframe_query.hpp:77
std::optional< ComponentBatch > filter_by_range
If provided, only rows whose timestamp is within this range will be shown.
Definition dataframe_query.hpp:37
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:130
static constexpr auto Descriptor_select
ComponentDescriptor for the select field.
Definition dataframe_query.hpp:87
DataframeQuery with_auto_scroll(const rerun::blueprint::components::AutoScroll &_auto_scroll) &&
Whether to auto-scroll to track the time cursor.
Definition dataframe_query.hpp:184
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:150
static constexpr auto Descriptor_auto_scroll
ComponentDescriptor for the auto_scroll field.
Definition dataframe_query.hpp:97
Collection< ComponentColumn > columns()
Partitions the component data into unit-length sub-batches.
std::optional< ComponentBatch > auto_scroll
Whether to auto-scroll to track the time cursor.
Definition dataframe_query.hpp:60
std::optional< ComponentBatch > apply_latest_at
Should empty cells be filled with latest-at queries?
Definition dataframe_query.hpp:43
static constexpr auto Descriptor_filter_by_range
ComponentDescriptor for the filter_by_range field.
Definition dataframe_query.hpp:72
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:82
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:40
static constexpr auto Descriptor_entity_order
ComponentDescriptor for the entity_order field.
Definition dataframe_query.hpp:92
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition dataframe_query.hpp:64
static DataframeQuery update_fields()
Update only some specific fields of a DataframeQuery.
Definition dataframe_query.hpp:110
DataframeQuery with_entity_order(const rerun::blueprint::components::ColumnOrder &_entity_order) &&
The order of entity path column groups.
Definition dataframe_query.hpp:172
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:140
Component: Whether empty cells in a dataframe should be filled with a latest-at query.
Definition apply_latest_at.hpp:17
Component: Whether the view should auto-scroll to follow the time cursor.
Definition auto_scroll.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