7#include "collection.hpp"
16 "Found a macro 'Unsorted' (probably from X11), conflicting with `rerun::SortingStatus::Unsorted`. Add '#undef Unsorted' before '#include <rerun.hpp>' to work around this."
46 std::shared_ptr<arrow::Array>
array;
77 Timeline(std::move(timeline_name), TimeType::Sequence),
78 std::move(sequence_points),
114 template <
typename TRep,
typename TPeriod>
116 std::string timeline_name,
117 const Collection<std::chrono::duration<TRep, TPeriod>>& chrono_times,
120 std::vector<int64_t> times(chrono_times.size());
121 for (
size_t i = 0; i < chrono_times.size(); i++) {
123 std::chrono::duration_cast<std::chrono::nanoseconds>(chrono_times[i]).count();
126 Timeline(std::move(timeline_name), TimeType::Time),
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:49
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:95
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:22
SortingStatus
Describes whether an array is known to be sorted or not.
Definition time_column.hpp:27
@ Sorted
The array is known to be sorted.
@ Unsorted
The array is known to be unsorted.
@ Unknown
It's not known whether the array is sorted or not.
Arrow-encoded data for a column of time points.
Definition time_column.hpp:41
Timeline timeline
The timeline this column belongs to.
Definition time_column.hpp:43
TimeColumn(Timeline timeline, Collection< int64_t > times, SortingStatus sorting_status=SortingStatus::Unknown)
Creates a time column from an array of time points.
static TimeColumn from_seconds(std::string timeline_name, Collection< double > times_in_seconds, SortingStatus sorting_status=SortingStatus::Unknown)
Creates a time column from an array of seconds.
std::shared_ptr< arrow::Array > array
Time points as a primitive array of i64.
Definition time_column.hpp:46
static TimeColumn from_times(std::string timeline_name, const Collection< std::chrono::duration< TRep, TPeriod > > &chrono_times, SortingStatus sorting_status=SortingStatus::Unknown)
Creates a time column from an array of arbitrary std::chrono durations.
Definition time_column.hpp:115
static TimeColumn from_nanoseconds(std::string timeline_name, Collection< int64_t > times_in_nanoseconds, SortingStatus sorting_status=SortingStatus::Unknown)
Creates a time column from an array of nanoseconds.
Error to_c_ffi_struct(rr_time_column &out_column) const
To rerun C API component batch.
static TimeColumn from_sequence_points(std::string timeline_name, Collection< int64_t > sequence_points, SortingStatus sorting_status=SortingStatus::Unknown)
Creates a time column from an array of sequence points.
Definition time_column.hpp:72
SortingStatus sorting_status
The sorting order of the times array.
Definition time_column.hpp:49
Definition of a timeline.
Definition timeline.hpp:17