commands Folder
Files Index
| file | helios/engine/runtime/spawn/commands/_module.ixx |
|
Aggregate module for helios::engine::runtime::spawn::commands namespace. More... | |
| file | DespawnCommand.ixx |
|
Command for requesting GameObject despawning and pool return. More... | |
| file | ScheduledSpawnPlanCommand.ixx |
|
Command for executing a scheduled spawn plan. More... | |
| file | SpawnCommand.ixx |
|
Command for requesting GameObject spawning from a pool. More... | |
Description
helios::engine::runtime::spawn::commands
Commands for spawn and despawn operations.
Overview
This module contains command classes that represent spawn and despawn operations. These commands are emitted by systems and submitted directly to the SpawnCommandHandler during the command flush phase.
The system is built around compile-time type safety: command types are declared as template parameters, eliminating virtual dispatch overhead for queue access and enabling the compiler to verify command routing at build time.
Architecture
Key Classes
| Class | Purpose |
|---|---|
| CommandBuffer | Abstract base for command buffers |
| TypedCommandBuffer<...Cmds> | Compile-time typed buffer with per-type queues |
| CommandHandlerRegistry | Registry storing typed submit functions |
| EngineCommandBuffer | Concrete facade pre-configured with all engine command types |
Flush Routing
During TypedCommandBuffer::flush(), each command type is processed in template parameter order:
1. Handler route: If a handler for Cmd is registered in the CommandHandlerRegistry, all queued commands are submitted to the handler via the stored function pointer. 2. Direct execution: Otherwise, if the command satisfies ExecutableCommand, it executes itself 3. Assertion: If neither applies, an assertion fires (misconfiguration)
Usage
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.