25template <
typename End,
typename... T>
46 [[nodiscard]]
bool atEnd() const noexcept {
return std::holds_alternative<End>(entry_.payload); }
49 [[nodiscard]]
bool atBegining() const noexcept {
return std::holds_alternative<std::monostate>(entry_.payload); }
52 [[nodiscard]]
const Entry&
get() const noexcept {
return entry_; }
55 [[nodiscard]]
const Entry&
operator->() const noexcept {
return entry_; }
60 frontProvider_(entry_);
66 using Provider = std::function<void(Entry&)>;
69 explicit Cursor(Provider frontProvider): frontProvider_(
std::move(frontProvider)) {}
73 Provider frontProvider_;
Here we define a set of template meta-programming helpers to let the compiler take some decisions bas...
A point in time.
Definition timestamp.h:26
Payload payload
When.
Definition cursor.h:38
bool atEnd() const noexcept
True if the cursor is at the end of the recording.
Definition cursor.h:46
std::variant< std::monostate, T..., End > Payload
The content of the current entry.
Definition cursor.h:32
const Entry & get() const noexcept
The current entry.
Definition cursor.h:52
friend class Input
Definition cursor.h:65
const Entry & operator->() const noexcept
The current entry.
Definition cursor.h:55
Cursor & operator++()
Advance the cursor one step.
Definition cursor.h:58
TimeStamp time
Definition cursor.h:37
bool atBegining() const noexcept
True if the cursor is at the start of the recording.
Definition cursor.h:49
The current entry.
Definition cursor.h:36
Represents the end of the recording. Used in cursors.
Definition input.h:52
Definition annotation.h:20