Rerun C++ SDK
Loading...
Searching...
No Matches
timeline.hpp
1#pragma once
2
3#include "error.hpp"
4
5#include <string>
6
7struct rr_timeline;
8
9namespace rerun {
10 /// Describes the type of a timeline or time point.
11 enum class TimeType {
12 /// Used e.g. for frames in a film.
13 Sequence = 1,
14
15 /// Nanoseconds.
16 Duration = 2,
17
18 /// Nanoseconds since Unix epoch (1970-01-01 00:00:00 UTC).
19 Timestamp = 3,
20 };
21
22 /// Definition of a timeline.
23 struct Timeline {
24 /// The name of the timeline.
25 std::string name;
26
27 /// The type of the timeline.
29
30 /// Creates a new timeline.
31 Timeline(std::string name_, TimeType type_) : name(std::move(name_)), type(type_) {}
32
33 Timeline() = delete;
34
35 /// To rerun C API timeline.
36 Error to_c_ffi_struct(rr_timeline& out_column) const;
37 };
38} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:99
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
TimeType
Describes the type of a timeline or time point.
Definition timeline.hpp:11
@ Sequence
Used e.g. for frames in a film.
@ Timestamp
Nanoseconds since Unix epoch (1970-01-01 00:00:00 UTC).
@ Duration
Nanoseconds.
Definition of a timeline.
Definition timeline.hpp:23
std::string name
The name of the timeline.
Definition timeline.hpp:25
Timeline(std::string name_, TimeType type_)
Creates a new timeline.
Definition timeline.hpp:31
Error to_c_ffi_struct(rr_timeline &out_column) const
To rerun C API timeline.
TimeType type
The type of the timeline.
Definition timeline.hpp:28