Skip to main content

TypedTargetedCommandDispatcher Class Template

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

Declaration

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

Base class

classTargetedCommandDispatcher

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

Public Member Functions Index

template <typename T>
voiddispatch (helios::engine::ecs::GameObject gameObject, const TargetedCommand &command) override

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

Protected Member Functions Index

template <typename T>
voiddispatchTyped (helios::engine::ecs::GameObject gameObject, const T &command) noexcept=0

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

Description

Type-safe dispatcher template for handling specific TargetedCommand types.

Template Parameters
T

The concrete TargetedCommand type this dispatcher handles.

TypedTargetedCommandDispatcher 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

TargetedCommandDispatcher for the base interface

See Also

CommandBuffer::addDispatcher for registration

Definition at line 33 of file TypedTargetedCommandDispatcher.ixx.

Public Member Functions

dispatch()

template <typename T>
void helios::engine::runtime::messaging::command::TypedTargetedCommandDispatcher< T >::dispatch (helios::engine::ecs::GameObject gameObject, const TargetedCommand & command)
inline virtual

Dispatches the command by downcasting to the concrete type.

Parameters
gameObject

The target GameObject.

command

The base command reference.

Definition at line 59 of file TypedTargetedCommandDispatcher.ixx.

59 void dispatch(
62 ) override {
63 dispatchTyped(gameObject, static_cast<const T&>(command));
64 }

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

Protected Member Functions

dispatchTyped()

template <typename T>
virtual void helios::engine::runtime::messaging::command::TypedTargetedCommandDispatcher< T >::dispatchTyped (helios::engine::ecs::GameObject gameObject, const T & command)
noexcept protected

Handles the dispatched command with full type information.

Parameters
gameObject

The target GameObject.

command

The typed command to process.

info

Implementations must be noexcept.

Definition at line 46 of file TypedTargetedCommandDispatcher.ixx.

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


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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.