EngineCommandBuffer Class
Concrete command buffer pre-configured with all engine command types. More...
Declaration
Public Member Typedefs Index
| using | EngineRoleTag = helios::engine::common::tags::CommandBufferRole |
|
Tag identifying this type as a command buffer for ResourceRegistry. More... | |
Private Member Typedefs Index
Public Member Functions Index
template <class T, class... Args> | |
| void | add (Args &&... args) |
|
Enqueues a command of the specified type. More... | |
| void | flush (GameWorld &gameWorld, UpdateContext &updateContext) noexcept |
|
Flushes all command queues via the underlying TypedCommandBuffer. More... | |
| void | clear () noexcept |
|
Discards all queued commands without executing them. More... | |
Private Member Attributes Index
| BufferImpl | impl_ |
|
The buffer implementation instance. More... | |
Description
Concrete command buffer pre-configured with all engine command types.
EngineCommandBuffer is a thin facade over a TypedCommandBuffer instantiated with the full set of command types used by the engine. It is registered as a resource in the GameWorld and wrapped by a type-erased CommandBuffer via the Concept/Model pattern. Systems access it via `UpdateContext::queueCommand<T>()`.
## Registered Command Types
| Domain | Commands | |--------|----------| | Combat | `Aim2DCommand`, `ShootCommand`, `ApplyDamageCommand` | | Motion | `Move2DCommand`, `SteeringCommand` | | Scoring | `UpdateScoreCommand` | | Spawn | `ScheduledSpawnPlanCommand`, `SpawnCommand`, `DespawnCommand` | | State | `StateCommand<GameState>`, `DelayedStateCommand<GameState>`, `StateCommand<MatchState>`, `DelayedStateCommand<MatchState>` | | UI | `UiActionCommand` | | Timing | `TimerControlCommand` | | Lifecycle | `WorldLifecycleCommand` |
- See Also
- See Also
- See Also
Definition at line 81 of file EngineCommandBuffer.ixx.
Public Member Typedefs
EngineRoleTag
|
Tag identifying this type as a command buffer for ResourceRegistry.
Definition at line 119 of file EngineCommandBuffer.ixx.
Private Member Typedefs
BufferImpl
|
The underlying typed buffer with all engine command types.
Definition at line 87 of file EngineCommandBuffer.ixx.
Public Member Functions
add()
| inline |
Enqueues a command of the specified type.
- Template Parameters
-
T The command type. Must be one of the registered command types.
Args Constructor argument types.
- Parameters
-
args Arguments forwarded to the command constructor.
Definition at line 130 of file EngineCommandBuffer.ixx.
Reference add.
Referenced by add.
clear()
| inline noexcept |
Discards all queued commands without executing them.
Definition at line 148 of file EngineCommandBuffer.ixx.
flush()
| inline noexcept |
Flushes all command queues via the underlying TypedCommandBuffer.
- Parameters
-
gameWorld The game world where the commands are flushed.
updateContext The current frame's update context.
Definition at line 141 of file EngineCommandBuffer.ixx.
Private Member Attributes
impl_
|
The buffer implementation instance.
Definition at line 112 of file EngineCommandBuffer.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.