6#include "../archetype_utils.hpp"
7#include "../collection.hpp"
8#include "../component_batch.hpp"
9#include "../component_column.hpp"
10#include "../components/name.hpp"
11#include "../components/timestamp.hpp"
12#include "../result.hpp"
28 std::optional<ComponentBatch>
name;
32 static constexpr const char ArchetypeName[] =
"rerun.archetypes.RecordingInfo";
65 return std::move(*
this);
77 return std::move(*
this);
83 return std::move(*
this);
92 return std::move(*
this);
104 return detail::partition_batches({&
start_time, &
name}, lengths_).value_or_throw();
112 return detail::partition_batches_of_unit_length({&
start_time, &
name}).value_or_throw();
120 template <
typename T>
125 struct AsComponents<archetypes::RecordingInfo> {
127 static Result<Collection<ComponentBatch>> as_batches(
128 const archetypes::RecordingInfo& archetype
130 return detail::collect_batches({&archetype.start_time, &archetype.name});
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:49
All built-in archetypes. See Types in the Rerun manual.
Definition rerun.hpp:90
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:26
static Result< ComponentBatch > from_loggable(const rerun::Collection< T > &components, const ComponentDescriptor &descriptor)
Creates a new component batch from a collection of component instances.
Definition component_batch.hpp:46
A ComponentDescriptor fully describes the semantics of a column of data.
Definition component_descriptor.hpp:16
The Loggable trait is used by all built-in implementation of rerun::AsComponents to serialize a colle...
Definition loggable.hpp:11
Archetype: A list of properties associated with a recording.
Definition recording_info.hpp:21
static constexpr auto Descriptor_name
ComponentDescriptor for the name field.
Definition recording_info.hpp:40
Collection< ComponentColumn > columns()
Partitions the component data into unit-length sub-batches.
Definition recording_info.hpp:111
RecordingInfo with_name(const rerun::components::Name &_name) &&
A user-chosen name for the recording.
Definition recording_info.hpp:81
Collection< ComponentColumn > columns(const Collection< uint32_t > &lengths_)
Partitions the component data into multiple sub-batches.
Definition recording_info.hpp:103
static constexpr auto Descriptor_start_time
ComponentDescriptor for the start_time field.
Definition recording_info.hpp:35
static constexpr const char ArchetypeName[]
The name of the archetype as used in ComponentDescriptors.
Definition recording_info.hpp:32
RecordingInfo with_many_name(const Collection< rerun::components::Name > &_name) &&
This method makes it possible to pack multiple name in a single component batch.
Definition recording_info.hpp:90
static RecordingInfo update_fields()
Update only some specific fields of a RecordingInfo.
Definition recording_info.hpp:52
std::optional< ComponentBatch > start_time
When the recording started.
Definition recording_info.hpp:25
std::optional< ComponentBatch > name
A user-chosen name for the recording.
Definition recording_info.hpp:28
static RecordingInfo clear_fields()
Clear all the fields of a RecordingInfo.
RecordingInfo with_start_time(const rerun::components::Timestamp &_start_time) &&
When the recording started.
Definition recording_info.hpp:62
RecordingInfo with_many_start_time(const Collection< rerun::components::Timestamp > &_start_time) &&
This method makes it possible to pack multiple start_time in a single component batch.
Definition recording_info.hpp:72
Component: A display name, typically for an entity or a item like a plot series.
Definition name.hpp:19
Component: When the recording started.
Definition timestamp.hpp:16