Rebel Fork Framework
Urho3D::EventHandler Class Reference

Internal helper class for invoking event handler functions. More...

#include <Urho3D/Core/Object.h>

Inheritance diagram for Urho3D::EventHandler:

Public Types

using HandlerFunction = ea::function<void(Object* receiver, StringHash eventType, VariantMap& eventData)>

Public Member Functions

 EventHandler (Object *receiver, HandlerFunction handler)
 Construct with specified receiver and handler.
template<class T>
 EventHandler (Object *receiver, T handler)
 Construct with specified receiver and handler of flexible signature.
void SetSenderAndEventType (Object *sender, StringHash eventType)
 Set sender and event type.
void Invoke (VariantMap &eventData) const
 Invoke event handler function.
Object * GetReceiver () const
 Return event receiver.
Object * GetSender () const
 Return event sender. Null if the handler is non-specific.
const StringHash & GetEventType () const
 Return event type.

Static Private Member Functions

template<class T>
static HandlerFunction WrapHandler (T &&handler)
template<class T>
static HandlerFunction WrapGenericHandler (T &&handler)
template<class T>
static HandlerFunction WrapMemberHandler (T &&handler)

Private Attributes

Object * receiver_
Object * sender_
StringHash eventType_
HandlerFunction handler_

Detailed Description

Internal helper class for invoking event handler functions.


The documentation for this class was generated from the following file:
  • Urho3D/Core/Object.h