Skip to main content

TypedWorldCommandDispatcher Class Template

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

Declaration

template <typename T> class helios::engine::runtime::messaging::command::TypedWorldCommandDispatcher<T> { ... }

Base class

classWorldCommandDispatcher

Abstract dispatcher interface for type-safe WorldCommand handling. More...

Public Member Functions Index

template <typename T>
voiddispatch (helios::engine::runtime::world::GameWorld &gameWorld, const WorldCommand &command) override

Dispatches the command by downcasting to the concrete type. More...

Protected Member Functions Index

template <typename T>
voiddispatchTyped (helios::engine::runtime::world::GameWorld &gameWorld, const T &command) noexcept=0

Handles the dispatched command with full type information. More...

Description

Type-safe dispatcher template for handling specific WorldCommand types.

Template Parameters
T

The concrete WorldCommand type this dispatcher handles.

TypedWorldCommandDispatcher provides a type-safe bridge between the polymorphic dispatch() method and a typed dispatchTyped() handler. Derived classes override dispatchTyped() to handle commands with full type information.

See Also

WorldCommandDispatcher for the base interface

See Also

CommandBuffer::addDispatcher for registration

Definition at line 34 of file TypedWorldCommandDispatcher.ixx.

Public Member Functions

dispatch()

template <typename T>
void helios::engine::runtime::messaging::command::TypedWorldCommandDispatcher< T >::dispatch (helios::engine::runtime::world::GameWorld & gameWorld, const WorldCommand & command)
inline virtual

Dispatches the command by downcasting to the concrete type.

Parameters
gameWorld

The game world context.

command

The base command reference.

Definition at line 60 of file TypedWorldCommandDispatcher.ixx.

60 void dispatch(
63 ) override {
64 dispatchTyped(gameWorld, static_cast<const T&>(command));
65 }

Reference helios::engine::runtime::messaging::command::TypedWorldCommandDispatcher< T >::dispatchTyped.

Protected Member Functions

dispatchTyped()

template <typename T>
virtual void helios::engine::runtime::messaging::command::TypedWorldCommandDispatcher< T >::dispatchTyped (helios::engine::runtime::world::GameWorld & gameWorld, const T & command)
noexcept protected

Handles the dispatched command with full type information.

Parameters
gameWorld

The game world context.

command

The typed command to process.

info

Implementations must be noexcept.

Definition at line 47 of file TypedWorldCommandDispatcher.ixx.

Referenced by helios::engine::runtime::messaging::command::TypedWorldCommandDispatcher< T >::dispatch.


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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.