Class Context

Class Documentation

class Context

Declaration: final

One requested action namespace.

Move/reset/destruction require exclusive access to this handle, on any thread. Removal takes effect at the next poll; previously published ticks/views retain their own state. A valid lease is an accepted request, not proof that a poll has installed its mappings.

Public Functions

Context() = default

Create an empty lease with false bool and identity 0.

~Context()

Mark this context for removal at the next poll; never rewrite already retained snapshots/ticks.

Context(Context &&other) noexcept

Transfer the accepted request; the source becomes empty.

Serialize access to both handles.

Context &operator=(Context &&other) noexcept

Release the destination request for next-poll removal, then transfer other; no published history is changed.

Context(const Context&) = delete
Context &operator=(const Context&) = delete
void reset() noexcept

Idempotently request removal and empty this handle.

May run on any producer with exclusive access; detached held buttons publish release and axes zero at a later poll.

explicit operator bool() const noexcept

Declaration: [[nodiscard]]

Return whether a live accepted/noninvalidated lease exists, not whether a poll has installed its mappings.

Input destruction/clear invalidates leases.

ContextId id() const noexcept

Declaration: [[nodiscard]]

Copy the namespace identity,0 for empty.

A retained nonzero identity can query old Tick state after reset/destruction; it is not a saved-game identifier.