12#ifndef ECS__EVENT_DELEGATE_H__
13#define ECS__EVENT_DELEGATE_H__
17namespace ECS {
namespace Event {
42 template<
class Class,
class EventType>
45 typedef void(Class::*
Callback)(
const EventType*
const);
76 static const u64 SEID { EventType::STATIC_EVENT_TYPE_ID };
89 return ((this->m_Callback == delegate->
m_Callback) && (this->m_Receiver == delegate->
m_Receiver));
void(Class::* Callback)(const EventType *const)
bool operator==(const IEventDelegate *other) const override
EventDelegate(Class *receiver, Callback &callbackFunction)
void invoke(const IEvent *const e) override
u64 GetStaticEventTypeId() const override
EventDelegateId GetDelegateId() const override
IEventDelegate * clone() override
virtual void invoke(const IEvent *const e)=0
virtual bool operator==(const IEventDelegate *other) const =0
virtual IEventDelegate * clone()=0
virtual EventDelegateId GetDelegateId() const =0
virtual u64 GetStaticEventTypeId() const =0