mirror of
https://github.com/holub/mame
synced 2025-04-25 09:50:04 +03:00
Add support for 5 parameter delegate functions.
This commit is contained in:
parent
9af5ac7b32
commit
92dcb49a13
@ -157,20 +157,29 @@ public:
|
||||
// and member function pointer of the appropriate type and number of parameters; we use
|
||||
// partial template specialization to support fewer parameters by defaulting the later
|
||||
// parameters to the special type _noparam
|
||||
template<typename _ClassType, typename _ReturnType, typename _P1Type, typename _P2Type, typename _P3Type, typename _P4Type>
|
||||
template<typename _ClassType, typename _ReturnType, typename _P1Type, typename _P2Type, typename _P3Type, typename _P4Type, typename _P5Type>
|
||||
struct delegate_traits
|
||||
{
|
||||
typedef _ReturnType (*static_func_type)(_ClassType *, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type);
|
||||
typedef _ReturnType (*static_ref_func_type)(_ClassType &, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type);
|
||||
typedef _ReturnType (_ClassType::*member_func_type)(_P1Type, _P2Type, _P3Type, _P4Type, _P5Type);
|
||||
};
|
||||
|
||||
// dummy class used to indicate a non-existant parameter
|
||||
class _noparam { };
|
||||
|
||||
// specialization for 4 parameters
|
||||
template<typename _ClassType, typename _ReturnType, typename _P1Type, typename _P2Type, typename _P3Type, typename _P4Type>
|
||||
struct delegate_traits<_ClassType, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _noparam>
|
||||
{
|
||||
typedef _ReturnType (*static_func_type)(_ClassType *, _P1Type, _P2Type, _P3Type, _P4Type);
|
||||
typedef _ReturnType (*static_ref_func_type)(_ClassType &, _P1Type, _P2Type, _P3Type, _P4Type);
|
||||
typedef _ReturnType (_ClassType::*member_func_type)(_P1Type, _P2Type, _P3Type, _P4Type);
|
||||
};
|
||||
|
||||
// dummy class used to indicate a non-existant parameter
|
||||
class _noparam { };
|
||||
|
||||
// specialization for 3 parameters
|
||||
template<typename _ClassType, typename _ReturnType, typename _P1Type, typename _P2Type, typename _P3Type>
|
||||
struct delegate_traits<_ClassType, _ReturnType, _P1Type, _P2Type, _P3Type, _noparam>
|
||||
struct delegate_traits<_ClassType, _ReturnType, _P1Type, _P2Type, _P3Type, _noparam, _noparam>
|
||||
{
|
||||
typedef _ReturnType (*static_func_type)(_ClassType *, _P1Type, _P2Type, _P3Type);
|
||||
typedef _ReturnType (*static_ref_func_type)(_ClassType &, _P1Type, _P2Type, _P3Type);
|
||||
@ -179,7 +188,7 @@ struct delegate_traits<_ClassType, _ReturnType, _P1Type, _P2Type, _P3Type, _nopa
|
||||
|
||||
// specialization for 2 parameters
|
||||
template<typename _ClassType, typename _ReturnType, typename _P1Type, typename _P2Type>
|
||||
struct delegate_traits<_ClassType, _ReturnType, _P1Type, _P2Type, _noparam, _noparam>
|
||||
struct delegate_traits<_ClassType, _ReturnType, _P1Type, _P2Type, _noparam, _noparam, _noparam>
|
||||
{
|
||||
typedef _ReturnType (*static_func_type)(_ClassType *, _P1Type, _P2Type);
|
||||
typedef _ReturnType (*static_ref_func_type)(_ClassType &, _P1Type, _P2Type);
|
||||
@ -188,7 +197,7 @@ struct delegate_traits<_ClassType, _ReturnType, _P1Type, _P2Type, _noparam, _nop
|
||||
|
||||
// specialization for 1 parameter
|
||||
template<typename _ClassType, typename _ReturnType, typename _P1Type>
|
||||
struct delegate_traits<_ClassType, _ReturnType, _P1Type, _noparam, _noparam, _noparam>
|
||||
struct delegate_traits<_ClassType, _ReturnType, _P1Type, _noparam, _noparam, _noparam, _noparam>
|
||||
{
|
||||
typedef _ReturnType (*static_func_type)(_ClassType *, _P1Type);
|
||||
typedef _ReturnType (*static_ref_func_type)(_ClassType &, _P1Type);
|
||||
@ -197,7 +206,7 @@ struct delegate_traits<_ClassType, _ReturnType, _P1Type, _noparam, _noparam, _no
|
||||
|
||||
// specialization for no parameters
|
||||
template<typename _ClassType, typename _ReturnType>
|
||||
struct delegate_traits<_ClassType, _ReturnType, _noparam, _noparam, _noparam, _noparam>
|
||||
struct delegate_traits<_ClassType, _ReturnType, _noparam, _noparam, _noparam, _noparam, _noparam>
|
||||
{
|
||||
typedef _ReturnType (*static_func_type)(_ClassType *);
|
||||
typedef _ReturnType (*static_ref_func_type)(_ClassType &);
|
||||
@ -262,11 +271,11 @@ struct delegate_raw_mfp
|
||||
// ======================> delegate
|
||||
|
||||
// general delegate class template supporting up to 4 parameters
|
||||
template<typename _ReturnType, typename _P1Type = _noparam, typename _P2Type = _noparam, typename _P3Type = _noparam, typename _P4Type = _noparam>
|
||||
template<typename _ReturnType, typename _P1Type = _noparam, typename _P2Type = _noparam, typename _P3Type = _noparam, typename _P4Type = _noparam, typename _P5Type = _noparam>
|
||||
class delegate_base
|
||||
{
|
||||
typedef delegate_generic_class *(*late_bind_func)(delegate_late_bind &object);
|
||||
typedef typename delegate_traits<delegate_generic_class, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type>::static_func_type generic_static_func;
|
||||
typedef typename delegate_traits<delegate_generic_class, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type>::static_func_type generic_static_func;
|
||||
|
||||
public:
|
||||
// generic constructor
|
||||
@ -297,7 +306,7 @@ public:
|
||||
|
||||
// construct from member function with object pointer
|
||||
template<class _FunctionClass>
|
||||
delegate_base(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type>::member_func_type funcptr, const char *name, _FunctionClass *object)
|
||||
delegate_base(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type>::member_func_type funcptr, const char *name, _FunctionClass *object)
|
||||
: m_name(name),
|
||||
m_object(NULL),
|
||||
m_callobject(reinterpret_cast<delegate_generic_class *>(this)),
|
||||
@ -307,7 +316,7 @@ public:
|
||||
|
||||
// construct from static function with object pointer
|
||||
template<class _FunctionClass>
|
||||
delegate_base(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type>::static_func_type funcptr, const char *name, _FunctionClass *object)
|
||||
delegate_base(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type>::static_func_type funcptr, const char *name, _FunctionClass *object)
|
||||
: m_name(name),
|
||||
m_object(NULL),
|
||||
m_callobject(NULL),
|
||||
@ -316,7 +325,7 @@ public:
|
||||
|
||||
// construct from static reference function with object pointer
|
||||
template<class _FunctionClass>
|
||||
delegate_base(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type>::static_ref_func_type funcptr, const char *name, _FunctionClass *object)
|
||||
delegate_base(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type>::static_ref_func_type funcptr, const char *name, _FunctionClass *object)
|
||||
: m_name(name),
|
||||
m_object(NULL),
|
||||
m_callobject(NULL),
|
||||
@ -355,6 +364,7 @@ public:
|
||||
_ReturnType operator()(_P1Type p1, _P2Type p2) const { return (*m_function)(m_callobject, p1, p2); }
|
||||
_ReturnType operator()(_P1Type p1, _P2Type p2, _P3Type p3) const { return (*m_function)(m_callobject, p1, p2, p3); }
|
||||
_ReturnType operator()(_P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4) const { return (*m_function)(m_callobject, p1, p2, p3, p4); }
|
||||
_ReturnType operator()(_P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4, _P5Type p5) const { return (*m_function)(m_callobject, p1, p2, p3, p4, p5); }
|
||||
|
||||
// late binding
|
||||
void late_bind(delegate_late_bind &object) { bind((*m_latebinder)(object)); }
|
||||
@ -416,6 +426,15 @@ protected:
|
||||
return (reinterpret_cast<_FunctionClass *>(_this->m_object)->*mfp)(p1, p2, p3, p4);
|
||||
}
|
||||
|
||||
template<class _FunctionClass>
|
||||
static _ReturnType method_stub(delegate_generic_class *object, _P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4, _P5Type p5)
|
||||
{
|
||||
typedef _ReturnType (_FunctionClass::*mfptype)(_P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4, _P5Type p5);
|
||||
delegate_base *_this = reinterpret_cast<delegate_base *>(object);
|
||||
mfptype &mfp = _this->m_rawfunction.mfp<mfptype>();
|
||||
return (reinterpret_cast<_FunctionClass *>(_this->m_object)->*mfp)(p1, p2, p3, p4, p5);
|
||||
}
|
||||
|
||||
// late binding helper
|
||||
template<class _FunctionClass>
|
||||
static delegate_generic_class *late_bind_helper(delegate_late_bind &object)
|
||||
@ -495,11 +514,11 @@ struct delegate_internal_mfp
|
||||
|
||||
// ======================> delegate
|
||||
|
||||
template<typename _ReturnType, typename _P1Type = _noparam, typename _P2Type = _noparam, typename _P3Type = _noparam, typename _P4Type = _noparam>
|
||||
template<typename _ReturnType, typename _P1Type = _noparam, typename _P2Type = _noparam, typename _P3Type = _noparam, typename _P4Type = _noparam, typename _P5Type = _noparam>
|
||||
class delegate_base
|
||||
{
|
||||
typedef delegate_generic_class *(*late_bind_func)(delegate_late_bind &object);
|
||||
typedef typename delegate_traits<delegate_generic_class, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type>::static_func_type generic_static_func;
|
||||
typedef typename delegate_traits<delegate_generic_class, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type>::static_func_type generic_static_func;
|
||||
|
||||
public:
|
||||
// generic constructor
|
||||
@ -527,7 +546,7 @@ public:
|
||||
|
||||
// construct from member function with object pointer
|
||||
template<class _FunctionClass>
|
||||
delegate_base(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type>::member_func_type funcptr, const char *name, _FunctionClass *object)
|
||||
delegate_base(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type>::member_func_type funcptr, const char *name, _FunctionClass *object)
|
||||
: m_name(name),
|
||||
m_object(NULL),
|
||||
m_function(NULL),
|
||||
@ -536,7 +555,7 @@ public:
|
||||
|
||||
// construct from static function with object pointer
|
||||
template<class _FunctionClass>
|
||||
delegate_base(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type>::static_func_type funcptr, const char *name, _FunctionClass *object)
|
||||
delegate_base(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type>::static_func_type funcptr, const char *name, _FunctionClass *object)
|
||||
: m_name(name),
|
||||
m_object(NULL),
|
||||
m_function(reinterpret_cast<generic_static_func>(funcptr)),
|
||||
@ -544,7 +563,7 @@ public:
|
||||
|
||||
// construct from static reference function with object pointer
|
||||
template<class _FunctionClass>
|
||||
delegate_base(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type>::static_ref_func_type funcptr, const char *name, _FunctionClass *object)
|
||||
delegate_base(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type>::static_ref_func_type funcptr, const char *name, _FunctionClass *object)
|
||||
: m_name(name),
|
||||
m_object(NULL),
|
||||
m_function(reinterpret_cast<generic_static_func>(funcptr)),
|
||||
@ -581,6 +600,7 @@ public:
|
||||
_ReturnType operator()(_P1Type p1, _P2Type p2) const { return (*m_function)(m_object, p1, p2); }
|
||||
_ReturnType operator()(_P1Type p1, _P2Type p2, _P3Type p3) const { return (*m_function)(m_object, p1, p2, p3); }
|
||||
_ReturnType operator()(_P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4) const { return (*m_function)(m_object, p1, p2, p3, p4); }
|
||||
_ReturnType operator()(_P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4, _P5Type p5) const { return (*m_function)(m_object, p1, p2, p3, p4, p5); }
|
||||
|
||||
// late binding
|
||||
void late_bind(delegate_late_bind &object) { bind((*m_latebinder)(object)); }
|
||||
@ -630,9 +650,9 @@ public:
|
||||
delegate() : basetype() { }
|
||||
delegate(const basetype &src) : basetype(src) { }
|
||||
delegate(const basetype &src, delegate_late_bind &object) : basetype(src, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _noparam, _noparam, _noparam, _noparam>::member_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _noparam, _noparam, _noparam, _noparam>::static_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _noparam, _noparam, _noparam, _noparam>::static_ref_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _noparam, _noparam, _noparam, _noparam, _noparam>::member_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _noparam, _noparam, _noparam, _noparam, _noparam>::static_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _noparam, _noparam, _noparam, _noparam, _noparam>::static_ref_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
delegate &operator=(const basetype &src) { *static_cast<basetype *>(this) = src; return *this; }
|
||||
};
|
||||
|
||||
@ -645,9 +665,9 @@ public:
|
||||
delegate() : basetype() { }
|
||||
delegate(const basetype &src) : basetype(src) { }
|
||||
delegate(const basetype &src, delegate_late_bind &object) : basetype(src, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _noparam, _noparam, _noparam>::member_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _noparam, _noparam, _noparam>::static_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _noparam, _noparam, _noparam>::static_ref_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _noparam, _noparam, _noparam, _noparam>::member_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _noparam, _noparam, _noparam, _noparam>::static_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _noparam, _noparam, _noparam, _noparam>::static_ref_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
delegate &operator=(const basetype &src) { *static_cast<basetype *>(this) = src; return *this; }
|
||||
};
|
||||
|
||||
@ -660,9 +680,9 @@ public:
|
||||
delegate() : basetype() { }
|
||||
delegate(const basetype &src) : basetype(src) { }
|
||||
delegate(const basetype &src, delegate_late_bind &object) : basetype(src, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _noparam, _noparam>::member_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _noparam, _noparam>::static_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _noparam, _noparam>::static_ref_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _noparam, _noparam, _noparam>::member_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _noparam, _noparam, _noparam>::static_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _noparam, _noparam, _noparam>::static_ref_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
delegate &operator=(const basetype &src) { *static_cast<basetype *>(this) = src; return *this; }
|
||||
};
|
||||
|
||||
@ -675,9 +695,9 @@ public:
|
||||
delegate() : basetype() { }
|
||||
delegate(const basetype &src) : basetype(src) { }
|
||||
delegate(const basetype &src, delegate_late_bind &object) : basetype(src, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _noparam>::member_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _noparam>::static_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _noparam>::static_ref_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _noparam, _noparam>::member_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _noparam, _noparam>::static_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _noparam, _noparam>::static_ref_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
delegate &operator=(const basetype &src) { *static_cast<basetype *>(this) = src; return *this; }
|
||||
};
|
||||
|
||||
@ -690,9 +710,24 @@ public:
|
||||
delegate() : basetype() { }
|
||||
delegate(const basetype &src) : basetype(src) { }
|
||||
delegate(const basetype &src, delegate_late_bind &object) : basetype(src, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type>::member_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type>::static_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type>::static_ref_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _noparam>::member_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _noparam>::static_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _noparam>::static_ref_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
delegate &operator=(const basetype &src) { *static_cast<basetype *>(this) = src; return *this; }
|
||||
};
|
||||
|
||||
// specialize for 5 parameters
|
||||
template<typename _ReturnType, typename _P1Type, typename _P2Type, typename _P3Type, typename _P4Type, typename _P5Type>
|
||||
class delegate<_ReturnType (_P1Type, _P2Type, _P3Type, _P4Type, _P5Type)> : public delegate_base<_ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type>
|
||||
{
|
||||
typedef delegate_base<_ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type> basetype;
|
||||
public:
|
||||
delegate() : basetype() { }
|
||||
delegate(const basetype &src) : basetype(src) { }
|
||||
delegate(const basetype &src, delegate_late_bind &object) : basetype(src, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type>::member_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type>::static_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
template<class _FunctionClass> delegate(typename delegate_traits<_FunctionClass, _ReturnType, _P1Type, _P2Type, _P3Type, _P4Type, _P5Type>::static_ref_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object) { }
|
||||
delegate &operator=(const basetype &src) { *static_cast<basetype *>(this) = src; return *this; }
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user