Skip to main content

ScheduledSpawnPlanCommandDispatcher.ixx File

Dispatcher for routing ScheduledSpawnPlanCommands to the SpawnManager. More...

Included Headers

Namespaces Index

namespacehelios
namespaceengine

Main engine module aggregating core infrastructure and game systems. More...

namespaceruntime

Runtime infrastructure for game execution and lifecycle orchestration. More...

namespacespawn

Entity spawning infrastructure for the helios engine. More...

namespacedispatcher

Command dispatchers for spawn operations. More...

Classes Index

classScheduledSpawnPlanCommandDispatcher

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

Description

Dispatcher for routing ScheduledSpawnPlanCommands to the SpawnManager.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file ScheduledSpawnPlanCommandDispatcher.ixx
3 * @brief Dispatcher for routing ScheduledSpawnPlanCommands to the SpawnManager.
4 */
5module;
6
7#include <cassert>
8
9export module helios.engine.runtime.spawn.dispatcher.ScheduledSpawnPlanCommandDispatcher;
10
11import helios.engine.runtime.spawn.commands.ScheduledSpawnPlanCommand;
12import helios.engine.runtime.messaging.command.TypedWorldCommandDispatcher;
13import helios.engine.runtime.world.GameWorld;
14
16
17 /**
18 * @brief Dispatcher that routes ScheduledSpawnPlanCommands to the appropriate handler.
19 *
20 * @details ScheduledSpawnPlanCommandDispatcher is a typed command dispatcher that
21 * handles ScheduledSpawnPlanCommand instances. When a command is dispatched, it
22 * submits the command directly to the pool's registered SpawnCommandHandler.
23 *
24 * This dispatcher bridges the SpawnScheduler output (ScheduledSpawnPlan) with
25 * the SpawnManager's command processing pipeline.
26 *
27 * @see ScheduledSpawnPlanCommand
28 * @see SpawnScheduler
29 * @see SpawnManager
30 */
32 helios::engine::runtime::spawn::commands::ScheduledSpawnPlanCommand> {
33
34 protected:
35
36 /**
37 * @brief Dispatches a ScheduledSpawnPlanCommand to the registered handler.
38 *
39 * @details Looks up the SpawnCommandHandler for the command's profile ID
40 * and submits the command directly for deferred processing.
41 *
42 * @param gameWorld The game world containing the pool.
43 * @param command The ScheduledSpawnPlanCommand to dispatch.
44 */
48 ) noexcept override {
49
50 if (auto* spawnCommandHandler = gameWorld.spawnCommandHandler(
51 command.spawnProfileId()
52 )) {
53 spawnCommandHandler->submit(command);
54 }
55 }
56
57 public:
58
59 /**
60 * @brief Default constructor.
61 */
63
64 };
65
66
67}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.