Rerun C++ SDK
Loading...
Searching...
No Matches
rerun::DataCell Struct Reference

Arrow-encoded data of a single batch components for a single entity. More...

#include <rerun/data_cell.hpp>

Public Member Functions

Error to_c_ffi_struct (rr_data_cell &out_cell) const
 To rerun C API data cell.
 

Static Public Member Functions

template<typename T >
static Result< DataCellfrom_loggable (const rerun::Collection< T > &components)
 Creates a new data cell from a collection of component instances.
 
template<typename T >
static Result< DataCellfrom_loggable (const T &component)
 Creates a new data cell from a single component instance.
 

Public Attributes

size_t num_instances
 How many instances of the component were serialized in this data cell.
 
std::shared_ptr< arrow::Array > array
 Arrow-encoded data of the component instances.
 
ComponentTypeHandle component_type
 The type of the component instances in array.
 

Detailed Description

Arrow-encoded data of a single batch components for a single entity.

Note that the DataCell doesn't own datatype and component_name.

Member Function Documentation

◆ from_loggable() [1/2]

template<typename T >
static Result< DataCell > rerun::DataCell::from_loggable ( const rerun::Collection< T > &  components)
inlinestatic

Creates a new data cell from a collection of component instances.

Automatically registers the component type the first time this type is encountered.

TODO(#4257) should take a rerun::Collection instead of pointer and size.

◆ from_loggable() [2/2]

template<typename T >
static Result< DataCell > rerun::DataCell::from_loggable ( const T &  component)
inlinestatic

Creates a new data cell from a single component instance.

Automatically registers the component type the first time this type is encountered.

◆ to_c_ffi_struct()

Error rerun::DataCell::to_c_ffi_struct ( rr_data_cell &  out_cell) const

To rerun C API data cell.

The resulting rr_data_cell keeps the arrow::Array alive until it is released.

Member Data Documentation

◆ num_instances

size_t rerun::DataCell::num_instances

How many instances of the component were serialized in this data cell.

TODO(andreas): Just like in Rust, make this part of AsComponents. This will requiring inlining some things on RecordingStream and have some refactor ripples. But it's worth keeping the language bindings more similar!


The documentation for this struct was generated from the following file: