Skip to main content

SpawnCommandDispatcher Class

Dispatcher that routes SpawnCommands to the appropriate handler. More...

Declaration

class helios::engine::runtime::spawn::dispatcher::SpawnCommandDispatcher { ... }

Base class

classTypedWorldCommandDispatcher<T>

Type-safe dispatcher template for handling specific WorldCommand types. More...

Public Constructors Index

SpawnCommandDispatcher ()=default

Protected Member Functions Index

voiddispatchTyped (helios::engine::runtime::world::GameWorld &gameWorld, const helios::engine::runtime::spawn::commands::SpawnCommand &command) noexcept override

Dispatches a SpawnCommand to the registered handler. More...

Description

Dispatcher that routes SpawnCommands to the appropriate handler.

SpawnCommandDispatcher is a typed command dispatcher that handles SpawnCommand instances. When a SpawnCommand is dispatched, it submits the command directly to the pool's registered SpawnCommandHandler.

This enables the command-based spawn architecture where the GameObjectSpawnSystem emits SpawnCommands that are later processed by the SpawnManager during the manager flush phase.

See Also

SpawnCommand

See Also

SpawnManager

See Also

SpawnCommandHandler

Definition at line 33 of file SpawnCommandDispatcher.ixx.

Public Constructors

SpawnCommandDispatcher()

helios::engine::runtime::spawn::dispatcher::SpawnCommandDispatcher::SpawnCommandDispatcher ()
default

Definition at line 62 of file SpawnCommandDispatcher.ixx.

Protected Member Functions

dispatchTyped()

void helios::engine::runtime::spawn::dispatcher::SpawnCommandDispatcher::dispatchTyped (helios::engine::runtime::world::GameWorld & gameWorld, const helios::engine::runtime::spawn::commands::SpawnCommand & command)
inline noexcept protected virtual

Dispatches a SpawnCommand to the registered handler.

Looks up the SpawnCommandHandler for the command's profile ID and submits the command directly for deferred processing.

Parameters
gameWorld

The game world containing the pool.

command

The SpawnCommand to dispatch.

Definition at line 47 of file SpawnCommandDispatcher.ixx.

50 ) noexcept override {
51
52 auto spawnProfileId = command.spawnProfileId();
53
54 if (auto* spawnCommandHandler = gameWorld.spawnCommandHandler(spawnProfileId)) {
55 spawnCommandHandler->submit(command);
56 }
57 };

The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.