![]() |
ezEngine Release 26.3
|
Base class for all message handlers in the reflection system's message dispatch framework. More...
#include <MessageHandler.h>

Public Member Functions | |
| EZ_ALWAYS_INLINE void | operator() (void *pInstance, ezMessage &ref_msg) |
| EZ_FORCE_INLINE void | operator() (const void *pInstance, ezMessage &ref_msg) |
| EZ_ALWAYS_INLINE ezMessageId | GetMessageId () const |
| EZ_ALWAYS_INLINE bool | IsConst () const |
Protected Types | |
| using | DispatchFunc = void(*)(ezAbstractMessageHandler *pSelf, void *pInstance, ezMessage &) |
| using | ConstDispatchFunc = void(*)(ezAbstractMessageHandler *pSelf, const void *pInstance, ezMessage &) |
Protected Attributes | ||
| union { | ||
| DispatchFunc m_DispatchFunc = nullptr | ||
| ConstDispatchFunc m_ConstDispatchFunc | ||
| }; | ||
| ezMessageId | m_Id = ezSmallInvalidIndex | |
| bool | m_bIsConst = false | |
Base class for all message handlers in the reflection system's message dispatch framework.
Message handlers allow types to declare methods that can receive and process specific message types through the reflection system. This enables loose coupling and dynamic message routing without requiring direct method calls or explicit dependencies.
The handler system supports both const and non-const member functions, automatically detecting the appropriate calling convention at compile time. Messages are dispatched through type-safe function pointers with minimal overhead.
This is typically used internally by the reflection macros and should not be used directly. Instead, use EZ_BEGIN_MESSAGEHANDLERS / EZ_MESSAGE_HANDLER / EZ_END_MESSAGEHANDLERS in your reflected type definitions.