3#include "IDelegateInvoker.hpp"
7namespace CP_SDK::Utils::Internals {
10 template<
class t_Class,
class t_Ret,
class... t_Args>
22 m_Handler = p_Handler;
29 return m_Handler !=
nullptr;
37 && m_Owner ==
reinterpret_cast<const DelegateInvokerI<t_Class, t_Ret, t_Args...
>*>(p_Other)->m_Owner
38 && m_Handler ==
reinterpret_cast<const DelegateInvokerI<t_Class, t_Ret, t_Args...
>*>(p_Other)->m_Handler;
42 t_Ret
Invoke(t_Args... p_Args)
const override
44 return (m_Owner->*m_Handler)(std::forward<t_Args>(p_Args)...);
49 t_Ret(t_Class::* m_Handler)(t_Args...);
Instance function invoker.
DelegateInvokerI(t_Class *p_Owner, t_Ret(t_Class::*p_Handler)(t_Args...))
Constructor.
bool IsValid() const override
Is the delegate valid.
t_Ret Invoke(t_Args... p_Args) const override
Invoke this invoker.
bool EqualTo(const IDelegateInvoker< t_Ret, t_Args... > *p_Other) const override
Is this invoker equal to an other invoker.
Delegate invoker interface.
int GetKind() const
Get delegate invoker kind.