Template Struct Cursor

Struct Documentation

template<typename Derived>
struct Cursor

Unsynchronized ordinal cursor, independent of elapsed time or grid cells.

A zero limit throws; the initial index must be below the limit. set_frame() wraps/clamps later selections. offset() is metadata, not added to index().

Public Functions

inline std::size_t offset() const noexcept

Declaration: [[nodiscard]]

inline std::size_t index() const noexcept

Declaration: [[nodiscard]]

inline std::size_t limit() const noexcept

Declaration: [[nodiscard]]

inline IndexPolicy index_policy() const noexcept

Declaration: [[nodiscard]]

inline Derived &operator[](const std::size_t frame)
inline void set_frame(const std::size_t frame) noexcept
inline Cursor(std::size_t offset, std::size_t index, std::size_t limit, IndexPolicy index_policy = IndexPolicy::Wrap)
Cursor(const Cursor&) = default
Cursor(Cursor&&) noexcept = default
Cursor &operator=(const Cursor&) = default
Cursor &operator=(Cursor&&) noexcept = default

Protected Functions

~Cursor() = default

Protected Attributes

std::size_t offset_ = 0
std::size_t index_ = 0
std::size_t limit_ = 0
IndexPolicy index_policy_