Class Tick

Class Documentation

class Tick

Immutable State and ordered records for one independently scheduled update.

The baseline is the last consumed sample. New polls are consumed together in publication order, regardless of how many transitions they contain. Owns sample handles/record storage. Read-only queries may cross threads; spans/filter views borrow this value and cannot survive its move/destruction.

Public Functions

Tick(std::shared_ptr<const Actions::Snapshot> previous, std::vector<std::shared_ptr<const Actions::Snapshot>> polls)
Tick(std::shared_ptr<const Actions::Snapshot> previous, std::vector<std::shared_ptr<const Actions::Snapshot>> polls, ObservationClock::time_point since, ObservationClock::time_point until)
Actions::ButtonTickState button(Actions::Id action) const

Declaration: [[nodiscard]]

Actions::AxisTickState axis(Actions::Id action) const

Declaration: [[nodiscard]]

inline std::span<const std::shared_ptr<const Actions::Snapshot>> polls() const

Declaration: [[nodiscard]]

std::shared_ptr<const Actions::Snapshot> latest_poll() const

Declaration: [[nodiscard]]

inline ObservationDuration elapsed() const

Declaration: [[nodiscard]]

inline std::span<const Events::Record> records() const

Declaration: [[nodiscard]]

inline auto records_for(const Routing::TargetId target, const std::optional<std::uint64_t> epoch = {}) const

Declaration: [[nodiscard]]

inline auto gameplay_events() const

Declaration: [[nodiscard]]