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;
43 if (component_batch_result.is_err()) {
44 return component_batch_result.error;
71 template <
typename Archetype>
73 auto component_batch_result = ComponentBatch::from_indicator<Archetype>();
74 if (component_batch_result.is_err()) {
75 return component_batch_result.error;
78 component_batch_result.value,
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:96
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
uint32_t ComponentTypeHandle
Handle to a registered component types.
Definition component_type.hpp:14
Arrow-encoded data of a single batch of components together with a component descriptor.
Definition component_batch.hpp:28
static Result< ComponentBatch > from_loggable(const rerun::Collection< T > &components, const ComponentDescriptor &descriptor=rerun::Loggable< T >::Descriptor)
Creates a new component batch from a collection of component instances.
Definition component_batch.hpp:46
Arrow-encoded data of a column of components.
Definition component_column.hpp:20
static Result< ComponentColumn > from_loggable(const Collection< T > &components, const ComponentDescriptor &descriptor=rerun::Loggable< T >::Descriptor)
Creates a new component column from a collection of component instances where each run has a length o...
Definition component_column.hpp:59
static Result< ComponentColumn > from_loggable_with_lengths(const Collection< T > &components, const Collection< uint32_t > &lengths, const ComponentDescriptor &descriptor=rerun::Loggable< T >::Descriptor)
Creates a new component column from a collection of component instances.
Definition component_column.hpp:38
ComponentTypeHandle component_type
The type of the component instances in array.
Definition component_column.hpp:25
static Result< ComponentColumn > from_batch_with_lengths(ComponentBatch batch, const Collection< uint32_t > &lengths)
Creates a new component batch partition from a batch and a collection of run lengths.
std::shared_ptr< arrow::Array > array
Arrow-encoded list array of component batches.
Definition component_column.hpp:22
static Result< ComponentColumn > from_batch_with_offsets(ComponentBatch batch, Collection< uint32_t > offsets)
Creates a new component batch partition from a batch and a collection of component offsets.
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:72
A ComponentDescriptor fully describes the semantics of a column of data.
Definition component_descriptor.hpp:14
The Loggable trait is used by all built-in implementation of rerun::AsComponents to serialize a colle...
Definition loggable.hpp:11