|
tess 1.0.0
Performance-first tile and path simulation substrate
|
#include <tess/sim/path_agent_tick.h>
Public Member Functions | |
| void | reserve (std::size_t agent_count) |
| void | clear () noexcept |
| auto | request (std::size_t index, const PathAgentState &agent) -> bool |
| void | request_all (std::span< const PathAgentState > agents) |
| auto | empty () const noexcept -> bool |
| auto | pending () const noexcept -> std::size_t |
| auto | contains (std::size_t index) const noexcept -> bool |
| auto | front () const noexcept -> std::optional< std::size_t > |
| void | pop_front () noexcept |
Caller-owned FIFO of agent indices awaiting replanning.
Pending indices are deduplicated. Like retained routes and recovery schedules, the queue is paired with the caller's agent-span indices; reorder or compact only when also clearing or equivalently remapping it. The queue is externally synchronized. Separate owners may process separate queues concurrently with independent path scratch.
|
inlinenodiscardnoexcept |
Whether index is currently waiting in this queue.
Membership is what makes request idempotent: a second request for a pending agent is refused. Exposing it lets a caller skip work it would otherwise do to build a request that is certain to be refused – selecting over long routes, for instance. Membership begins at an accepted request and ends at the matching pop_front or at clear.