Sen API
Sen Libraries
Loading...
Searching...
No Matches
sen::db::Cursor< End, T > Class Template Reference

A cursor that can be used to iterate over the contents of a recording. The cursor holds a payload which can have one of the values given as type arguments. More...

#include <cursor.h>

Classes

struct  Entry
 The current entry. More...

Public Types

using Payload = std::variant<std::monostate, T..., End>
 The content of the current entry.

Public Member Functions

 ~Cursor ()=default
bool atEnd () const noexcept
 True if the cursor is at the end of the recording.
bool atBegining () const noexcept
 True if the cursor is at the start of the recording.
const Entryget () const noexcept
 The current entry.
const Entryoperator-> () const noexcept
 The current entry.
Cursor & operator++ ()
 Advance the cursor one step.

Friends

class Input

Detailed Description

template<typename End, typename... T>
class sen::db::Cursor< End, T >

A cursor that can be used to iterate over the contents of a recording. The cursor holds a payload which can have one of the values given as type arguments.


Class Documentation

◆ sen::db::Cursor::Entry

struct sen::db::Cursor::Entry
template<typename End, typename... T>
struct sen::db::Cursor< End, T >::Entry

The current entry.

Class Members
TimeStamp time
Payload payload When.

Member Typedef Documentation

◆ Payload

template<typename End, typename... T>
using sen::db::Cursor< End, T >::Payload = std::variant<std::monostate, T..., End>

The content of the current entry.

Constructor & Destructor Documentation

◆ ~Cursor()

template<typename End, typename... T>
sen::db::Cursor< End, T >::~Cursor ( )
default

Member Function Documentation

◆ atEnd()

template<typename End, typename... T>
bool sen::db::Cursor< End, T >::atEnd ( ) const
inlinenodiscardnoexcept

True if the cursor is at the end of the recording.

◆ atBegining()

template<typename End, typename... T>
bool sen::db::Cursor< End, T >::atBegining ( ) const
inlinenodiscardnoexcept

True if the cursor is at the start of the recording.

◆ get()

template<typename End, typename... T>
const Entry & sen::db::Cursor< End, T >::get ( ) const
inlinenodiscardnoexcept

The current entry.

◆ operator->()

template<typename End, typename... T>
const Entry & sen::db::Cursor< End, T >::operator-> ( ) const
inlinenodiscardnoexcept

The current entry.

◆ operator++()

template<typename End, typename... T>
Cursor & sen::db::Cursor< End, T >::operator++ ( )
inline

Advance the cursor one step.

◆ Input

template<typename End, typename... T>
friend class Input
friend

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