Rerun C++ SDK
Loading...
Searching...
No Matches
archetype_utils.hpp
1#pragma once
2
3#include <initializer_list>
4#include <optional>
5
6#include "component_batch.hpp"
7#include "component_column.hpp"
8
9// Included by generated public headers; keep Arrow includes out of this file.
10namespace rerun::detail {
11 /// Borrows an archetype's optional component fields without copying the batches.
12 using BatchFields = std::initializer_list<const std::optional<ComponentBatch>*>;
13
14 /// Collects an archetype's set fields into batches in field order, sharing their arrays.
15 Result<Collection<ComponentBatch>> collect_batches(BatchFields fields);
16
17 /// Splits each set field into a column whose rows contain the specified numbers of values.
18 Result<Collection<ComponentColumn>> partition_batches(
19 BatchFields fields, const Collection<uint32_t>& lengths
20 );
21
22 /// Splits each set field into single-value rows, using the first set field's length.
23 Result<Collection<ComponentColumn>> partition_batches_of_unit_length(BatchFields fields);
24} // namespace rerun::detail