Raven Engine v0.1
Loading...
Searching...
No Matches
EventDispatcher.h File Reference

Utility for dispatching an Event to the appropriate handler based on its concrete type. More...

Classes

class  Raven::EventDispatcher
 Routes an Event to a matching handler function. More...

Namespaces

namespace  Raven

Detailed Description

Utility for dispatching an Event to the appropriate handler based on its concrete type.

Author
PhilikusHD

The EventDispatcher wraps a reference to a base Event and provides a type-safe Dispatch<T>(handler) method. If the stored event matches the specified type T, the handler is invoked with the casted event, and the event's Handled flag is updated. This enables clean separation of event routing logic without dynamic_cast overhead.

Template Parameters
None(class methods are templated)