|
Rerun C++ SDK
|
Arrow-encoded data of a single batch of components together with a component descriptor. More...
#include <rerun/component_batch.hpp>
Public Member Functions | |
| Result< ComponentColumn > | partitioned (const Collection< uint32_t > &lengths) && |
| Partitions the component data into multiple sub-batches. | |
| Result< ComponentColumn > | partitioned () && |
| Partitions the component data into unit-length sub-batches. | |
| Result< ComponentColumn > | partitioned (const Collection< uint32_t > &lengths) const & |
| Partitions the component data into multiple sub-batches. | |
| Result< ComponentColumn > | partitioned () const & |
| Partitions the component data into unit-length sub-batches. | |
| size_t | length () const |
| Size in the number of elements the underlying arrow array contains. | |
| Error | to_c_ffi_struct (rr_component_batch &out_component_batch) const |
| To rerun C API component batch. | |
Static Public Member Functions | |
| template<typename T > | |
| static Result< ComponentBatch > | empty (const ComponentDescriptor &descriptor) |
| Creates a new empty component batch with a given descriptor. | |
| template<typename T > | |
| static Result< ComponentBatch > | from_loggable (const rerun::Collection< T > &components, const ComponentDescriptor &descriptor) |
| Creates a new component batch from a collection of component instances. | |
| template<typename T > | |
| static Result< ComponentBatch > | from_loggable (const T &component, const ComponentDescriptor &descriptor) |
| Creates a new component batch from a single component instance. | |
| template<typename T > | |
| static Result< ComponentBatch > | from_loggable (const std::optional< T > &component, const ComponentDescriptor &descriptor) |
| Creates a new data cell from a single optional component instance. | |
| template<typename T > | |
| static Result< ComponentBatch > | from_loggable (const std::optional< rerun::Collection< T > > &components, const ComponentDescriptor &descriptor) |
| Creates a new data cell from an optional collection of component instances. | |
| static Result< ComponentBatch > | from_arrow_array (std::shared_ptr< arrow::Array > array, const ComponentDescriptor &descriptor) |
| Creates a new component batch from an already existing arrow array. | |
Public Attributes | |
| std::shared_ptr< arrow::Array > | array |
| Arrow-encoded data of the component instances. | |
| ComponentTypeHandle | component_type |
| The type of the component instances in array. | |
Arrow-encoded data of a single batch of components together with a component descriptor.
Component descriptors are registered when first encountered.
|
inlinestatic |
Creates a new component batch from a collection of component instances.
Automatically registers the descriptor the first time it is encountered.
TODO(#4257) should take a rerun::Collection instead of pointer and size.
|
inlinestatic |
Creates a new component batch from a single component instance.
Automatically registers the descriptor the first time it is encountered.
|
inlinestatic |
Creates a new data cell from a single optional component instance.
None is represented as a data cell with 0 instances.
Automatically registers the descriptor the first time it is encountered.
|
inlinestatic |
Creates a new data cell from an optional collection of component instances.
None is represented as a data cell with 0 instances.
Automatically registers the descriptor the first time it is encountered.
|
static |
Creates a new component batch from an already existing arrow array.
Automatically registers the descriptor the first time it is encountered.
| Result< ComponentColumn > rerun::ComponentBatch::partitioned | ( | const Collection< uint32_t > & | lengths | ) | && |
Partitions the component data into multiple sub-batches.
Specifically, this transforms the existing ComponentBatch data into a ComponentColumn.
This makes it possible to use RecordingStream::send_columns to send columnar data directly into Rerun.
| lengths | The number of components in each run. for rerun::RecordingStream::send_columns, this specifies the number of components at each time point. The sum of the lengths must be equal to the number of components in the batch. |
| Result< ComponentColumn > rerun::ComponentBatch::partitioned | ( | ) | && |
Partitions the component data into unit-length sub-batches.
Specifically, this transforms the existing ComponentBatch data into a ComponentColumn. This makes it possible to use RecordingStream::send_columns to send columnar data directly into Rerun.
| Result< ComponentColumn > rerun::ComponentBatch::partitioned | ( | const Collection< uint32_t > & | lengths | ) | const & |
Partitions the component data into multiple sub-batches.
Specifically, this transforms the existing ComponentBatch data into a ComponentColumn. This makes it possible to use RecordingStream::send_columns to send columnar data directly into Rerun.
| lengths | The number of components in each run. for rerun::RecordingStream::send_columns, this specifies the number of components at each time point. The sum of the lengths must be equal to the number of components in the batch. |
| Result< ComponentColumn > rerun::ComponentBatch::partitioned | ( | ) | const & |
Partitions the component data into unit-length sub-batches.
Specifically, this transforms the existing ComponentBatch data into a ComponentColumn. This makes it possible to use RecordingStream::send_columns to send columnar data directly into Rerun.
| Error rerun::ComponentBatch::to_c_ffi_struct | ( | rr_component_batch & | out_component_batch | ) | const |
To rerun C API component batch.
The resulting rr_component_batch keeps the arrow::Array alive until it is released.