5#include "collection.hpp"
6#include "component_batch.hpp"
7#include "component_type.hpp"
11struct rr_component_column;
22 std::shared_ptr<arrow::Array>
array;
41 if (component_batch_result.is_err()) {
42 return component_batch_result.error;
45 component_batch_result.value,
47 list_array_type_for<T>()
68 template <
typename Archetype>
70 return ComponentColumn::from_loggable<typename Archetype::IndicatorComponent>(
71 std::vector<typename Archetype::IndicatorComponent>(num_indicators)
85 std::shared_ptr<arrow::DataType> list_array_type
101 std::shared_ptr<arrow::DataType> list_array_type
107 template <
typename T>
110 rerun::is_loggable<T>,
111 "The given type does not implement the rerun::Loggable trait."
113 static std::shared_ptr<arrow::DataType> data_type =
122 std::shared_ptr<arrow::DataType> inner_type
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:49
size_t size() const
Returns the number of instances in this collection.
Definition collection.hpp:291
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:95
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:22
uint32_t ComponentTypeHandle
Handle to a registered component types.
Definition component_type.hpp:14
Arrow-encoded data of a single batch components for a single entity.
Definition component_batch.hpp:22
static Result< ComponentBatch > from_loggable(const rerun::Collection< T > &components)
Creates a new component batch from a collection of component instances.
Definition component_batch.hpp:34
Arrow-encoded data of a column of components.
Definition component_column.hpp:20
static Result< ComponentColumn > from_loggable(const Collection< T > &components)
Creates a new component column from a collection of component instances where each run has a length o...
Definition component_column.hpp:60
static const std::shared_ptr< arrow::DataType > & list_array_type_for()
Returns the list array type for the given loggable type.
Definition component_column.hpp:108
ComponentTypeHandle component_type
The type of the component instances in array.
Definition component_column.hpp:25
static Result< ComponentColumn > from_batch_with_offsets(ComponentBatch batch, Collection< uint32_t > offsets, std::shared_ptr< arrow::DataType > list_array_type)
Creates a new component batch partition from a batch and a collection of component offsets.
std::shared_ptr< arrow::Array > array
Arrow-encoded list array of component batches.
Definition component_column.hpp:22
static Result< ComponentColumn > from_batch_with_lengths(ComponentBatch batch, const Collection< uint32_t > &lengths, std::shared_ptr< arrow::DataType > list_array_type)
Creates a new component batch partition from a batch and a collection of run lengths.
static std::shared_ptr< arrow::DataType > list_array_type_for(std::shared_ptr< arrow::DataType > inner_type)
Creates a new arrow::Datatype for an underlying type.
static Result< ComponentColumn > from_loggable_with_lengths(const Collection< T > &components, const Collection< uint32_t > &lengths)
Creates a new component column from a collection of component instances.
Definition component_column.hpp:37
Error to_c_ffi_struct(rr_component_column &out_component_batch) const
To rerun C API component batch.
static Result< ComponentColumn > from_indicators(uint32_t num_indicators)
Creates a new component column with a given number of archetype indicators for a given archetype type...
Definition component_column.hpp:69
The Loggable trait is used by all built-in implementation of rerun::AsComponents to serialize a colle...
Definition loggable.hpp:11