23#include "FastDelegate.h"
34 typedef fastdelegate::detail::DefaultVoid DefaultVoid;
36 struct DelegateMementoHack :
37 public fastdelegate::DelegateMemento
40 void copy_pthis(fastdelegate::DelegateMemento &memento_to,
const fastdelegate::DelegateMemento &memento_from)
42 memento_to.*(&DelegateMementoHack::m_pthis) = memento_from.*(&DelegateMementoHack::m_pthis);
46 bool is_equal_pFunction(
const fastdelegate::DelegateMemento &memento1,
const fastdelegate::DelegateMemento &memento2)
48 fastdelegate::DelegateMemento
49 lhs(memento1), rhs(memento2);
50 lhs.*(&DelegateMementoHack::m_pthis) = NULL;
51 rhs.*(&DelegateMementoHack::m_pthis) = NULL;
52 return lhs.IsEqual(rhs);
56 bool is_less_pFunction(
const fastdelegate::DelegateMemento &memento1,
const fastdelegate::DelegateMemento &memento2)
58 fastdelegate::DelegateMemento
59 lhs(memento1), rhs(memento2);
60 lhs.*(&DelegateMementoHack::m_pthis) = NULL;
61 rhs.*(&DelegateMementoHack::m_pthis) = NULL;
62 return lhs.IsLess(rhs);
68 class ReturnT = detail::DefaultVoid,
69 class Param1T = detail::DefaultVoid,
70 class Param2T = detail::DefaultVoid,
71 class Param3T = detail::DefaultVoid,
72 class Param4T = detail::DefaultVoid,
73 class Param5T = detail::DefaultVoid,
74 class Param6T = detail::DefaultVoid,
75 class Param7T = detail::DefaultVoid,
76 class Param8T = detail::DefaultVoid,
77 class ParamUnusedT = detail::DefaultVoid
81 template<
class ReturnT>
82 class delegate<ReturnT, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid> :
83 public fastdelegate::FastDelegate0<ReturnT>
85 typedef ReturnT(*free_function_like_member_t)(
void* );
87 typedef ReturnT(delegate::* f_proxy_type)()
const;
91 f_proxy_type get_proxy(Y*, ReturnT(*)(Y*))
const
92 {
return &delegate::f_proxy<Y>; }
96 f_proxy_type get_proxy(Y*, ReturnT(*)(
const Y*))
const
97 {
return &delegate::f_proxy_const<Y>; }
101 f_proxy_type get_proxy(
const Y*, ReturnT(*)(
const Y*))
const
102 {
return &delegate::f_proxy_const<Y>; }
105 typedef fastdelegate::FastDelegate0< ReturnT > base_type;
107 typedef delegate type;
115 template <
class X,
class Y >
117 ReturnT(X::* function_to_bind)( ))
118 : base_type(pthis, function_to_bind),
122 assert(NULL != pthis);
123 assert(NULL != function_to_bind);
126 template <
class X,
class Y >
127 delegate(
const Y *pthis,
128 ReturnT(X::* function_to_bind)( )
const)
129 : base_type(pthis, function_to_bind),
133 assert(NULL != pthis);
134 assert(NULL != function_to_bind);
139 ReturnT(*function_to_bind)(Y* ))
140 : base_type(this, get_proxy(pthis, function_to_bind)),
141 m_pthis(static_cast<void*>(pthis)),
142 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
147 ReturnT(*function_to_bind)(
const Y* ))
148 : base_type(this, get_proxy(pthis, function_to_bind)),
149 m_pthis(static_cast<void*>(pthis)),
150 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
154 delegate(
const Y *pthis,
155 ReturnT(*function_to_bind)(
const Y*))
156 : base_type(this, get_proxy(pthis, function_to_bind)),
157 m_pthis(static_cast<void*>(pthis)),
158 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
162 delegate(ReturnT(*function_to_bind)( ))
163 : base_type(function_to_bind),
167 assert(NULL != function_to_bind);
170 delegate(
const delegate &other)
173 f_proxy_type proxy = &delegate::f_proxy<delegate>;
174 base_type::bind(
this, proxy);
175 fastdelegate::DelegateMemento tmp = (base_type(other)).GetMemento();
176 if(other.m_free_func)
177 detail::DelegateMementoHack::copy_pthis(tmp, base_type::GetMemento());
178 base_type::SetMemento(tmp);
181 memcpy(&m_pthis, &other.m_pthis,
sizeof(m_pthis));
182 memcpy(&m_free_func, &other.m_free_func,
sizeof(m_free_func));
185 void operator=(
const delegate &other)
188 f_proxy_type proxy = &delegate::f_proxy<delegate>;
189 base_type::bind(
this, proxy);
190 fastdelegate::DelegateMemento tmp = (base_type(other)).GetMemento();
191 if(other.m_free_func)
192 detail::DelegateMementoHack::copy_pthis(tmp, base_type::GetMemento());
193 base_type::SetMemento(tmp);
196 memcpy(&m_pthis, &other.m_pthis,
sizeof(m_pthis));
197 memcpy(&m_free_func, &other.m_free_func,
sizeof(m_free_func));
200 bool operator==(
const delegate &other)
const
202 if(!m_free_func && !other.m_free_func)
203 return (
static_cast<const base_type&
>(*
this) ==
static_cast<const base_type&
>(other) );
205 if(m_pthis == other.m_pthis && m_free_func == other.m_free_func)
206 return detail::DelegateMementoHack::is_equal_pFunction((base_type(*
this)).GetMemento(), (base_type(other)).GetMemento());
211 bool operator!=(
const delegate &other)
const
213 return !(*
this == other);
216 bool operator<(
const delegate &other)
const
218 if(!m_free_func && !other.m_free_func)
219 return (
static_cast<const base_type&
>(*
this) <
static_cast<const base_type&
>(other) );
220 if(m_pthis != other.m_pthis)
221 return m_pthis < other.m_pthis;
222 if(m_free_func != other.m_free_func)
223 return m_free_func < other.m_free_func;
224 return detail::DelegateMementoHack::is_less_pFunction((base_type(*
this)).GetMemento(), (base_type(other)).GetMemento());
227 bool operator>(
const delegate &other)
const
229 if(!m_free_func && !other.m_free_func)
230 return (
static_cast<const base_type&
>(*
this) >
static_cast<const base_type&
>(other) );
231 if(m_pthis != other.m_pthis)
232 return m_pthis > other.m_pthis;
233 if(m_free_func != other.m_free_func)
234 return m_free_func > other.m_free_func;
235 return detail::DelegateMementoHack::is_less_pFunction((base_type(other)).GetMemento(), (base_type(*
this)).GetMemento());
239 inline void bind(Y *pthis, ReturnT(*function_to_bind)(Y* )) {
241 m_pthis =
static_cast<void*
>(pthis);
242 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
243 bind(
this, get_proxy(pthis, function_to_bind));
247 inline void bind(Y *pthis, ReturnT(*function_to_bind)(
const Y* )) {
249 m_pthis =
static_cast<void*
>(pthis);
250 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
251 bind(
this, get_proxy(pthis, function_to_bind));
255 inline void bind(
const Y *pthis, ReturnT(*function_to_bind)(
const Y*)) {
257 m_pthis =
static_cast<void*
>(pthis);
258 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
259 bind(
this, get_proxy(pthis, function_to_bind));
262 template <
class X,
class Y >
263 inline void bind(Y *pthis, ReturnT(X::* function_to_bind)()) {
264 assert(NULL != pthis);
265 assert(NULL != function_to_bind);
266 m_pthis = NULL; m_free_func = NULL;
267 base_type::bind(pthis, function_to_bind);
270 template <
class X,
class Y >
271 inline void bind(
const Y *pthis, ReturnT(X::* function_to_bind)()
const) {
272 assert(NULL != pthis);
273 assert(NULL != function_to_bind);
274 m_pthis = NULL; m_free_func = NULL;
275 base_type::bind(pthis, function_to_bind);
278 inline void bind(ReturnT(*function_to_bind)()) {
279 assert(NULL != function_to_bind);
280 m_pthis = NULL; m_free_func = NULL;
281 base_type::bind(function_to_bind);
287 free_function_like_member_t m_free_func;
290 ReturnT f_proxy()
const
292 typedef ReturnT(*type_free_function_like_member_t)(Y* );
294 return reinterpret_cast<type_free_function_like_member_t
>(m_free_func)(
static_cast<Y*
>(m_pthis));
298 ReturnT f_proxy_const()
const
300 typedef ReturnT(*type_free_function_like_member_t)(
const Y* );
302 return reinterpret_cast<type_free_function_like_member_t
>(m_free_func)(
static_cast<const Y*
>(m_pthis));
306 template<
class ReturnT,
class Param1T>
307 class delegate<ReturnT, Param1T, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid> :
308 public fastdelegate::FastDelegate1<Param1T, ReturnT>
310 typedef ReturnT(*free_function_like_member_t)(
void*, Param1T);
312 typedef ReturnT(delegate::* f_proxy_type)(Param1T)
const;
316 f_proxy_type get_proxy(Y*, ReturnT(*)(Y*, Param1T))
const
317 {
return &delegate::f_proxy<Y>; }
321 f_proxy_type get_proxy(Y*, ReturnT(*)(
const Y*, Param1T))
const
322 {
return &delegate::f_proxy_const<Y>; }
326 f_proxy_type get_proxy(
const Y*, ReturnT(*)(
const Y*, Param1T))
const
327 {
return &delegate::f_proxy_const<Y>; }
330 typedef fastdelegate::FastDelegate1<Param1T, ReturnT> base_type;
332 typedef delegate type;
340 template <
class X,
class Y >
342 ReturnT(X::* function_to_bind)(Param1T))
343 : base_type(pthis, function_to_bind),
347 assert(NULL != pthis);
348 assert(NULL != function_to_bind);
351 template <
class X,
class Y >
352 delegate(
const Y *pthis,
353 ReturnT(X::* function_to_bind)(Param1T)
const)
354 : base_type(pthis, function_to_bind),
358 assert(NULL != pthis);
359 assert(NULL != function_to_bind);
364 ReturnT(*function_to_bind)(Y*, Param1T))
365 : base_type(this, get_proxy(pthis, function_to_bind)),
366 m_pthis(static_cast<void*>(pthis)),
367 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
372 ReturnT(*function_to_bind)(
const Y*, Param1T))
373 : base_type(this, get_proxy(pthis, function_to_bind)),
374 m_pthis(static_cast<void*>(pthis)),
375 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
379 delegate(
const Y *pthis,
380 ReturnT(*function_to_bind)(
const Y*, Param1T))
381 : base_type(this, get_proxy(pthis, function_to_bind)),
382 m_pthis(static_cast<void*>(pthis)),
383 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
387 delegate(ReturnT(*function_to_bind)(Param1T))
388 : base_type(function_to_bind),
392 assert(NULL != function_to_bind);
395 delegate(
const delegate &other)
398 f_proxy_type proxy = &delegate::f_proxy<delegate>;
399 base_type::bind(
this, proxy);
400 fastdelegate::DelegateMemento tmp = (base_type(other)).GetMemento();
401 if(other.m_free_func)
402 detail::DelegateMementoHack::copy_pthis(tmp, base_type::GetMemento());
403 base_type::SetMemento(tmp);
406 memcpy(&m_pthis, &other.m_pthis,
sizeof(m_pthis));
407 memcpy(&m_free_func, &other.m_free_func,
sizeof(m_free_func));
410 void operator=(
const delegate &other)
413 f_proxy_type proxy = &delegate::f_proxy<delegate>;
414 base_type::bind(
this, proxy);
415 fastdelegate::DelegateMemento tmp = (base_type(other)).GetMemento();
416 if(other.m_free_func)
417 detail::DelegateMementoHack::copy_pthis(tmp, base_type::GetMemento());
418 base_type::SetMemento(tmp);
421 memcpy(&m_pthis, &other.m_pthis,
sizeof(m_pthis));
422 memcpy(&m_free_func, &other.m_free_func,
sizeof(m_free_func));
425 bool operator==(
const delegate &other)
const
427 if(!m_free_func && !other.m_free_func)
428 return (
static_cast<const base_type&
>(*
this) ==
static_cast<const base_type&
>(other) );
430 if(m_pthis == other.m_pthis && m_free_func == other.m_free_func)
431 return detail::DelegateMementoHack::is_equal_pFunction((base_type(*
this)).GetMemento(), (base_type(other)).GetMemento());
436 bool operator!=(
const delegate &other)
const
438 return !(*
this == other);
441 bool operator<(
const delegate &other)
const
443 if(!m_free_func && !other.m_free_func)
444 return (
static_cast<const base_type&
>(*
this) <
static_cast<const base_type&
>(other) );
445 if(m_pthis != other.m_pthis)
446 return m_pthis < other.m_pthis;
447 if(m_free_func != other.m_free_func)
448 return m_free_func < other.m_free_func;
449 return detail::DelegateMementoHack::is_less_pFunction((base_type(*
this)).GetMemento(), (base_type(other)).GetMemento());
452 bool operator>(
const delegate &other)
const
454 if(!m_free_func && !other.m_free_func)
455 return (
static_cast<const base_type&
>(*
this) >
static_cast<const base_type&
>(other) );
456 if(m_pthis != other.m_pthis)
457 return m_pthis > other.m_pthis;
458 if(m_free_func != other.m_free_func)
459 return m_free_func > other.m_free_func;
460 return detail::DelegateMementoHack::is_less_pFunction((base_type(other)).GetMemento(), (base_type(*
this)).GetMemento());
464 inline void bind(Y *pthis, ReturnT(*function_to_bind)(Y*, Param1T)) {
466 m_pthis =
static_cast<void*
>(pthis);
467 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
468 bind(
this, get_proxy(pthis, function_to_bind));
472 inline void bind(Y *pthis, ReturnT(*function_to_bind)(
const Y*, Param1T)) {
474 m_pthis =
static_cast<void*
>(pthis);
475 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
476 bind(
this, get_proxy(pthis, function_to_bind));
480 inline void bind(
const Y *pthis, ReturnT(*function_to_bind)(
const Y*, Param1T)) {
482 m_pthis =
static_cast<void*
>(pthis);
483 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
484 bind(
this, get_proxy(pthis, function_to_bind));
487 template <
class X,
class Y >
488 inline void bind(Y *pthis, ReturnT(X::* function_to_bind)(Param1T)) {
489 assert(NULL != pthis);
490 assert(NULL != function_to_bind);
491 m_pthis = NULL; m_free_func = NULL;
492 base_type::bind(pthis, function_to_bind);
495 template <
class X,
class Y >
496 inline void bind(
const Y *pthis, ReturnT(X::* function_to_bind)(Param1T)
const) {
497 assert(NULL != pthis);
498 assert(NULL != function_to_bind);
499 m_pthis = NULL; m_free_func = NULL;
500 base_type::bind(pthis, function_to_bind);
503 inline void bind(ReturnT(*function_to_bind)(Param1T)) {
504 assert(NULL != function_to_bind);
505 m_pthis = NULL; m_free_func = NULL;
506 base_type::bind(function_to_bind);
511 free_function_like_member_t m_free_func;
514 ReturnT f_proxy(Param1T p1)
const
516 typedef ReturnT(*type_free_function_like_member_t)(Y*, Param1T);
518 return reinterpret_cast<type_free_function_like_member_t
>(m_free_func)(
static_cast<Y*
>(m_pthis), p1);
522 ReturnT f_proxy_const(Param1T p1)
const
524 typedef ReturnT(*type_free_function_like_member_t)(
const Y*, Param1T);
526 return reinterpret_cast<type_free_function_like_member_t
>(m_free_func)(
static_cast<const Y*
>(m_pthis), p1);
530 template<
class ReturnT,
class Param1T,
class Param2T>
531 class delegate<ReturnT, Param1T, Param2T, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid> :
532 public fastdelegate::FastDelegate2<Param1T, Param2T, ReturnT>
534 typedef ReturnT(*free_function_like_member_t)(
void*, Param1T, Param2T);
535 typedef ReturnT(*free_function_like_member_const_t)(
const void*, Param1T, Param2T);
537 typedef ReturnT(delegate::* f_proxy_type)(Param1T, Param2T)
const;
541 f_proxy_type get_proxy(Y*, ReturnT(*)(Y*, Param1T, Param2T))
const
542 {
return &delegate::f_proxy<Y>; }
546 f_proxy_type get_proxy(Y*, ReturnT(*)(
const Y*, Param1T, Param2T))
const
547 {
return &delegate::f_proxy_const<Y>; }
551 f_proxy_type get_proxy(
const Y*, ReturnT(*)(
const Y*, Param1T, Param2T))
const
552 {
return &delegate::f_proxy_const<Y>; }
555 typedef fastdelegate::FastDelegate2<Param1T, Param2T, ReturnT> base_type;
557 typedef delegate type;
565 template <
class X,
class Y >
567 ReturnT(X::* function_to_bind)(Param1T, Param2T))
568 : base_type(pthis, function_to_bind),
572 assert(NULL != pthis);
573 assert(NULL != function_to_bind);
576 template <
class X,
class Y >
577 delegate(
const Y *pthis,
578 ReturnT(X::* function_to_bind)(Param1T, Param2T)
const)
579 : base_type(pthis, function_to_bind),
583 assert(NULL != pthis);
584 assert(NULL != function_to_bind);
589 ReturnT(*function_to_bind)(Y*, Param1T, Param2T))
590 : base_type(this, get_proxy(pthis, function_to_bind)),
591 m_pthis(static_cast<void*>(pthis)),
592 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
597 ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T))
598 : base_type(this, get_proxy(pthis, function_to_bind)),
599 m_pthis(static_cast<void*>(pthis)),
600 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
604 delegate(
const Y *pthis,
605 ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T))
606 : base_type(this, get_proxy(pthis, function_to_bind)),
607 m_pthis(static_cast<void*>(pthis)),
608 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
612 delegate(ReturnT(*function_to_bind)(Param1T, Param2T))
613 : base_type(function_to_bind),
617 assert(NULL != function_to_bind);
620 delegate(
const delegate &other)
623 f_proxy_type proxy = &delegate::f_proxy<delegate>;
624 base_type::bind(
this, proxy);
625 fastdelegate::DelegateMemento tmp = (base_type(other)).GetMemento();
626 if(other.m_free_func)
627 detail::DelegateMementoHack::copy_pthis(tmp, base_type::GetMemento());
628 base_type::SetMemento(tmp);
631 memcpy(&m_pthis, &other.m_pthis,
sizeof(m_pthis));
632 memcpy(&m_free_func, &other.m_free_func,
sizeof(m_free_func));
635 void operator=(
const delegate &other)
638 f_proxy_type proxy = &delegate::f_proxy<delegate>;
639 base_type::bind(
this, proxy);
640 fastdelegate::DelegateMemento tmp = (base_type(other)).GetMemento();
641 if(other.m_free_func)
642 detail::DelegateMementoHack::copy_pthis(tmp, base_type::GetMemento());
643 base_type::SetMemento(tmp);
646 memcpy(&m_pthis, &other.m_pthis,
sizeof(m_pthis));
647 memcpy(&m_free_func, &other.m_free_func,
sizeof(m_free_func));
650 bool operator==(
const delegate &other)
const
652 if(!m_free_func && !other.m_free_func)
653 return (
static_cast<const base_type&
>(*
this) ==
static_cast<const base_type&
>(other) );
655 if(m_pthis == other.m_pthis && m_free_func == other.m_free_func)
656 return detail::DelegateMementoHack::is_equal_pFunction((base_type(*
this)).GetMemento(), (base_type(other)).GetMemento());
661 bool operator!=(
const delegate &other)
const
663 return !(*
this == other);
666 bool operator<(
const delegate &other)
const
668 if(!m_free_func && !other.m_free_func)
669 return (
static_cast<const base_type&
>(*
this) <
static_cast<const base_type&
>(other) );
670 if(m_pthis != other.m_pthis)
671 return m_pthis < other.m_pthis;
672 if(m_free_func != other.m_free_func)
673 return m_free_func < other.m_free_func;
674 return detail::DelegateMementoHack::is_less_pFunction((base_type(*
this)).GetMemento(), (base_type(other)).GetMemento());
677 bool operator>(
const delegate &other)
const
679 if(!m_free_func && !other.m_free_func)
680 return (
static_cast<const base_type&
>(*
this) >
static_cast<const base_type&
>(other) );
681 if(m_pthis != other.m_pthis)
682 return m_pthis > other.m_pthis;
683 if(m_free_func != other.m_free_func)
684 return m_free_func > other.m_free_func;
685 return detail::DelegateMementoHack::is_less_pFunction((base_type(other)).GetMemento(), (base_type(*
this)).GetMemento());
689 inline void bind(Y *pthis, ReturnT(*function_to_bind)(Y*, Param1T, Param2T)) {
691 m_pthis =
static_cast<void*
>(pthis);
692 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
693 bind(
this, get_proxy(pthis, function_to_bind));
697 inline void bind(Y *pthis, ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T)) {
699 m_pthis =
static_cast<void*
>(pthis);
700 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
701 bind(
this, get_proxy(pthis, function_to_bind));
705 inline void bind(
const Y *pthis, ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T)) {
707 m_pthis =
static_cast<void*
>(pthis);
708 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
709 bind(
this, get_proxy(pthis, function_to_bind));
712 template <
class X,
class Y >
713 inline void bind(Y *pthis, ReturnT(X::* function_to_bind)(Param1T, Param2T)) {
714 assert(NULL != pthis);
715 assert(NULL != function_to_bind);
716 m_pthis = NULL; m_free_func = NULL;
717 base_type::bind(pthis, function_to_bind);
720 template <
class X,
class Y >
721 inline void bind(
const Y *pthis, ReturnT(X::* function_to_bind)(Param1T, Param2T)
const) {
722 assert(NULL != pthis);
723 assert(NULL != function_to_bind);
724 m_pthis = NULL; m_free_func = NULL;
725 base_type::bind(pthis, function_to_bind);
728 inline void bind(ReturnT(*function_to_bind)(Param1T, Param2T)) {
729 assert(NULL != function_to_bind);
730 m_pthis = NULL; m_free_func = NULL;
731 base_type::bind(function_to_bind);
736 free_function_like_member_t m_free_func;
739 ReturnT f_proxy(Param1T p1, Param2T p2)
const
741 typedef ReturnT(*type_free_function_like_member_t)(Y*, Param1T, Param2T);
743 return reinterpret_cast<type_free_function_like_member_t
>(m_free_func)(
static_cast<Y*
>(m_pthis), p1, p2);
747 ReturnT f_proxy_const(Param1T p1, Param2T p2)
const
749 typedef ReturnT(*type_free_function_like_member_t)(
const Y*, Param1T, Param2T);
751 return reinterpret_cast<type_free_function_like_member_t
>(m_free_func)(
static_cast<const Y*
>(m_pthis), p1, p2);
755 template<
class ReturnT,
class Param1T,
class Param2T,
class Param3T>
756 class delegate<ReturnT, Param1T, Param2T, Param3T, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid> :
757 public fastdelegate::FastDelegate3<Param1T, Param2T, Param3T, ReturnT>
759 typedef ReturnT(*free_function_like_member_t)(
void*, Param1T, Param2T, Param3T);
761 typedef ReturnT(delegate::* f_proxy_type)(Param1T, Param2T, Param3T)
const;
765 f_proxy_type get_proxy(Y*, ReturnT(*)(Y*, Param1T, Param2T, Param3T))
const
766 {
return &delegate::f_proxy<Y>; }
770 f_proxy_type get_proxy(Y*, ReturnT(*)(
const Y*, Param1T, Param2T, Param3T))
const
771 {
return &delegate::f_proxy_const<Y>; }
775 f_proxy_type get_proxy(
const Y*, ReturnT(*)(
const Y*, Param1T, Param2T, Param3T))
const
776 {
return &delegate::f_proxy_const<Y>; }
779 typedef fastdelegate::FastDelegate3<Param1T, Param2T, Param3T, ReturnT> base_type;
781 typedef delegate type;
789 template <
class X,
class Y >
791 ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T))
792 : base_type(pthis, function_to_bind),
796 assert(NULL != pthis);
797 assert(NULL != function_to_bind);
800 template <
class X,
class Y >
801 delegate(
const Y *pthis,
802 ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T)
const)
803 : base_type(pthis, function_to_bind),
807 assert(NULL != pthis);
808 assert(NULL != function_to_bind);
813 ReturnT(*function_to_bind)(Y*, Param1T, Param2T, Param3T))
814 : base_type(this, get_proxy(pthis, function_to_bind)),
815 m_pthis(static_cast<void*>(pthis)),
816 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
821 ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T))
822 : base_type(this, get_proxy(pthis, function_to_bind)),
823 m_pthis(static_cast<void*>(pthis)),
824 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
828 delegate(
const Y *pthis,
829 ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T))
830 : base_type(this, get_proxy(pthis, function_to_bind)),
831 m_pthis(static_cast<void*>(pthis)),
832 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
836 delegate(ReturnT(*function_to_bind)(Param1T, Param2T, Param3T))
837 : base_type(function_to_bind),
841 assert(NULL != function_to_bind);
844 delegate(
const delegate &other)
847 f_proxy_type proxy = &delegate::f_proxy<delegate>;
848 base_type::bind(
this, proxy);
849 fastdelegate::DelegateMemento tmp = (base_type(other)).GetMemento();
850 if(other.m_free_func)
851 detail::DelegateMementoHack::copy_pthis(tmp, base_type::GetMemento());
852 base_type::SetMemento(tmp);
855 memcpy(&m_pthis, &other.m_pthis,
sizeof(m_pthis));
856 memcpy(&m_free_func, &other.m_free_func,
sizeof(m_free_func));
859 void operator=(
const delegate &other)
862 f_proxy_type proxy = &delegate::f_proxy<delegate>;
863 base_type::bind(
this, proxy);
864 fastdelegate::DelegateMemento tmp = (base_type(other)).GetMemento();
865 if(other.m_free_func)
866 detail::DelegateMementoHack::copy_pthis(tmp, base_type::GetMemento());
867 base_type::SetMemento(tmp);
870 memcpy(&m_pthis, &other.m_pthis,
sizeof(m_pthis));
871 memcpy(&m_free_func, &other.m_free_func,
sizeof(m_free_func));
874 bool operator==(
const delegate &other)
const
876 if(!m_free_func && !other.m_free_func)
877 return (
static_cast<const base_type&
>(*
this) ==
static_cast<const base_type&
>(other) );
879 if(m_pthis == other.m_pthis && m_free_func == other.m_free_func)
880 return detail::DelegateMementoHack::is_equal_pFunction((base_type(*
this)).GetMemento(), (base_type(other)).GetMemento());
885 bool operator!=(
const delegate &other)
const
887 return !(*
this == other);
890 bool operator<(
const delegate &other)
const
892 if(!m_free_func && !other.m_free_func)
893 return (
static_cast<const base_type&
>(*
this) <
static_cast<const base_type&
>(other) );
894 if(m_pthis != other.m_pthis)
895 return m_pthis < other.m_pthis;
896 if(m_free_func != other.m_free_func)
897 return m_free_func < other.m_free_func;
898 return detail::DelegateMementoHack::is_less_pFunction((base_type(*
this)).GetMemento(), (base_type(other)).GetMemento());
901 bool operator>(
const delegate &other)
const
903 if(!m_free_func && !other.m_free_func)
904 return (
static_cast<const base_type&
>(*
this) >
static_cast<const base_type&
>(other) );
905 if(m_pthis != other.m_pthis)
906 return m_pthis > other.m_pthis;
907 if(m_free_func != other.m_free_func)
908 return m_free_func > other.m_free_func;
909 return detail::DelegateMementoHack::is_less_pFunction((base_type(other)).GetMemento(), (base_type(*
this)).GetMemento());
913 inline void bind(Y *pthis, ReturnT(*function_to_bind)(Y*, Param1T, Param2T, Param3T)) {
915 m_pthis =
static_cast<void*
>(pthis);
916 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
917 bind(
this, get_proxy(pthis, function_to_bind));
921 inline void bind(Y *pthis, ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T)) {
923 m_pthis =
static_cast<void*
>(pthis);
924 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
925 bind(
this, get_proxy(pthis, function_to_bind));
929 inline void bind(
const Y *pthis, ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T)) {
931 m_pthis =
static_cast<void*
>(pthis);
932 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
933 bind(
this, get_proxy(pthis, function_to_bind));
936 template <
class X,
class Y >
937 inline void bind(Y *pthis, ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T)) {
938 assert(NULL != pthis);
939 assert(NULL != function_to_bind);
940 m_pthis = NULL; m_free_func = NULL;
941 base_type::bind(pthis, function_to_bind);
944 template <
class X,
class Y >
945 inline void bind(
const Y *pthis, ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T)
const) {
946 assert(NULL != pthis);
947 assert(NULL != function_to_bind);
948 m_pthis = NULL; m_free_func = NULL;
949 base_type::bind(pthis, function_to_bind);
952 inline void bind(ReturnT(*function_to_bind)(Param1T, Param2T, Param3T)) {
953 assert(NULL != function_to_bind);
954 m_pthis = NULL; m_free_func = NULL;
955 base_type::bind(function_to_bind);
960 free_function_like_member_t m_free_func;
963 ReturnT f_proxy(Param1T p1, Param2T p2, Param3T p3)
const
965 typedef ReturnT(*type_free_function_like_member_t)(Y*, Param1T, Param2T, Param3T);
967 return reinterpret_cast<type_free_function_like_member_t
>(m_free_func)(
static_cast<Y*
>(m_pthis), p1, p2, p3);
971 ReturnT f_proxy_const(Param1T p1, Param2T p2, Param3T p3)
const
973 typedef ReturnT(*type_free_function_like_member_t)(
const Y*, Param1T, Param2T, Param3T);
975 return reinterpret_cast<type_free_function_like_member_t
>(m_free_func)(
static_cast<const Y*
>(m_pthis), p1, p2, p3);
979 template<
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T>
980 class delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid> :
981 public fastdelegate::FastDelegate4<Param1T, Param2T, Param3T, Param4T, ReturnT>
983 typedef ReturnT(*free_function_like_member_t)(
void*, Param1T, Param2T, Param3T, Param4T);
985 typedef ReturnT(delegate::* f_proxy_type)(Param1T, Param2T, Param3T, Param4T)
const;
989 f_proxy_type get_proxy(Y*, ReturnT(*)(Y*, Param1T, Param2T, Param3T, Param4T))
const
990 {
return &delegate::f_proxy<Y>; }
994 f_proxy_type get_proxy(Y*, ReturnT(*)(
const Y*, Param1T, Param2T, Param3T, Param4T))
const
995 {
return &delegate::f_proxy_const<Y>; }
999 f_proxy_type get_proxy(
const Y*, ReturnT(*)(
const Y*, Param1T, Param2T, Param3T, Param4T))
const
1000 {
return &delegate::f_proxy_const<Y>; }
1003 typedef fastdelegate::FastDelegate4<Param1T, Param2T, Param3T, Param4T, ReturnT> base_type;
1005 typedef delegate type;
1013 template <
class X,
class Y >
1015 ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T))
1016 : base_type(pthis, function_to_bind),
1020 assert(NULL != pthis);
1021 assert(NULL != function_to_bind);
1024 template <
class X,
class Y >
1025 delegate(
const Y *pthis,
1026 ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T)
const)
1027 : base_type(pthis, function_to_bind),
1031 assert(NULL != pthis);
1032 assert(NULL != function_to_bind);
1035 template <
class Y >
1037 ReturnT(*function_to_bind)(Y*, Param1T, Param2T, Param3T, Param4T))
1038 : base_type(this, get_proxy(pthis, function_to_bind)),
1039 m_pthis(static_cast<void*>(pthis)),
1040 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
1043 template <
class Y >
1045 ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T))
1046 : base_type(this, get_proxy(pthis, function_to_bind)),
1047 m_pthis(static_cast<void*>(pthis)),
1048 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
1051 template <
class Y >
1052 delegate(
const Y *pthis,
1053 ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T))
1054 : base_type(this, get_proxy(pthis, function_to_bind)),
1055 m_pthis(static_cast<void*>(pthis)),
1056 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
1060 delegate(ReturnT(*function_to_bind)(Param1T, Param2T, Param3T, Param4T))
1061 : base_type(function_to_bind),
1065 assert(NULL != function_to_bind);
1068 delegate(
const delegate &other)
1071 f_proxy_type proxy = &delegate::f_proxy<delegate>;
1072 base_type::bind(
this, proxy);
1073 fastdelegate::DelegateMemento tmp = (base_type(other)).GetMemento();
1074 if(other.m_free_func)
1075 detail::DelegateMementoHack::copy_pthis(tmp, base_type::GetMemento());
1076 base_type::SetMemento(tmp);
1078 using namespace std;
1079 memcpy(&m_pthis, &other.m_pthis,
sizeof(m_pthis));
1080 memcpy(&m_free_func, &other.m_free_func,
sizeof(m_free_func));
1083 void operator=(
const delegate &other)
1086 f_proxy_type proxy = &delegate::f_proxy<delegate>;
1087 base_type::bind(
this, proxy);
1088 fastdelegate::DelegateMemento tmp = (base_type(other)).GetMemento();
1089 if(other.m_free_func)
1090 detail::DelegateMementoHack::copy_pthis(tmp, base_type::GetMemento());
1091 base_type::SetMemento(tmp);
1093 using namespace std;
1094 memcpy(&m_pthis, &other.m_pthis,
sizeof(m_pthis));
1095 memcpy(&m_free_func, &other.m_free_func,
sizeof(m_free_func));
1098 bool operator==(
const delegate &other)
const
1100 if(!m_free_func && !other.m_free_func)
1101 return (
static_cast<const base_type&
>(*
this) ==
static_cast<const base_type&
>(other) );
1103 if(m_pthis == other.m_pthis && m_free_func == other.m_free_func)
1104 return detail::DelegateMementoHack::is_equal_pFunction((base_type(*
this)).GetMemento(), (base_type(other)).GetMemento());
1109 bool operator!=(
const delegate &other)
const
1111 return !(*
this == other);
1114 bool operator<(
const delegate &other)
const
1116 if(!m_free_func && !other.m_free_func)
1117 return (
static_cast<const base_type&
>(*
this) <
static_cast<const base_type&
>(other) );
1118 if(m_pthis != other.m_pthis)
1119 return m_pthis < other.m_pthis;
1120 if(m_free_func != other.m_free_func)
1121 return m_free_func < other.m_free_func;
1122 return detail::DelegateMementoHack::is_less_pFunction((base_type(*
this)).GetMemento(), (base_type(other)).GetMemento());
1125 bool operator>(
const delegate &other)
const
1127 if(!m_free_func && !other.m_free_func)
1128 return (
static_cast<const base_type&
>(*
this) >
static_cast<const base_type&
>(other) );
1129 if(m_pthis != other.m_pthis)
1130 return m_pthis > other.m_pthis;
1131 if(m_free_func != other.m_free_func)
1132 return m_free_func > other.m_free_func;
1133 return detail::DelegateMementoHack::is_less_pFunction((base_type(other)).GetMemento(), (base_type(*
this)).GetMemento());
1136 template <
class Y >
1137 inline void bind(Y *pthis, ReturnT(*function_to_bind)(Y*, Param1T, Param2T, Param3T, Param4T)) {
1139 m_pthis =
static_cast<void*
>(pthis);
1140 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
1141 bind(
this, get_proxy(pthis, function_to_bind));
1144 template <
class Y >
1145 inline void bind(Y *pthis, ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T)) {
1147 m_pthis =
static_cast<void*
>(pthis);
1148 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
1149 bind(
this, get_proxy(pthis, function_to_bind));
1152 template <
class Y >
1153 inline void bind(
const Y *pthis, ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T)) {
1155 m_pthis =
static_cast<void*
>(pthis);
1156 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
1157 bind(
this, get_proxy(pthis, function_to_bind));
1160 template <
class X,
class Y >
1161 inline void bind(Y *pthis, ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T)) {
1162 assert(NULL != pthis);
1163 assert(NULL != function_to_bind);
1164 m_pthis = NULL; m_free_func = NULL;
1165 base_type::bind(pthis, function_to_bind);
1168 template <
class X,
class Y >
1169 inline void bind(
const Y *pthis, ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T)
const) {
1170 assert(NULL != pthis);
1171 assert(NULL != function_to_bind);
1172 m_pthis = NULL; m_free_func = NULL;
1173 base_type::bind(pthis, function_to_bind);
1176 inline void bind(ReturnT(*function_to_bind)(Param1T, Param2T, Param3T, Param4T)) {
1177 assert(NULL != function_to_bind);
1178 m_pthis = NULL; m_free_func = NULL;
1179 base_type::bind(function_to_bind);
1184 free_function_like_member_t m_free_func;
1187 ReturnT f_proxy(Param1T p1, Param2T p2, Param3T p3, Param4T p4)
const
1189 typedef ReturnT(*type_free_function_like_member_t)(Y*, Param1T, Param2T, Param3T, Param4T);
1191 return reinterpret_cast<type_free_function_like_member_t
>(m_free_func)(
static_cast<Y*
>(m_pthis), p1, p2, p3, p4);
1195 ReturnT f_proxy_const(Param1T p1, Param2T p2, Param3T p3, Param4T p4)
const
1197 typedef ReturnT(*type_free_function_like_member_t)(
const Y*, Param1T, Param2T, Param3T, Param4T);
1199 return reinterpret_cast<type_free_function_like_member_t
>(m_free_func)(
static_cast<const Y*
>(m_pthis), p1, p2, p3, p4);
1203 template<
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T,
class Param5T>
1204 class delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid> :
1205 public fastdelegate::FastDelegate5<Param1T, Param2T, Param3T, Param4T, Param5T, ReturnT>
1207 typedef ReturnT(*free_function_like_member_t)(
void*, Param1T, Param2T, Param3T, Param4T, Param5T);
1209 typedef ReturnT(delegate::* f_proxy_type)(Param1T, Param2T, Param3T, Param4T, Param5T)
const;
1213 f_proxy_type get_proxy(Y*, ReturnT(*)(Y*, Param1T, Param2T, Param3T, Param4T, Param5T))
const
1214 {
return &delegate::f_proxy<Y>; }
1218 f_proxy_type get_proxy(Y*, ReturnT(*)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T))
const
1219 {
return &delegate::f_proxy_const<Y>; }
1223 f_proxy_type get_proxy(
const Y*, ReturnT(*)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T))
const
1224 {
return &delegate::f_proxy_const<Y>; }
1227 typedef fastdelegate::FastDelegate5<Param1T, Param2T, Param3T, Param4T, Param5T, ReturnT> base_type;
1229 typedef delegate type;
1237 template <
class X,
class Y >
1239 ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T))
1240 : base_type(pthis, function_to_bind),
1244 assert(NULL != pthis);
1245 assert(NULL != function_to_bind);
1248 template <
class X,
class Y >
1249 delegate(
const Y *pthis,
1250 ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T)
const)
1251 : base_type(pthis, function_to_bind),
1255 assert(NULL != pthis);
1256 assert(NULL != function_to_bind);
1259 template <
class Y >
1261 ReturnT(*function_to_bind)(Y*, Param1T, Param2T, Param3T, Param4T, Param5T))
1262 : base_type(this, get_proxy(pthis, function_to_bind)),
1263 m_pthis(static_cast<void*>(pthis)),
1264 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
1267 template <
class Y >
1269 ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T))
1270 : base_type(this, get_proxy(pthis, function_to_bind)),
1271 m_pthis(static_cast<void*>(pthis)),
1272 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
1275 template <
class Y >
1276 delegate(
const Y *pthis,
1277 ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T))
1278 : base_type(this, get_proxy(pthis, function_to_bind)),
1279 m_pthis(static_cast<void*>(pthis)),
1280 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
1284 delegate(ReturnT(*function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T))
1285 : base_type(function_to_bind),
1289 assert(NULL != function_to_bind);
1292 delegate(
const delegate &other)
1295 f_proxy_type proxy = &delegate::f_proxy<delegate>;
1296 base_type::bind(
this, proxy);
1297 fastdelegate::DelegateMemento tmp = (base_type(other)).GetMemento();
1298 if(other.m_free_func || other.m_free_func_const)
1299 detail::DelegateMementoHack::copy_pthis(tmp, base_type::GetMemento());
1300 base_type::SetMemento(tmp);
1302 using namespace std;
1303 memcpy(&m_pthis, &other.m_pthis,
sizeof(m_pthis));
1304 memcpy(&m_free_func, &other.m_free_func,
sizeof(m_free_func));
1307 void operator=(
const delegate &other)
1310 f_proxy_type proxy = &delegate::f_proxy<delegate>;
1311 base_type::bind(
this, proxy);
1312 fastdelegate::DelegateMemento tmp = (base_type(other)).GetMemento();
1313 if(other.m_free_func || other.m_free_func_const)
1314 detail::DelegateMementoHack::copy_pthis(tmp, base_type::GetMemento());
1315 base_type::SetMemento(tmp);
1317 using namespace std;
1318 memcpy(&m_pthis, &other.m_pthis,
sizeof(m_pthis));
1319 memcpy(&m_free_func, &other.m_free_func,
sizeof(m_free_func));
1322 bool operator==(
const delegate &other)
const
1324 if(!m_free_func && !other.m_free_func)
1325 return (
static_cast<const base_type&
>(*
this) ==
static_cast<const base_type&
>(other) );
1327 if(m_pthis == other.m_pthis && m_free_func == other.m_free_func)
1328 return detail::DelegateMementoHack::is_equal_pFunction((base_type(*
this)).GetMemento(), (base_type(other)).GetMemento());
1333 bool operator!=(
const delegate &other)
const
1335 return !(*
this == other);
1338 bool operator<(
const delegate &other)
const
1340 if(!m_free_func && !other.m_free_func)
1341 return (
static_cast<const base_type&
>(*
this) <
static_cast<const base_type&
>(other) );
1342 if(m_pthis != other.m_pthis)
1343 return m_pthis < other.m_pthis;
1344 if(m_free_func != other.m_free_func)
1345 return m_free_func < other.m_free_func;
1346 return detail::DelegateMementoHack::is_less_pFunction((base_type(*
this)).GetMemento(), (base_type(other)).GetMemento());
1349 bool operator>(
const delegate &other)
const
1351 if(!m_free_func && !other.m_free_func)
1352 return (
static_cast<const base_type&
>(*
this) >
static_cast<const base_type&
>(other) );
1353 if(m_pthis != other.m_pthis)
1354 return m_pthis > other.m_pthis;
1355 if(m_free_func != other.m_free_func)
1356 return m_free_func > other.m_free_func;
1357 return detail::DelegateMementoHack::is_less_pFunction((base_type(other)).GetMemento(), (base_type(*
this)).GetMemento());
1360 template <
class Y >
1361 inline void bind(Y *pthis, ReturnT(*function_to_bind)(Y*, Param1T, Param2T, Param3T, Param4T, Param5T)) {
1363 m_pthis =
static_cast<void*
>(pthis);
1364 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
1365 bind(
this, get_proxy(pthis, function_to_bind));
1368 template <
class Y >
1369 inline void bind(Y *pthis, ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T)) {
1371 m_pthis =
static_cast<void*
>(pthis);
1372 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
1373 bind(
this, get_proxy(pthis, function_to_bind));
1376 template <
class Y >
1377 inline void bind(
const Y *pthis, ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T)) {
1379 m_pthis =
static_cast<void*
>(pthis);
1380 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
1381 bind(
this, get_proxy(pthis, function_to_bind));
1384 template <
class X,
class Y >
1385 inline void bind(Y *pthis, ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T)) {
1386 assert(NULL != pthis);
1387 assert(NULL != function_to_bind);
1388 m_pthis = NULL; m_free_func = NULL;
1389 base_type::bind(pthis, function_to_bind);
1392 template <
class X,
class Y >
1393 inline void bind(
const Y *pthis, ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T)
const) {
1394 assert(NULL != pthis);
1395 assert(NULL != function_to_bind);
1396 m_pthis = NULL; m_free_func = NULL;
1397 base_type::bind(pthis, function_to_bind);
1400 inline void bind(ReturnT(*function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T)) {
1401 assert(NULL != function_to_bind);
1402 m_pthis = NULL; m_free_func = NULL;
1403 base_type::bind(function_to_bind);
1408 free_function_like_member_t m_free_func;
1411 ReturnT f_proxy(Param1T p1, Param2T p2, Param3T p3, Param4T p4, Param5T p5)
const
1413 typedef ReturnT(*type_free_function_like_member_t)(Y*, Param1T, Param2T, Param3T, Param4T, Param5T);
1415 return reinterpret_cast<type_free_function_like_member_t
>(m_free_func)(
static_cast<Y*
>(m_pthis), p1, p2, p3, p4, p5);
1419 ReturnT f_proxy_const(Param1T p1, Param2T p2, Param3T p3, Param4T p4, Param5T p5)
const
1421 typedef ReturnT(*type_free_function_like_member_t)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T);
1423 return reinterpret_cast<type_free_function_like_member_t
>(m_free_func)(
static_cast<const Y*
>(m_pthis), p1, p2, p3, p4, p5);
1427 template<
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T,
class Param5T,
class Param6T>
1428 class delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, detail::DefaultVoid, detail::DefaultVoid, detail::DefaultVoid> :
1429 public fastdelegate::FastDelegate6<Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, ReturnT>
1431 typedef ReturnT(*free_function_like_member_t)(
void*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T);
1432 typedef ReturnT(*free_function_like_member_const_t)(
const void*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T);
1434 typedef ReturnT(delegate::* f_proxy_type)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T)
const;
1438 f_proxy_type get_proxy(Y*, ReturnT(*)(Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T))
const
1439 {
return &delegate::f_proxy<Y>; }
1443 f_proxy_type get_proxy(Y*, ReturnT(*)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T))
const
1444 {
return &delegate::f_proxy_const<Y>; }
1448 f_proxy_type get_proxy(
const Y*, ReturnT(*)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T))
const
1449 {
return &delegate::f_proxy_const<Y>; }
1452 typedef fastdelegate::FastDelegate6<Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, ReturnT> base_type;
1454 typedef delegate type;
1462 template <
class X,
class Y >
1464 ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T))
1465 : base_type(pthis, function_to_bind),
1469 assert(NULL != pthis);
1470 assert(NULL != function_to_bind);
1473 template <
class X,
class Y >
1474 delegate(
const Y *pthis,
1475 ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T)
const)
1476 : base_type(pthis, function_to_bind),
1480 assert(NULL != pthis);
1481 assert(NULL != function_to_bind);
1484 template <
class Y >
1486 ReturnT(*function_to_bind)(Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T))
1487 : base_type(this, get_proxy(pthis, function_to_bind)),
1488 m_pthis(static_cast<void*>(pthis)),
1489 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
1492 template <
class Y >
1494 ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T))
1495 : base_type(this, get_proxy(pthis, function_to_bind)),
1496 m_pthis(static_cast<void*>(pthis)),
1497 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
1500 template <
class Y >
1501 delegate(
const Y *pthis,
1502 ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T))
1503 : base_type(this, get_proxy(pthis, function_to_bind)),
1504 m_pthis(static_cast<void*>(pthis)),
1505 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
1509 delegate(ReturnT(*function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T))
1510 : base_type(function_to_bind),
1514 assert(NULL != function_to_bind);
1517 delegate(
const delegate &other)
1520 f_proxy_type proxy = &delegate::f_proxy<delegate>;
1521 base_type::bind(
this, proxy);
1522 fastdelegate::DelegateMemento tmp = (base_type(other)).GetMemento();
1523 if(other.m_free_func)
1524 detail::DelegateMementoHack::copy_pthis(tmp, base_type::GetMemento());
1525 base_type::SetMemento(tmp);
1527 using namespace std;
1528 memcpy(&m_pthis, &other.m_pthis,
sizeof(m_pthis));
1529 memcpy(&m_free_func, &other.m_free_func,
sizeof(m_free_func));
1532 void operator=(
const delegate &other)
1535 f_proxy_type proxy = &delegate::f_proxy<delegate>;
1536 base_type::bind(
this, proxy);
1537 fastdelegate::DelegateMemento tmp = (base_type(other)).GetMemento();
1538 if(other.m_free_func)
1539 detail::DelegateMementoHack::copy_pthis(tmp, base_type::GetMemento());
1540 base_type::SetMemento(tmp);
1542 using namespace std;
1543 memcpy(&m_pthis, &other.m_pthis,
sizeof(m_pthis));
1544 memcpy(&m_free_func, &other.m_free_func,
sizeof(m_free_func));
1547 bool operator==(
const delegate &other)
const
1549 if(!m_free_func && !other.m_free_func)
1550 return (
static_cast<const base_type&
>(*
this) ==
static_cast<const base_type&
>(other) );
1552 if(m_pthis == other.m_pthis && m_free_func == other.m_free_func)
1553 return detail::DelegateMementoHack::is_equal_pFunction((base_type(*
this)).GetMemento(), (base_type(other)).GetMemento());
1558 bool operator!=(
const delegate &other)
const
1560 return !(*
this == other);
1563 bool operator<(
const delegate &other)
const
1565 if(!m_free_func && !other.m_free_func)
1566 return (
static_cast<const base_type&
>(*
this) <
static_cast<const base_type&
>(other) );
1567 if(m_pthis != other.m_pthis)
1568 return m_pthis < other.m_pthis;
1569 if(m_free_func != other.m_free_func)
1570 return m_free_func < other.m_free_func;
1571 return detail::DelegateMementoHack::is_less_pFunction((base_type(*
this)).GetMemento(), (base_type(other)).GetMemento());
1574 bool operator>(
const delegate &other)
const
1576 if(!m_free_func && !other.m_free_func)
1577 return (
static_cast<const base_type&
>(*
this) >
static_cast<const base_type&
>(other) );
1578 if(m_pthis != other.m_pthis)
1579 return m_pthis > other.m_pthis;
1580 if(m_free_func != other.m_free_func)
1581 return m_free_func > other.m_free_func;
1582 return detail::DelegateMementoHack::is_less_pFunction((base_type(other)).GetMemento(), (base_type(*
this)).GetMemento());
1585 template <
class Y >
1586 inline void bind(Y *pthis, ReturnT(*function_to_bind)(Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T)) {
1588 m_pthis =
static_cast<void*
>(pthis);
1589 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
1590 bind(
this, get_proxy(pthis, function_to_bind));
1593 template <
class Y >
1594 inline void bind(Y *pthis, ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T)) {
1596 m_pthis =
static_cast<void*
>(pthis);
1597 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
1598 bind(
this, get_proxy(pthis, function_to_bind));
1601 template <
class Y >
1602 inline void bind(
const Y *pthis, ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T)) {
1604 m_pthis =
static_cast<void*
>(pthis);
1605 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
1606 bind(
this, get_proxy(pthis, function_to_bind));
1609 template <
class X,
class Y >
1610 inline void bind(Y *pthis, ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T)) {
1611 assert(NULL != pthis);
1612 assert(NULL != function_to_bind);
1613 m_pthis = NULL; m_free_func = NULL;
1614 base_type::bind(pthis, function_to_bind);
1617 template <
class X,
class Y >
1618 inline void bind(
const Y *pthis, ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T)
const) {
1619 assert(NULL != pthis);
1620 assert(NULL != function_to_bind);
1621 m_pthis = NULL; m_free_func = NULL;
1622 base_type::bind(pthis, function_to_bind);
1625 inline void bind(ReturnT(*function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T)) {
1626 assert(NULL != function_to_bind);
1627 m_pthis = NULL; m_free_func = NULL;
1628 base_type::bind(function_to_bind);
1633 free_function_like_member_t m_free_func;
1636 ReturnT f_proxy(Param1T p1, Param2T p2, Param3T p3, Param4T p4, Param5T p5, Param6T p6)
const
1638 typedef ReturnT(*type_free_function_like_member_t)(Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T);
1640 return reinterpret_cast<type_free_function_like_member_t
>(m_free_func)(
static_cast<Y*
>(m_pthis), p1, p2, p3, p4, p5, p6);
1644 ReturnT f_proxy_const(Param1T p1, Param2T p2, Param3T p3, Param4T p4, Param5T p5, Param6T p6)
const
1646 typedef ReturnT(*type_free_function_like_member_t)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T);
1648 return reinterpret_cast<type_free_function_like_member_t
>(m_free_func)(
static_cast<const Y*
>(m_pthis), p1, p2, p3, p4, p5, p6);
1652 template<
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T,
class Param5T,
class Param6T,
class Param7T>
1653 class delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, detail::DefaultVoid, detail::DefaultVoid> :
1654 public fastdelegate::FastDelegate7<Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, ReturnT>
1656 typedef ReturnT(*free_function_like_member_t)(
void*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T);
1658 typedef ReturnT(delegate::* f_proxy_type)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T)
const;
1662 f_proxy_type get_proxy(Y*, ReturnT(*)(Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T))
const
1663 {
return &delegate::f_proxy<Y>; }
1667 f_proxy_type get_proxy(Y*, ReturnT(*)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T))
const
1668 {
return &delegate::f_proxy_const<Y>; }
1672 f_proxy_type get_proxy(
const Y*, ReturnT(*)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T))
const
1673 {
return &delegate::f_proxy_const<Y>; }
1676 typedef fastdelegate::FastDelegate7<Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, ReturnT> base_type;
1678 typedef delegate type;
1686 template <
class X,
class Y >
1688 ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T))
1689 : base_type(pthis, function_to_bind),
1693 assert(NULL != pthis);
1694 assert(NULL != function_to_bind);
1697 template <
class X,
class Y >
1698 delegate(
const Y *pthis,
1699 ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T)
const)
1700 : base_type(pthis, function_to_bind),
1704 assert(NULL != pthis);
1705 assert(NULL != function_to_bind);
1708 template <
class Y >
1710 ReturnT(*function_to_bind)(Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T))
1711 : base_type(this, get_proxy(pthis, function_to_bind)),
1712 m_pthis(static_cast<void*>(pthis)),
1713 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
1716 template <
class Y >
1718 ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T))
1719 : base_type(this, get_proxy(pthis, function_to_bind)),
1720 m_pthis(static_cast<void*>(pthis)),
1721 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
1724 template <
class Y >
1725 delegate(
const Y *pthis,
1726 ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T))
1727 : base_type(this, get_proxy(pthis, function_to_bind)),
1728 m_pthis(static_cast<void*>(pthis)),
1729 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
1733 delegate(ReturnT(*function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T))
1734 : base_type(function_to_bind),
1738 assert(NULL != function_to_bind);
1741 delegate(
const delegate &other)
1744 f_proxy_type proxy = &delegate::f_proxy<delegate>;
1745 base_type::bind(
this, proxy);
1746 fastdelegate::DelegateMemento tmp = (base_type(other)).GetMemento();
1747 if(other.m_free_func)
1748 detail::DelegateMementoHack::copy_pthis(tmp, base_type::GetMemento());
1749 base_type::SetMemento(tmp);
1751 using namespace std;
1752 memcpy(&m_pthis, &other.m_pthis,
sizeof(m_pthis));
1753 memcpy(&m_free_func, &other.m_free_func,
sizeof(m_free_func));
1756 void operator=(
const delegate &other)
1759 f_proxy_type proxy = &delegate::f_proxy<delegate>;
1760 base_type::bind(
this, proxy);
1761 fastdelegate::DelegateMemento tmp = (base_type(other)).GetMemento();
1762 if(other.m_free_func)
1763 detail::DelegateMementoHack::copy_pthis(tmp, base_type::GetMemento());
1764 base_type::SetMemento(tmp);
1766 using namespace std;
1767 memcpy(&m_pthis, &other.m_pthis,
sizeof(m_pthis));
1768 memcpy(&m_free_func, &other.m_free_func,
sizeof(m_free_func));
1771 bool operator==(
const delegate &other)
const
1773 if(!m_free_func && !other.m_free_func)
1774 return (
static_cast<const base_type&
>(*
this) ==
static_cast<const base_type&
>(other) );
1776 if(m_pthis == other.m_pthis && m_free_func == other.m_free_func)
1777 return detail::DelegateMementoHack::is_equal_pFunction((base_type(*
this)).GetMemento(), (base_type(other)).GetMemento());
1782 bool operator!=(
const delegate &other)
const
1784 return !(*
this == other);
1787 bool operator<(
const delegate &other)
const
1789 if(!m_free_func && !other.m_free_func)
1790 return (
static_cast<const base_type&
>(*
this) <
static_cast<const base_type&
>(other) );
1791 if(m_pthis != other.m_pthis)
1792 return m_pthis < other.m_pthis;
1793 if(m_free_func != other.m_free_func)
1794 return m_free_func < other.m_free_func;
1795 return detail::DelegateMementoHack::is_less_pFunction((base_type(*
this)).GetMemento(), (base_type(other)).GetMemento());
1798 bool operator>(
const delegate &other)
const
1800 if(!m_free_func && !other.m_free_func)
1801 return (
static_cast<const base_type&
>(*
this) >
static_cast<const base_type&
>(other) );
1802 if(m_pthis != other.m_pthis)
1803 return m_pthis > other.m_pthis;
1804 if(m_free_func != other.m_free_func)
1805 return m_free_func > other.m_free_func;
1806 return detail::DelegateMementoHack::is_less_pFunction((base_type(other)).GetMemento(), (base_type(*
this)).GetMemento());
1809 template <
class Y >
1810 inline void bind(Y *pthis, ReturnT(*function_to_bind)(Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T)) {
1812 m_pthis =
static_cast<void*
>(pthis);
1813 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
1814 bind(
this, get_proxy(pthis, function_to_bind));
1817 template <
class Y >
1818 inline void bind(Y *pthis, ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T)) {
1820 m_pthis =
static_cast<void*
>(pthis);
1821 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
1822 bind(
this, get_proxy(pthis, function_to_bind));
1825 template <
class Y >
1826 inline void bind(
const Y *pthis, ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T)) {
1828 m_pthis =
static_cast<void*
>(pthis);
1829 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
1830 bind(
this, get_proxy(pthis, function_to_bind));
1833 template <
class X,
class Y >
1834 inline void bind(Y *pthis, ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T)) {
1835 assert(NULL != pthis);
1836 assert(NULL != function_to_bind);
1837 m_pthis = NULL; m_free_func = NULL;
1838 base_type::bind(pthis, function_to_bind);
1841 template <
class X,
class Y >
1842 inline void bind(
const Y *pthis, ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T)
const) {
1843 assert(NULL != pthis);
1844 assert(NULL != function_to_bind);
1845 m_pthis = NULL; m_free_func = NULL;
1846 base_type::bind(pthis, function_to_bind);
1849 inline void bind(ReturnT(*function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T)) {
1850 assert(NULL != function_to_bind);
1851 m_pthis = NULL; m_free_func = NULL;
1852 base_type::bind(function_to_bind);
1857 free_function_like_member_t m_free_func;
1860 ReturnT f_proxy(Param1T p1, Param2T p2, Param3T p3, Param4T p4, Param5T p5, Param6T p6, Param7T p7)
const
1862 typedef ReturnT(*type_free_function_like_member_t)(Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T);
1864 return reinterpret_cast<type_free_function_like_member_t
>(m_free_func)(
static_cast<Y*
>(m_pthis), p1, p2, p3, p4, p5, p6, p7);
1868 ReturnT f_proxy_const(Param1T p1, Param2T p2, Param3T p3, Param4T p4, Param5T p5, Param6T p6, Param7T p7)
const
1870 typedef ReturnT(*type_free_function_like_member_t)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T);
1872 return reinterpret_cast<type_free_function_like_member_t
>(m_free_func)(
static_cast<const Y*
>(m_pthis), p1, p2, p3, p4, p5, p6, p7);
1876 template<
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T,
class Param5T,
class Param6T,
class Param7T,
class Param8T>
1877 class delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T, detail::DefaultVoid> :
1878 public fastdelegate::FastDelegate8<Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T, ReturnT>
1880 typedef ReturnT(*free_function_like_member_t)(
void*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T);
1881 typedef ReturnT(*free_function_like_member_const_t)(
const void*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T);
1883 typedef ReturnT(delegate::* f_proxy_type)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T)
const;
1887 f_proxy_type get_proxy(Y*, ReturnT(*)(Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T))
const
1888 {
return &delegate::f_proxy<Y>; }
1892 f_proxy_type get_proxy(Y*, ReturnT(*)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T))
const
1893 {
return &delegate::f_proxy_const<Y>; }
1897 f_proxy_type get_proxy(
const Y*, ReturnT(*)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T))
const
1898 {
return &delegate::f_proxy_const<Y>; }
1901 typedef fastdelegate::FastDelegate8<Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T, ReturnT> base_type;
1903 typedef delegate type;
1911 template <
class X,
class Y >
1913 ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T))
1914 : base_type(pthis, function_to_bind),
1918 assert(NULL != pthis);
1919 assert(NULL != function_to_bind);
1922 template <
class X,
class Y >
1923 delegate(
const Y *pthis,
1924 ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T)
const)
1925 : base_type(pthis, function_to_bind),
1929 assert(NULL != pthis);
1930 assert(NULL != function_to_bind);
1933 template <
class Y >
1935 ReturnT(*function_to_bind)(Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T))
1936 : base_type(this, get_proxy(pthis, function_to_bind)),
1937 m_pthis(static_cast<void*>(pthis)),
1938 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
1941 template <
class Y >
1943 ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T))
1944 : base_type(this, get_proxy(pthis, function_to_bind)),
1945 m_pthis(static_cast<void*>(pthis)),
1946 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
1949 template <
class Y >
1950 delegate(
const Y *pthis,
1951 ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T))
1952 : base_type(this, get_proxy(pthis, function_to_bind)),
1953 m_pthis(static_cast<void*>(pthis)),
1954 m_free_func(reinterpret_cast<free_function_like_member_t>(function_to_bind))
1958 delegate(ReturnT(*function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T))
1959 : base_type(function_to_bind),
1963 assert(NULL != function_to_bind);
1966 delegate(
const delegate &other)
1969 f_proxy_type proxy = &delegate::f_proxy<delegate>;
1970 base_type::bind(
this, proxy);
1971 fastdelegate::DelegateMemento tmp = (base_type(other)).GetMemento();
1972 if(other.m_free_func)
1973 detail::DelegateMementoHack::copy_pthis(tmp, base_type::GetMemento());
1974 base_type::SetMemento(tmp);
1976 using namespace std;
1977 memcpy(&m_pthis, &other.m_pthis,
sizeof(m_pthis));
1978 memcpy(&m_free_func, &other.m_free_func,
sizeof(m_free_func));
1981 void operator=(
const delegate &other)
1984 f_proxy_type proxy = &delegate::f_proxy<delegate>;
1985 base_type::bind(
this, proxy);
1986 fastdelegate::DelegateMemento tmp = (base_type(other)).GetMemento();
1987 if(other.m_free_func)
1988 detail::DelegateMementoHack::copy_pthis(tmp, base_type::GetMemento());
1989 base_type::SetMemento(tmp);
1991 using namespace std;
1992 memcpy(&m_pthis, &other.m_pthis,
sizeof(m_pthis));
1993 memcpy(&m_free_func, &other.m_free_func,
sizeof(m_free_func));
1996 bool operator==(
const delegate &other)
const
1998 if(!m_free_func && !other.m_free_func)
1999 return (
static_cast<const base_type&
>(*
this) ==
static_cast<const base_type&
>(other) );
2001 if(m_pthis == other.m_pthis && m_free_func == other.m_free_func)
2002 return detail::DelegateMementoHack::is_equal_pFunction((base_type(*
this)).GetMemento(), (base_type(other)).GetMemento());
2007 bool operator!=(
const delegate &other)
const
2009 return !(*
this == other);
2012 bool operator<(
const delegate &other)
const
2014 if(!m_free_func && !other.m_free_func)
2015 return (
static_cast<const base_type&
>(*
this) <
static_cast<const base_type&
>(other) );
2016 if(m_pthis != other.m_pthis)
2017 return m_pthis < other.m_pthis;
2018 if(m_free_func != other.m_free_func)
2019 return m_free_func < other.m_free_func;
2020 return detail::DelegateMementoHack::is_less_pFunction((base_type(*
this)).GetMemento(), (base_type(other)).GetMemento());
2023 bool operator>(
const delegate &other)
const
2025 if(!m_free_func && !other.m_free_func)
2026 return (
static_cast<const base_type&
>(*
this) >
static_cast<const base_type&
>(other) );
2027 if(m_pthis != other.m_pthis)
2028 return m_pthis > other.m_pthis;
2029 if(m_free_func != other.m_free_func)
2030 return m_free_func > other.m_free_func;
2031 return detail::DelegateMementoHack::is_less_pFunction((base_type(other)).GetMemento(), (base_type(*
this)).GetMemento());
2034 template <
class Y >
2035 inline void bind(Y *pthis, ReturnT(*function_to_bind)(Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T)) {
2037 m_pthis =
static_cast<void*
>(pthis);
2038 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
2039 bind(
this, get_proxy(pthis, function_to_bind));
2042 template <
class Y >
2043 inline void bind(Y *pthis, ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T)) {
2045 m_pthis =
static_cast<void*
>(pthis);
2046 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
2047 bind(
this, get_proxy(pthis, function_to_bind));
2050 template <
class Y >
2051 inline void bind(
const Y *pthis, ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T)) {
2053 m_pthis =
static_cast<void*
>(pthis);
2054 m_free_func =
reinterpret_cast<free_function_like_member_t
>(function_to_bind);
2055 bind(
this, get_proxy(pthis, function_to_bind));
2058 template <
class X,
class Y >
2059 inline void bind(Y *pthis, ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T)) {
2060 assert(NULL != pthis);
2061 assert(NULL != function_to_bind);
2062 m_pthis = NULL; m_free_func = NULL;
2063 base_type::bind(pthis, function_to_bind);
2066 template <
class X,
class Y >
2067 inline void bind(
const Y *pthis, ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T)
const) {
2068 assert(NULL != pthis);
2069 assert(NULL != function_to_bind);
2070 m_pthis = NULL; m_free_func = NULL;
2071 base_type::bind(pthis, function_to_bind);
2074 inline void bind(ReturnT(*function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T)) {
2075 assert(NULL != function_to_bind);
2076 m_pthis = NULL; m_free_func = NULL;
2077 base_type::bind(function_to_bind);
2082 free_function_like_member_t m_free_func;
2085 ReturnT f_proxy(Param1T p1, Param2T p2, Param3T p3, Param4T p4, Param5T p5, Param6T p6, Param7T p7, Param8T p8)
const
2087 typedef ReturnT(*type_free_function_like_member_t)(Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T);
2089 return reinterpret_cast<type_free_function_like_member_t
>(m_free_func)(
static_cast<Y*
>(m_pthis), p1, p2, p3, p4, p5, p6, p7, p8);
2093 ReturnT f_proxy_const(Param1T p1, Param2T p2, Param3T p3, Param4T p4, Param5T p5, Param6T p6, Param7T p7, Param8T p8)
const
2095 typedef ReturnT(*type_free_function_like_member_t)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T);
2097 return reinterpret_cast<type_free_function_like_member_t
>(m_free_func)(
static_cast<const Y*
>(m_pthis), p1, p2, p3, p4, p5, p6, p7, p8);
2101 template <
class X,
class Y,
class ReturnT >
2104 ReturnT(X::* function_to_bind)())
2106 return delegate<ReturnT>(pthis, function_to_bind);
2109 template <
class X,
class Y,
class ReturnT >
2111 bind(
const Y *pthis,
2112 ReturnT(X::* function_to_bind)()
const)
2114 return delegate<ReturnT>(pthis, function_to_bind);
2117 template <
class Y,
class ReturnT >
2120 ReturnT(*function_to_bind)(Y*))
2122 return delegate<ReturnT>(pthis, function_to_bind);
2125 template <
class Y,
class ReturnT >
2128 ReturnT(*function_to_bind)(
const Y*))
2130 return delegate<ReturnT>(pthis, function_to_bind);
2133 template <
class ReturnT >
2135 bind(ReturnT(*function_to_bind)())
2137 return delegate<ReturnT>(function_to_bind);
2140 template <
class X,
class Y,
class ReturnT,
class Param1T >
2141 delegate<ReturnT, Param1T>
2143 ReturnT(X::* function_to_bind)(Param1T))
2145 return delegate<ReturnT, Param1T>(pthis, function_to_bind);
2148 template <
class X,
class Y,
class ReturnT,
class Param1T >
2149 delegate<ReturnT, Param1T>
2150 bind(
const Y *pthis,
2151 ReturnT(X::* function_to_bind)(Param1T)
const)
2153 return delegate<ReturnT, Param1T>(pthis, function_to_bind);
2156 template <
class Y,
class ReturnT,
class Param1T >
2157 delegate<ReturnT, Param1T>
2159 ReturnT(*function_to_bind)(Y*, Param1T))
2161 return delegate<ReturnT, Param1T>(pthis, function_to_bind);
2164 template <
class Y,
class ReturnT,
class Param1T >
2165 delegate<ReturnT, Param1T>
2167 ReturnT(*function_to_bind)(
const Y*, Param1T))
2169 return delegate<ReturnT, Param1T>(pthis, function_to_bind);
2172 template <
class ReturnT,
class Param1T >
2173 delegate<ReturnT, Param1T>
2174 bind(ReturnT(*function_to_bind)(Param1T))
2176 return delegate<ReturnT, Param1T>(function_to_bind);
2179 template <
class X,
class Y,
class ReturnT,
class Param1T,
class Param2T >
2180 delegate<ReturnT, Param1T, Param2T>
2182 ReturnT(X::* function_to_bind)(Param1T, Param2T))
2184 return delegate<ReturnT, Param1T, Param2T>(pthis, function_to_bind);
2187 template <
class X,
class Y,
class ReturnT,
class Param1T,
class Param2T >
2188 delegate<ReturnT, Param1T, Param2T>
2189 bind(
const Y *pthis,
2190 ReturnT(X::* function_to_bind)(Param1T, Param2T)
const)
2192 return delegate<ReturnT, Param1T, Param2T>(pthis, function_to_bind);
2195 template <
class Y,
class ReturnT,
class Param1T,
class Param2T >
2196 delegate<ReturnT, Param1T, Param2T>
2198 ReturnT(*function_to_bind)(Y*, Param1T, Param2T))
2200 return delegate<ReturnT, Param1T, Param2T>(pthis, function_to_bind);
2203 template <
class Y,
class ReturnT,
class Param1T,
class Param2T >
2204 delegate<ReturnT, Param1T, Param2T>
2206 ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T))
2208 return delegate<ReturnT, Param1T, Param2T>(pthis, function_to_bind);
2211 template <
class ReturnT,
class Param1T,
class Param2T >
2212 delegate<ReturnT, Param1T, Param2T>
2213 bind(ReturnT(*function_to_bind)(Param1T, Param2T))
2215 return delegate<ReturnT, Param1T, Param2T>(function_to_bind);
2218 template <
class X,
class Y,
class ReturnT,
class Param1T,
class Param2T,
class Param3T >
2219 delegate<ReturnT, Param1T, Param2T, Param3T>
2221 ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T))
2223 return delegate<ReturnT, Param1T, Param2T, Param3T>(pthis, function_to_bind);
2226 template <
class X,
class Y,
class ReturnT,
class Param1T,
class Param2T,
class Param3T >
2227 delegate<ReturnT, Param1T, Param2T, Param3T>
2228 bind(
const Y *pthis,
2229 ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T)
const)
2231 return delegate<ReturnT, Param1T, Param2T, Param3T>(pthis, function_to_bind);
2234 template <
class Y,
class ReturnT,
class Param1T,
class Param2T,
class Param3T >
2235 delegate<ReturnT, Param1T, Param2T, Param3T>
2237 ReturnT(*function_to_bind)(Y*, Param1T, Param2T, Param3T))
2239 return delegate<ReturnT, Param1T, Param2T, Param3T>(pthis, function_to_bind);
2242 template <
class Y,
class ReturnT,
class Param1T,
class Param2T,
class Param3T >
2243 delegate<ReturnT, Param1T, Param2T, Param3T>
2245 ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T))
2247 return delegate<ReturnT, Param1T, Param2T, Param3T>(pthis, function_to_bind);
2250 template <
class ReturnT,
class Param1T,
class Param2T,
class Param3T >
2251 delegate<ReturnT, Param1T, Param2T, Param3T>
2252 bind(ReturnT(*function_to_bind)(Param1T, Param2T, Param3T))
2254 return delegate<ReturnT, Param1T, Param2T, Param3T>(function_to_bind);
2257 template <
class X,
class Y,
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T >
2258 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T>
2260 ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T))
2262 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T>(pthis, function_to_bind);
2265 template <
class X,
class Y,
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T >
2266 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T>
2267 bind(
const Y *pthis,
2268 ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T)
const)
2270 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T>(pthis, function_to_bind);
2273 template <
class Y,
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T >
2274 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T>
2276 ReturnT(*function_to_bind)(Y*, Param1T, Param2T, Param3T, Param4T))
2278 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T>(pthis, function_to_bind);
2281 template <
class Y,
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T >
2282 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T>
2284 ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T))
2286 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T>(pthis, function_to_bind);
2289 template <
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T >
2290 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T>
2291 bind(ReturnT(*function_to_bind)(Param1T, Param2T, Param3T, Param4T))
2293 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T>(function_to_bind);
2296 template <
class X,
class Y,
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T,
class Param5T >
2297 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T>
2299 ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T))
2301 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T>(pthis, function_to_bind);
2304 template <
class X,
class Y,
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T,
class Param5T >
2305 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T>
2306 bind(
const Y *pthis,
2307 ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T)
const)
2309 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T>(pthis, function_to_bind);
2312 template <
class Y,
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T,
class Param5T >
2313 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T>
2315 ReturnT(*function_to_bind)(Y*, Param1T, Param2T, Param3T, Param4T, Param5T))
2317 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T>(pthis, function_to_bind);
2320 template <
class Y,
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T,
class Param5T >
2321 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T>
2323 ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T))
2325 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T>(pthis, function_to_bind);
2328 template <
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T,
class Param5T >
2329 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T>
2330 bind(ReturnT(*function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T))
2332 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T>(function_to_bind);
2335 template <
class X,
class Y,
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T,
class Param5T,
class Param6T >
2336 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T>
2338 ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T))
2340 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T>(pthis, function_to_bind);
2343 template <
class X,
class Y,
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T,
class Param5T,
class Param6T >
2344 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T>
2345 bind(
const Y *pthis,
2346 ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T)
const)
2348 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T>(pthis, function_to_bind);
2351 template <
class Y,
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T,
class Param5T,
class Param6T >
2352 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T>
2354 ReturnT(*function_to_bind)(Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T))
2356 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T>(pthis, function_to_bind);
2359 template <
class Y,
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T,
class Param5T,
class Param6T >
2360 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T>
2362 ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T))
2364 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T>(pthis, function_to_bind);
2367 template <
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T,
class Param5T,
class Param6T >
2368 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T>
2369 bind(ReturnT(*function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T))
2371 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T>(function_to_bind);
2374 template <
class X,
class Y,
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T,
class Param5T,
class Param6T,
class Param7T >
2375 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T>
2377 ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T))
2379 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T>(pthis, function_to_bind);
2382 template <
class X,
class Y,
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T,
class Param5T,
class Param6T,
class Param7T >
2383 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T>
2384 bind(
const Y *pthis,
2385 ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T)
const)
2387 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T>(pthis, function_to_bind);
2390 template <
class Y,
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T,
class Param5T,
class Param6T,
class Param7T >
2391 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T>
2393 ReturnT(*function_to_bind)(Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T))
2395 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T>(pthis, function_to_bind);
2398 template <
class Y,
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T,
class Param5T,
class Param6T,
class Param7T >
2399 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T>
2401 ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T))
2403 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T>(pthis, function_to_bind);
2406 template <
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T,
class Param5T,
class Param6T,
class Param7T >
2407 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T>
2408 bind(ReturnT(*function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T))
2410 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T>(function_to_bind);
2413 template <
class X,
class Y,
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T,
class Param5T,
class Param6T,
class Param7T,
class Param8T >
2414 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T>
2416 ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T))
2418 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T>(pthis, function_to_bind);
2421 template <
class X,
class Y,
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T,
class Param5T,
class Param6T,
class Param7T,
class Param8T >
2422 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T>
2423 bind(
const Y *pthis,
2424 ReturnT(X::* function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T)
const)
2426 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T>(pthis, function_to_bind);
2429 template <
class Y,
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T,
class Param5T,
class Param6T,
class Param7T,
class Param8T >
2430 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T>
2432 ReturnT(*function_to_bind)(Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T))
2434 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T>(pthis, function_to_bind);
2437 template <
class Y,
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T,
class Param5T,
class Param6T,
class Param7T,
class Param8T >
2438 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T>
2440 ReturnT(*function_to_bind)(
const Y*, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T))
2442 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T>(pthis, function_to_bind);
2445 template <
class ReturnT,
class Param1T,
class Param2T,
class Param3T,
class Param4T,
class Param5T,
class Param6T,
class Param7T,
class Param8T >
2446 delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T>
2447 bind(ReturnT(*function_to_bind)(Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T))
2449 return delegate<ReturnT, Param1T, Param2T, Param3T, Param4T, Param5T, Param6T, Param7T, Param8T>(function_to_bind);