11template<
typename EventType,
typename ClassType>
15 static_assert(std::is_class_v<ClassType>);
26 template<auto MethodPtr,
typename Class>
44 template<
typename DispatchFunc>
45 void dispatch(
const EventType& e, DispatchFunc dispatchFunc);
47 void dispatch(
const EventType& e);
52template<
typename EventType,
typename ClassType>
57 return m_dispatcher.
addListener(std::move(listener));
60template<
typename EventType,
typename ClassType>
61template<auto MethodPtr,
typename Class>
63 Class*
const instancePtr)
66 return m_dispatcher.addListener(
Listener{}.template set<MethodPtr>(instancePtr));
69template<
typename EventType,
typename ClassType>
73 m_dispatcher.removeListener(listener);
76template<
typename EventType,
typename ClassType>
80 m_dispatcher.removeListenerImmediately(listener);
83template<
typename EventType,
typename ClassType>
84template<
typename DispatchFunc>
86 const EventType& e, DispatchFunc dispatchFunc)
88 m_dispatcher.dispatch(e, std::move(dispatchFunc));
91template<
typename EventType,
typename ClassType>
92inline void TClassEventDispatcher<EventType, ClassType>::dispatch(
95 m_dispatcher.dispatch(e);
Definition TClassEventDispatcher.h:13
void removeListenerImmediately(Listener *listener)
Same as TEventDispatcher::removeListenerImmediately().
Definition TClassEventDispatcher.h:77
void removeListener(Listener *listener)
Same as TEventDispatcher::removeListener().
Definition TClassEventDispatcher.h:70
Listener * addListener(Listener listener)
Same as TEventDispatcher::addListener().
Definition TClassEventDispatcher.h:53
Listener * addListener(Class *instancePtr)
DispatcherType::Listener Listener
Definition TClassEventDispatcher.h:20
Definition TEventDispatcher.h:23
TEventListener< EventType > Listener
Definition TEventDispatcher.h:27
Listener * addListener(Listener listener)
Definition TEventDispatcher.h:67
Definition ph_editor.h:10