48 #ifndef FASTDELEGATE_H 49 #define FASTDELEGATE_H 52 #endif // _MSC_VER > 1000 67 #define FASTDELEGATE_USESTATICFUNCTIONHACK 80 #if defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__VECTOR_C) && !defined(__ICL) && !defined(__BORLANDC__) 81 #define FASTDLGT_ISMSVC 83 #if (_MSC_VER <1300) // Many workarounds are required for VC6. 85 #pragma warning(disable:4786) // disable this ridiculous warning 94 #if defined(_MSC_VER) && !defined(__MWERKS__) 95 #define FASTDLGT_MICROSOFT_MFP 97 #if !defined(__VECTOR_C) 99 #define FASTDLGT_HASINHERITANCE_KEYWORDS 104 #if defined(FASTDLGT_ISMSVC) && (_MSC_VER >=1310) // VC 7.1 105 #define FASTDELEGATE_ALLOW_FUNCTION_TYPE_SYNTAX 109 #if defined (__DMC__) || defined(__GNUC__) || defined(__ICL) || defined(__COMO__) 110 #define FASTDELEGATE_ALLOW_FUNCTION_TYPE_SYNTAX 114 #if defined (__MWERKS__) 115 #define FASTDELEGATE_ALLOW_FUNCTION_TYPE_SYNTAX 118 #ifdef __GNUC__ // Workaround GCC bug #8271 120 #define FASTDELEGATE_GCC_BUG_8271 151 template <
class OutputClass,
class InputClass>
166 template <
class OutputClass,
class InputClass>
172 template <
class OutputClass,
class InputClass>
178 typedef int ERROR_CantUseHorrible_cast[
sizeof(InputClass)==
sizeof(u)
179 &&
sizeof(InputClass)==
sizeof(OutputClass) ? 1 : -1];
191 #define FASTDELEGATEDECLARE(CLASSNAME) class CLASSNAME; 195 #undef FASTDELEGATE_USESTATICFUNCTIONHACK 254 #ifdef FASTDLGT_MICROSOFT_MFP 256 #ifdef FASTDLGT_HASINHERITANCE_KEYWORDS 260 class __single_inheritance GenericClass;
268 class GenericClass {};
290 template <
class X,
class XFuncType,
class GenericMemFuncType>
291 inline static GenericClass *
Convert(X *pthis, XFuncType function_to_bind,
292 GenericMemFuncType &bound_func) {
295 typedef char ERROR_Unsupported_member_function_pointer_on_this_compiler[N-100];
304 template <
class X,
class XFuncType,
class GenericMemFuncType>
305 inline static GenericClass *
Convert(X *pthis, XFuncType function_to_bind,
306 GenericMemFuncType &bound_func) {
311 bound_func =
horrible_cast<GenericMemFuncType>(function_to_bind);
313 bound_func =
reinterpret_cast<GenericMemFuncType
>(function_to_bind);
315 return reinterpret_cast<GenericClass *
>(pthis);
329 #ifdef FASTDLGT_MICROSOFT_MFP 339 template <
class X,
class XFuncType,
class GenericMemFuncType>
340 inline static GenericClass *Convert(X *pthis, XFuncType function_to_bind,
341 GenericMemFuncType &bound_func) {
347 GenericMemFuncType funcaddress;
352 typedef int ERROR_CantUsehorrible_cast[
sizeof(function_to_bind)==
sizeof(u.s)? 1 : -1];
353 u.func = function_to_bind;
354 bound_func = u.s.funcaddress;
355 return reinterpret_cast<GenericClass *
>(
reinterpret_cast<char *
>(pthis) + u.s.delta);
369 struct MicrosoftVirtualMFP {
370 void (GenericClass::*codeptr)();
383 struct GenericVirtualClass :
virtual public GenericClass
385 typedef GenericVirtualClass * (GenericVirtualClass::*ProbePtrType)();
386 GenericVirtualClass * GetThis() {
return this; }
394 template <
class X,
class XFuncType,
class GenericMemFuncType>
395 inline static GenericClass *Convert(X *pthis, XFuncType function_to_bind,
396 GenericMemFuncType &bound_func) {
399 GenericClass* (X::*ProbeFunc)();
400 MicrosoftVirtualMFP s;
402 u.func = function_to_bind;
403 bound_func =
reinterpret_cast<GenericMemFuncType
>(u.s.codeptr);
405 GenericVirtualClass::ProbePtrType virtfunc;
406 MicrosoftVirtualMFP s;
409 typedef int ERROR_CantUsehorrible_cast[
sizeof(function_to_bind)==
sizeof(u.s)
410 &&
sizeof(function_to_bind)==
sizeof(u.ProbeFunc)
411 &&
sizeof(u2.virtfunc)==
sizeof(u2.s) ? 1 : -1];
414 u2.virtfunc = &GenericVirtualClass::GetThis;
415 u.s.codeptr = u2.s.codeptr;
416 return (pthis->*u.ProbeFunc)();
428 template <
class X,
class XFuncType,
class GenericMemFuncType>
429 inline static GenericClass *Convert(X *pthis, XFuncType function_to_bind,
430 GenericMemFuncType &bound_func) {
455 typedef char ERROR_VC6CompilerBug[-100];
470 template <
class X,
class XFuncType,
class GenericMemFuncType>
471 inline static GenericClass *Convert(X *pthis, XFuncType function_to_bind,
472 GenericMemFuncType &bound_func) {
480 GenericMemFuncType m_funcaddress;
487 typedef int ERROR_CantUsehorrible_cast[
sizeof(XFuncType)==
sizeof(u.s)? 1 : -1];
488 u.func = function_to_bind;
489 bound_func = u.s.funcaddress;
490 int virtual_delta = 0;
491 if (u.s.vtable_index) {
494 const int * vtable = *
reinterpret_cast<const int *const*
>(
495 reinterpret_cast<const char *
>(pthis) + u.s.vtordisp );
498 virtual_delta = u.s.vtordisp + *
reinterpret_cast<const int *
>(
499 reinterpret_cast<const char *
>(vtable) + u.s.vtable_index);
503 return reinterpret_cast<GenericClass *
>(
504 reinterpret_cast<char *
>(pthis) + u.s.delta + virtual_delta);
507 #endif // MSVC 7 and greater 509 #endif // MS/Intel hacks 563 typedef void (detail::GenericClass::*GenericMemFuncType)();
567 #if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) 568 typedef void (*GenericFuncPtr)();
569 GenericFuncPtr m_pStaticFunction;
573 #if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) 574 DelegateMemento() : m_pthis(0), m_pFunction(0), m_pStaticFunction(0) {};
576 m_pthis=0; m_pFunction=0; m_pStaticFunction=0;
580 void clear() { m_pthis=0; m_pFunction=0; }
583 #if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) 588 if (m_pStaticFunction!=x.m_pStaticFunction)
return false;
589 if (m_pStaticFunction!=0)
return m_pthis==x.
m_pthis;
600 #if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) 601 if (m_pStaticFunction !=0 || right.m_pStaticFunction!=0)
602 return m_pStaticFunction < right.m_pStaticFunction;
608 return memcmp(&m_pFunction, &right.
m_pFunction,
sizeof(m_pFunction)) < 0;
614 inline bool operator ! () const
615 {
return m_pthis==0 && m_pFunction==0; }
617 {
return m_pthis==0 && m_pFunction==0; }
620 SetMementoFrom(right);
624 return IsLess(right);
627 return right.
IsLess(*
this);
630 m_pFunction(right.m_pFunction), m_pthis(right.m_pthis)
632 , m_pStaticFunction (right.m_pStaticFunction)
639 #if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) 640 m_pStaticFunction = right.m_pStaticFunction;
663 template <
class GenericMemFunc,
class StaticFuncPtr,
class Un
voidStaticFuncPtr>
671 template <
class X,
class XMemFunc >
674 ::Convert(pthis, function_to_bind, m_pFunction);
675 #if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) 676 m_pStaticFunction = 0;
683 template <
class X,
class XMemFunc>
686 ::Convert(const_cast<X*>(pthis), function_to_bind, m_pFunction);
687 #if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) 688 m_pStaticFunction = 0;
691 #ifdef FASTDELEGATE_GCC_BUG_8271 // At present, GCC doesn't recognize constness of MFPs in templates 692 template <
class X,
class XMemFunc>
693 inline void bindmemfunc(
const X *pthis, XMemFunc function_to_bind) {
694 bindconstmemfunc(pthis, function_to_bind);
695 #if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) 696 m_pStaticFunction = 0;
702 inline GenericMemFunc
GetClosureMemPtr()
const {
return reinterpret_cast<GenericMemFunc
>(m_pFunction); }
710 #if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) 722 template<
class DerivedClass >
723 inline void CopyFrom (DerivedClass *pParent,
const DelegateMemento &x) {
725 if (m_pStaticFunction!=0) {
727 m_pthis=
reinterpret_cast<GenericClass *
>(pParent);
733 template <
class DerivedClass,
class ParentInvokerSig >
734 inline void bindstaticfunc(DerivedClass *pParent, ParentInvokerSig static_function_invoker,
735 StaticFuncPtr function_to_bind ) {
736 if (function_to_bind==0) {
739 bindmemfunc(pParent, static_function_invoker);
741 m_pStaticFunction=
reinterpret_cast<GenericFuncPtr
>(function_to_bind);
743 inline UnvoidStaticFuncPtr GetStaticFunction()
const {
744 return reinterpret_cast<UnvoidStaticFuncPtr
>(m_pStaticFunction);
758 template<
class DerivedClass >
760 SetMementoFrom(right);
766 template <
class DerivedClass,
class ParentInvokerSig>
767 inline void bindstaticfunc(DerivedClass *pParent, ParentInvokerSig static_function_invoker,
768 StaticFuncPtr function_to_bind) {
769 if (function_to_bind==0) {
774 bindmemfunc(pParent, static_function_invoker);
781 typedef int ERROR_CantUseEvilMethod[
sizeof(GenericClass *)==
sizeof(function_to_bind) ? 1 : -1];
796 typedef int ERROR_CantUseEvilMethod[
sizeof(UnvoidStaticFuncPtr)==
sizeof(
this) ? 1 : -1];
799 #endif // !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) 803 if (funcptr==0)
return empty();
806 else return funcptr==
reinterpret_cast<StaticFuncPtr
>(GetStaticFunction());
853 template<
class RetType=detail::DefaultVo
id>
857 typedef DesiredRetType (*StaticFunctionPtr)();
858 typedef RetType (*UnvoidStaticFunctionPtr)();
859 typedef RetType (detail::GenericClass::*GenericMemFn)();
881 template <
class X,
class Y >
883 m_Closure.
bindmemfunc(detail::implicit_cast<X*>(pthis), function_to_bind); }
884 template <
class X,
class Y >
885 inline void bind(Y *pthis, DesiredRetType (X::* function_to_bind)()) {
886 m_Closure.
bindmemfunc(detail::implicit_cast<X*>(pthis), function_to_bind); }
888 template <
class X,
class Y >
889 FastDelegate0(
const Y *pthis, DesiredRetType (X::* function_to_bind)()
const) {
890 m_Closure.
bindconstmemfunc(detail::implicit_cast<const X*>(pthis), function_to_bind); }
891 template <
class X,
class Y >
892 inline void bind(
const Y *pthis, DesiredRetType (X::* function_to_bind)()
const) {
893 m_Closure.
bindconstmemfunc(detail::implicit_cast<const X *>(pthis), function_to_bind); }
897 bind(function_to_bind); }
899 void operator = (DesiredRetType (*function_to_bind)() ) {
900 bind(function_to_bind); }
901 inline void bind(DesiredRetType (*function_to_bind)()) {
905 RetType operator() ()
const {
916 return empty()? 0: &SafeBoolStruct::m_nonzero;
923 inline bool operator ! ()
const {
938 template<
class Param1,
class RetType=detail::DefaultVo
id>
942 typedef DesiredRetType (*StaticFunctionPtr)(Param1 p1);
943 typedef RetType (*UnvoidStaticFunctionPtr)(Param1 p1);
944 typedef RetType (detail::GenericClass::*GenericMemFn)(Param1 p1);
966 template <
class X,
class Y >
967 FastDelegate1(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1) ) {
968 m_Closure.
bindmemfunc(detail::implicit_cast<X*>(pthis), function_to_bind); }
969 template <
class X,
class Y >
970 inline void bind(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1)) {
971 m_Closure.
bindmemfunc(detail::implicit_cast<X*>(pthis), function_to_bind); }
973 template <
class X,
class Y >
974 FastDelegate1(
const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1)
const) {
975 m_Closure.
bindconstmemfunc(detail::implicit_cast<const X*>(pthis), function_to_bind); }
976 template <
class X,
class Y >
977 inline void bind(
const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1)
const) {
978 m_Closure.
bindconstmemfunc(detail::implicit_cast<const X *>(pthis), function_to_bind); }
982 bind(function_to_bind); }
984 void operator = (DesiredRetType (*function_to_bind)(Param1 p1) ) {
985 bind(function_to_bind); }
986 inline void bind(DesiredRetType (*function_to_bind)(Param1 p1)) {
990 RetType operator() (Param1 p1)
const {
1001 return empty()? 0: &SafeBoolStruct::m_nonzero;
1008 inline bool operator ! ()
const {
1009 return !m_Closure; }
1011 return !m_Closure; }
1023 template<
class Param1,
class Param2,
class RetType=detail::DefaultVo
id>
1027 typedef DesiredRetType (*StaticFunctionPtr)(Param1 p1, Param2 p2);
1028 typedef RetType (*UnvoidStaticFunctionPtr)(Param1 p1, Param2 p2);
1029 typedef RetType (detail::GenericClass::*GenericMemFn)(Param1 p1, Param2 p2);
1051 template <
class X,
class Y >
1052 FastDelegate2(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2) ) {
1053 m_Closure.
bindmemfunc(detail::implicit_cast<X*>(pthis), function_to_bind); }
1054 template <
class X,
class Y >
1055 inline void bind(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2)) {
1056 m_Closure.
bindmemfunc(detail::implicit_cast<X*>(pthis), function_to_bind); }
1058 template <
class X,
class Y >
1059 FastDelegate2(
const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2)
const) {
1060 m_Closure.
bindconstmemfunc(detail::implicit_cast<const X*>(pthis), function_to_bind); }
1061 template <
class X,
class Y >
1062 inline void bind(
const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2)
const) {
1063 m_Closure.
bindconstmemfunc(detail::implicit_cast<const X *>(pthis), function_to_bind); }
1067 bind(function_to_bind); }
1069 void operator = (DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2) ) {
1070 bind(function_to_bind); }
1071 inline void bind(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2)) {
1073 function_to_bind); }
1075 RetType operator() (Param1 p1, Param2 p2)
const {
1086 return empty()? 0: &SafeBoolStruct::m_nonzero;
1093 inline bool operator ! ()
const {
1094 return !m_Closure; }
1096 return !m_Closure; }
1108 template<
class Param1,
class Param2,
class Param3,
class RetType=detail::DefaultVo
id>
1112 typedef DesiredRetType (*StaticFunctionPtr)(Param1 p1, Param2 p2, Param3 p3);
1113 typedef RetType (*UnvoidStaticFunctionPtr)(Param1 p1, Param2 p2, Param3 p3);
1114 typedef RetType (detail::GenericClass::*GenericMemFn)(Param1 p1, Param2 p2, Param3 p3);
1136 template <
class X,
class Y >
1137 FastDelegate3(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3) ) {
1138 m_Closure.
bindmemfunc(detail::implicit_cast<X*>(pthis), function_to_bind); }
1139 template <
class X,
class Y >
1140 inline void bind(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3)) {
1141 m_Closure.
bindmemfunc(detail::implicit_cast<X*>(pthis), function_to_bind); }
1143 template <
class X,
class Y >
1144 FastDelegate3(
const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3)
const) {
1145 m_Closure.
bindconstmemfunc(detail::implicit_cast<const X*>(pthis), function_to_bind); }
1146 template <
class X,
class Y >
1147 inline void bind(
const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3)
const) {
1148 m_Closure.
bindconstmemfunc(detail::implicit_cast<const X *>(pthis), function_to_bind); }
1151 FastDelegate3(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3) ) {
1152 bind(function_to_bind); }
1154 void operator = (DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3) ) {
1155 bind(function_to_bind); }
1156 inline void bind(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3)) {
1158 function_to_bind); }
1160 RetType operator() (Param1 p1, Param2 p2, Param3 p3)
const {
1171 return empty()? 0: &SafeBoolStruct::m_nonzero;
1178 inline bool operator ! ()
const {
1179 return !m_Closure; }
1181 return !m_Closure; }
1193 template<
class Param1,
class Param2,
class Param3,
class Param4,
class RetType=detail::DefaultVo
id>
1197 typedef DesiredRetType (*StaticFunctionPtr)(Param1 p1, Param2 p2, Param3 p3, Param4 p4);
1198 typedef RetType (*UnvoidStaticFunctionPtr)(Param1 p1, Param2 p2, Param3 p3, Param4 p4);
1199 typedef RetType (detail::GenericClass::*GenericMemFn)(Param1 p1, Param2 p2, Param3 p3, Param4 p4);
1221 template <
class X,
class Y >
1222 FastDelegate4(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4) ) {
1223 m_Closure.
bindmemfunc(detail::implicit_cast<X*>(pthis), function_to_bind); }
1224 template <
class X,
class Y >
1225 inline void bind(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4)) {
1226 m_Closure.
bindmemfunc(detail::implicit_cast<X*>(pthis), function_to_bind); }
1228 template <
class X,
class Y >
1229 FastDelegate4(
const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4)
const) {
1230 m_Closure.
bindconstmemfunc(detail::implicit_cast<const X*>(pthis), function_to_bind); }
1231 template <
class X,
class Y >
1232 inline void bind(
const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4)
const) {
1233 m_Closure.
bindconstmemfunc(detail::implicit_cast<const X *>(pthis), function_to_bind); }
1236 FastDelegate4(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4) ) {
1237 bind(function_to_bind); }
1239 void operator = (DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4) ) {
1240 bind(function_to_bind); }
1241 inline void bind(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4)) {
1243 function_to_bind); }
1245 RetType operator() (Param1 p1, Param2 p2, Param3 p3, Param4 p4)
const {
1256 return empty()? 0: &SafeBoolStruct::m_nonzero;
1263 inline bool operator ! ()
const {
1264 return !m_Closure; }
1266 return !m_Closure; }
1278 template<
class Param1,
class Param2,
class Param3,
class Param4,
class Param5,
class RetType=detail::DefaultVo
id>
1282 typedef DesiredRetType (*StaticFunctionPtr)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5);
1283 typedef RetType (*UnvoidStaticFunctionPtr)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5);
1284 typedef RetType (detail::GenericClass::*GenericMemFn)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5);
1306 template <
class X,
class Y >
1307 FastDelegate5(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5) ) {
1308 m_Closure.
bindmemfunc(detail::implicit_cast<X*>(pthis), function_to_bind); }
1309 template <
class X,
class Y >
1310 inline void bind(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5)) {
1311 m_Closure.
bindmemfunc(detail::implicit_cast<X*>(pthis), function_to_bind); }
1313 template <
class X,
class Y >
1314 FastDelegate5(
const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5)
const) {
1315 m_Closure.
bindconstmemfunc(detail::implicit_cast<const X*>(pthis), function_to_bind); }
1316 template <
class X,
class Y >
1317 inline void bind(
const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5)
const) {
1318 m_Closure.
bindconstmemfunc(detail::implicit_cast<const X *>(pthis), function_to_bind); }
1321 FastDelegate5(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5) ) {
1322 bind(function_to_bind); }
1324 void operator = (DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5) ) {
1325 bind(function_to_bind); }
1326 inline void bind(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5)) {
1328 function_to_bind); }
1330 RetType operator() (Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5)
const {
1341 return empty()? 0: &SafeBoolStruct::m_nonzero;
1348 inline bool operator ! ()
const {
1349 return !m_Closure; }
1351 return !m_Closure; }
1363 template<
class Param1,
class Param2,
class Param3,
class Param4,
class Param5,
class Param6,
class RetType=detail::DefaultVo
id>
1367 typedef DesiredRetType (*StaticFunctionPtr)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6);
1368 typedef RetType (*UnvoidStaticFunctionPtr)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6);
1369 typedef RetType (detail::GenericClass::*GenericMemFn)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6);
1391 template <
class X,
class Y >
1392 FastDelegate6(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6) ) {
1393 m_Closure.
bindmemfunc(detail::implicit_cast<X*>(pthis), function_to_bind); }
1394 template <
class X,
class Y >
1395 inline void bind(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6)) {
1396 m_Closure.
bindmemfunc(detail::implicit_cast<X*>(pthis), function_to_bind); }
1398 template <
class X,
class Y >
1399 FastDelegate6(
const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6)
const) {
1400 m_Closure.
bindconstmemfunc(detail::implicit_cast<const X*>(pthis), function_to_bind); }
1401 template <
class X,
class Y >
1402 inline void bind(
const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6)
const) {
1403 m_Closure.
bindconstmemfunc(detail::implicit_cast<const X *>(pthis), function_to_bind); }
1406 FastDelegate6(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6) ) {
1407 bind(function_to_bind); }
1409 void operator = (DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6) ) {
1410 bind(function_to_bind); }
1411 inline void bind(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6)) {
1413 function_to_bind); }
1415 RetType operator() (Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6)
const {
1426 return empty()? 0: &SafeBoolStruct::m_nonzero;
1433 inline bool operator ! ()
const {
1434 return !m_Closure; }
1436 return !m_Closure; }
1448 template<
class Param1,
class Param2,
class Param3,
class Param4,
class Param5,
class Param6,
class Param7,
class RetType=detail::DefaultVo
id>
1452 typedef DesiredRetType (*StaticFunctionPtr)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7);
1453 typedef RetType (*UnvoidStaticFunctionPtr)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7);
1454 typedef RetType (detail::GenericClass::*GenericMemFn)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7);
1476 template <
class X,
class Y >
1477 FastDelegate7(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7) ) {
1478 m_Closure.
bindmemfunc(detail::implicit_cast<X*>(pthis), function_to_bind); }
1479 template <
class X,
class Y >
1480 inline void bind(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7)) {
1481 m_Closure.
bindmemfunc(detail::implicit_cast<X*>(pthis), function_to_bind); }
1483 template <
class X,
class Y >
1484 FastDelegate7(
const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7)
const) {
1485 m_Closure.
bindconstmemfunc(detail::implicit_cast<const X*>(pthis), function_to_bind); }
1486 template <
class X,
class Y >
1487 inline void bind(
const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7)
const) {
1488 m_Closure.
bindconstmemfunc(detail::implicit_cast<const X *>(pthis), function_to_bind); }
1491 FastDelegate7(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7) ) {
1492 bind(function_to_bind); }
1494 void operator = (DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7) ) {
1495 bind(function_to_bind); }
1496 inline void bind(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7)) {
1498 function_to_bind); }
1500 RetType operator() (Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7)
const {
1511 return empty()? 0: &SafeBoolStruct::m_nonzero;
1518 inline bool operator ! ()
const {
1519 return !m_Closure; }
1521 return !m_Closure; }
1533 template<
class Param1,
class Param2,
class Param3,
class Param4,
class Param5,
class Param6,
class Param7,
class Param8,
class RetType=detail::DefaultVo
id>
1537 typedef DesiredRetType (*StaticFunctionPtr)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8);
1538 typedef RetType (*UnvoidStaticFunctionPtr)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8);
1539 typedef RetType (detail::GenericClass::*GenericMemFn)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8);
1561 template <
class X,
class Y >
1562 FastDelegate8(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8) ) {
1563 m_Closure.
bindmemfunc(detail::implicit_cast<X*>(pthis), function_to_bind); }
1564 template <
class X,
class Y >
1565 inline void bind(Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8)) {
1566 m_Closure.
bindmemfunc(detail::implicit_cast<X*>(pthis), function_to_bind); }
1568 template <
class X,
class Y >
1569 FastDelegate8(
const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8)
const) {
1570 m_Closure.
bindconstmemfunc(detail::implicit_cast<const X*>(pthis), function_to_bind); }
1571 template <
class X,
class Y >
1572 inline void bind(
const Y *pthis, DesiredRetType (X::* function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8)
const) {
1573 m_Closure.
bindconstmemfunc(detail::implicit_cast<const X *>(pthis), function_to_bind); }
1576 FastDelegate8(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8) ) {
1577 bind(function_to_bind); }
1579 void operator = (DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8) ) {
1580 bind(function_to_bind); }
1581 inline void bind(DesiredRetType (*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8)) {
1583 function_to_bind); }
1585 RetType operator() (Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8)
const {
1596 return empty()? 0: &SafeBoolStruct::m_nonzero;
1603 inline bool operator ! ()
const {
1604 return !m_Closure; }
1606 return !m_Closure; }
1613 RetType
InvokeStaticFunction(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8)
const {
1629 #ifdef FASTDELEGATE_ALLOW_FUNCTION_TYPE_SYNTAX 1633 template <
typename Signature>
1641 template<
typename R>
1642 class FastDelegate< R ( ) >
1651 typedef FastDelegate SelfType;
1654 FastDelegate() : BaseType() { }
1656 template <
class X,
class Y >
1657 FastDelegate(Y * pthis,
1658 R (X::* function_to_bind)( ))
1659 : BaseType(pthis, function_to_bind) { }
1661 template <
class X,
class Y >
1662 FastDelegate(
const Y *pthis,
1663 R (X::* function_to_bind)( )
const)
1664 : BaseType(pthis, function_to_bind)
1667 FastDelegate(R (*function_to_bind)( ))
1668 : BaseType(function_to_bind) { }
1669 void operator = (
const BaseType &x) {
1670 *
static_cast<BaseType*
>(
this) = x; }
1678 template<
typename R,
class Param1>
1679 class FastDelegate< R ( Param1 ) >
1688 typedef FastDelegate SelfType;
1691 FastDelegate() : BaseType() { }
1693 template <
class X,
class Y >
1694 FastDelegate(Y * pthis,
1695 R (X::* function_to_bind)( Param1 p1 ))
1696 : BaseType(pthis, function_to_bind) { }
1698 template <
class X,
class Y >
1699 FastDelegate(
const Y *pthis,
1700 R (X::* function_to_bind)( Param1 p1 )
const)
1701 : BaseType(pthis, function_to_bind)
1704 FastDelegate(R (*function_to_bind)( Param1 p1 ))
1705 : BaseType(function_to_bind) { }
1706 void operator = (
const BaseType &x) {
1707 *
static_cast<BaseType*
>(
this) = x; }
1715 template<
typename R,
class Param1,
class Param2>
1716 class FastDelegate< R ( Param1, Param2 ) >
1725 typedef FastDelegate SelfType;
1728 FastDelegate() : BaseType() { }
1730 template <
class X,
class Y >
1731 FastDelegate(Y * pthis,
1732 R (X::* function_to_bind)( Param1 p1, Param2 p2 ))
1733 : BaseType(pthis, function_to_bind) { }
1735 template <
class X,
class Y >
1736 FastDelegate(
const Y *pthis,
1737 R (X::* function_to_bind)( Param1 p1, Param2 p2 )
const)
1738 : BaseType(pthis, function_to_bind)
1741 FastDelegate(R (*function_to_bind)( Param1 p1, Param2 p2 ))
1742 : BaseType(function_to_bind) { }
1743 void operator = (
const BaseType &x) {
1744 *
static_cast<BaseType*
>(
this) = x; }
1752 template<
typename R,
class Param1,
class Param2,
class Param3>
1753 class FastDelegate< R ( Param1, Param2, Param3 ) >
1762 typedef FastDelegate SelfType;
1765 FastDelegate() : BaseType() { }
1767 template <
class X,
class Y >
1768 FastDelegate(Y * pthis,
1769 R (X::* function_to_bind)( Param1 p1, Param2 p2, Param3 p3 ))
1770 : BaseType(pthis, function_to_bind) { }
1772 template <
class X,
class Y >
1773 FastDelegate(
const Y *pthis,
1774 R (X::* function_to_bind)( Param1 p1, Param2 p2, Param3 p3 )
const)
1775 : BaseType(pthis, function_to_bind)
1778 FastDelegate(R (*function_to_bind)( Param1 p1, Param2 p2, Param3 p3 ))
1779 : BaseType(function_to_bind) { }
1780 void operator = (
const BaseType &x) {
1781 *
static_cast<BaseType*
>(
this) = x; }
1789 template<
typename R,
class Param1,
class Param2,
class Param3,
class Param4>
1790 class FastDelegate< R ( Param1, Param2, Param3, Param4 ) >
1792 :
public FastDelegate4 < Param1, Param2, Param3, Param4, R >
1799 typedef FastDelegate SelfType;
1802 FastDelegate() : BaseType() { }
1804 template <
class X,
class Y >
1805 FastDelegate(Y * pthis,
1806 R (X::* function_to_bind)( Param1 p1, Param2 p2, Param3 p3, Param4 p4 ))
1807 : BaseType(pthis, function_to_bind) { }
1809 template <
class X,
class Y >
1810 FastDelegate(
const Y *pthis,
1811 R (X::* function_to_bind)( Param1 p1, Param2 p2, Param3 p3, Param4 p4 )
const)
1812 : BaseType(pthis, function_to_bind)
1815 FastDelegate(R (*function_to_bind)( Param1 p1, Param2 p2, Param3 p3, Param4 p4 ))
1816 : BaseType(function_to_bind) { }
1817 void operator = (
const BaseType &x) {
1818 *
static_cast<BaseType*
>(
this) = x; }
1826 template<
typename R,
class Param1,
class Param2,
class Param3,
class Param4,
class Param5>
1827 class FastDelegate< R ( Param1, Param2, Param3, Param4, Param5 ) >
1829 :
public FastDelegate5 < Param1, Param2, Param3, Param4, Param5, R >
1836 typedef FastDelegate SelfType;
1839 FastDelegate() : BaseType() { }
1841 template <
class X,
class Y >
1842 FastDelegate(Y * pthis,
1843 R (X::* function_to_bind)( Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5 ))
1844 : BaseType(pthis, function_to_bind) { }
1846 template <
class X,
class Y >
1847 FastDelegate(
const Y *pthis,
1848 R (X::* function_to_bind)( Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5 )
const)
1849 : BaseType(pthis, function_to_bind)
1852 FastDelegate(R (*function_to_bind)( Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5 ))
1853 : BaseType(function_to_bind) { }
1854 void operator = (
const BaseType &x) {
1855 *
static_cast<BaseType*
>(
this) = x; }
1863 template<
typename R,
class Param1,
class Param2,
class Param3,
class Param4,
class Param5,
class Param6>
1864 class FastDelegate< R ( Param1, Param2, Param3, Param4, Param5, Param6 ) >
1866 :
public FastDelegate6 < Param1, Param2, Param3, Param4, Param5, Param6, R >
1873 typedef FastDelegate SelfType;
1876 FastDelegate() : BaseType() { }
1878 template <
class X,
class Y >
1879 FastDelegate(Y * pthis,
1880 R (X::* function_to_bind)( Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6 ))
1881 : BaseType(pthis, function_to_bind) { }
1883 template <
class X,
class Y >
1884 FastDelegate(
const Y *pthis,
1885 R (X::* function_to_bind)( Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6 )
const)
1886 : BaseType(pthis, function_to_bind)
1889 FastDelegate(R (*function_to_bind)( Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6 ))
1890 : BaseType(function_to_bind) { }
1891 void operator = (
const BaseType &x) {
1892 *
static_cast<BaseType*
>(
this) = x; }
1900 template<
typename R,
class Param1,
class Param2,
class Param3,
class Param4,
class Param5,
class Param6,
class Param7>
1901 class FastDelegate< R ( Param1, Param2, Param3, Param4, Param5, Param6, Param7 ) >
1903 :
public FastDelegate7 < Param1, Param2, Param3, Param4, Param5, Param6, Param7, R >
1910 typedef FastDelegate SelfType;
1913 FastDelegate() : BaseType() { }
1915 template <
class X,
class Y >
1916 FastDelegate(Y * pthis,
1917 R (X::* function_to_bind)( Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7 ))
1918 : BaseType(pthis, function_to_bind) { }
1920 template <
class X,
class Y >
1921 FastDelegate(
const Y *pthis,
1922 R (X::* function_to_bind)( Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7 )
const)
1923 : BaseType(pthis, function_to_bind)
1926 FastDelegate(R (*function_to_bind)( Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7 ))
1927 : BaseType(function_to_bind) { }
1928 void operator = (
const BaseType &x) {
1929 *
static_cast<BaseType*
>(
this) = x; }
1937 template<
typename R,
class Param1,
class Param2,
class Param3,
class Param4,
class Param5,
class Param6,
class Param7,
class Param8>
1938 class FastDelegate< R ( Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8 ) >
1940 :
public FastDelegate8 < Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, R >
1947 typedef FastDelegate SelfType;
1950 FastDelegate() : BaseType() { }
1952 template <
class X,
class Y >
1953 FastDelegate(Y * pthis,
1954 R (X::* function_to_bind)( Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8 ))
1955 : BaseType(pthis, function_to_bind) { }
1957 template <
class X,
class Y >
1958 FastDelegate(
const Y *pthis,
1959 R (X::* function_to_bind)( Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8 )
const)
1960 : BaseType(pthis, function_to_bind)
1963 FastDelegate(R (*function_to_bind)( Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8 ))
1964 : BaseType(function_to_bind) { }
1965 void operator = (
const BaseType &x) {
1966 *
static_cast<BaseType*
>(
this) = x; }
1970 #endif //FASTDELEGATE_ALLOW_FUNCTION_TYPE_SYNTAX 1997 #define FASTDLGT_RETTYPE detail::VoidToDefaultVoid<RetType>::type 1999 #define FASTDLGT_RETTYPE RetType 2003 template <
class X,
class Y,
class RetType>
2008 template <
class X,
class Y,
class RetType>
2014 template <
class X,
class Y,
class Param1,
class RetType>
2019 template <
class X,
class Y,
class Param1,
class RetType>
2025 template <
class X,
class Y,
class Param1,
class Param2,
class RetType>
2030 template <
class X,
class Y,
class Param1,
class Param2,
class RetType>
2036 template <
class X,
class Y,
class Param1,
class Param2,
class Param3,
class RetType>
2041 template <
class X,
class Y,
class Param1,
class Param2,
class Param3,
class RetType>
2047 template <
class X,
class Y,
class Param1,
class Param2,
class Param3,
class Param4,
class RetType>
2052 template <
class X,
class Y,
class Param1,
class Param2,
class Param3,
class Param4,
class RetType>
2058 template <
class X,
class Y,
class Param1,
class Param2,
class Param3,
class Param4,
class Param5,
class RetType>
2059 FastDelegate5<Param1, Param2, Param3, Param4, Param5, FASTDLGT_RETTYPE> MakeDelegate(Y* x, RetType (X::*func)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5)) {
2063 template <
class X,
class Y,
class Param1,
class Param2,
class Param3,
class Param4,
class Param5,
class RetType>
2064 FastDelegate5<Param1, Param2, Param3, Param4, Param5, FASTDLGT_RETTYPE> MakeDelegate(Y* x, RetType (X::*func)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5)
const) {
2069 template <
class X,
class Y,
class Param1,
class Param2,
class Param3,
class Param4,
class Param5,
class Param6,
class RetType>
2070 FastDelegate6<Param1, Param2, Param3, Param4, Param5, Param6, FASTDLGT_RETTYPE> MakeDelegate(Y* x, RetType (X::*func)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6)) {
2074 template <
class X,
class Y,
class Param1,
class Param2,
class Param3,
class Param4,
class Param5,
class Param6,
class RetType>
2075 FastDelegate6<Param1, Param2, Param3, Param4, Param5, Param6, FASTDLGT_RETTYPE> MakeDelegate(Y* x, RetType (X::*func)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6)
const) {
2080 template <
class X,
class Y,
class Param1,
class Param2,
class Param3,
class Param4,
class Param5,
class Param6,
class Param7,
class RetType>
2081 FastDelegate7<Param1, Param2, Param3, Param4, Param5, Param6, Param7, FASTDLGT_RETTYPE> MakeDelegate(Y* x, RetType (X::*func)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7)) {
2085 template <
class X,
class Y,
class Param1,
class Param2,
class Param3,
class Param4,
class Param5,
class Param6,
class Param7,
class RetType>
2086 FastDelegate7<Param1, Param2, Param3, Param4, Param5, Param6, Param7, FASTDLGT_RETTYPE> MakeDelegate(Y* x, RetType (X::*func)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7)
const) {
2091 template <
class X,
class Y,
class Param1,
class Param2,
class Param3,
class Param4,
class Param5,
class Param6,
class Param7,
class Param8,
class RetType>
2092 FastDelegate8<Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, FASTDLGT_RETTYPE> MakeDelegate(Y* x, RetType (X::*func)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8)) {
2096 template <
class X,
class Y,
class Param1,
class Param2,
class Param3,
class Param4,
class Param5,
class Param6,
class Param7,
class Param8,
class RetType>
2097 FastDelegate8<Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, FASTDLGT_RETTYPE> MakeDelegate(Y* x, RetType (X::*func)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8)
const) {
2103 #undef FASTDLGT_RETTYPE 2107 #endif // !defined(FASTDELEGATE_H) bool operator!=(StaticFunctionPtr funcptr)
StaticFunctionPtr m_nonzero
const DelegateMemento & GetMemento()
detail::GenericClass * m_pthis
StaticFunctionPtr m_nonzero
StaticFunctionPtr SafeBoolStruct::* unspecified_bool_type
bool operator==(StaticFunctionPtr funcptr)
FastDelegate2(const Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2) const)
FastDelegate2(const FastDelegate2 &x)
bool operator==(StaticFunctionPtr funcptr)
FastDelegate1(const FastDelegate1 &x)
FastDelegate0(DesiredRetType(*function_to_bind)())
detail::DefaultVoidToVoid< RetType >::type DesiredRetType
void SetMemento(const DelegateMemento &any)
void bind(const Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2) const)
GenericMemFunc GetClosureMemPtr() const
void bind(const Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6) const)
RetType InvokeStaticFunction(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8) const
StaticFunctionPtr SafeBoolStruct::* unspecified_bool_type
bool IsEqualToStaticFuncPtr(StaticFuncPtr funcptr)
FastDelegate8(Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8))
GenericClass * GetClosureThis() const
void bind(Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8))
FastDelegate6(const Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6) const)
RetType InvokeStaticFunction(Param1 p1, Param2 p2, Param3 p3, Param4 p4) const
RetType InvokeStaticFunction() const
OutputClass implicit_cast(InputClass input)
void bind(const Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5) const)
const DelegateMemento & GetMemento()
StaticFunctionPtr SafeBoolStruct::* unspecified_bool_type
void SetMemento(const DelegateMemento &any)
const DelegateMemento & GetMemento()
void bind(const Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3) const)
void bind(Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5))
detail::ClosurePtr< GenericMemFn, StaticFunctionPtr, UnvoidStaticFunctionPtr > ClosureType
void bindconstmemfunc(const X *pthis, XMemFunc function_to_bind)
bool operator!=(StaticFunctionPtr funcptr)
static GenericClass * Convert(X *pthis, XFuncType function_to_bind, GenericMemFuncType &bound_func)
bool operator==(StaticFunctionPtr funcptr)
int a_data_pointer_to_this_is_0_on_buggy_compilers
FastDelegate0(Y *pthis, DesiredRetType(X::*function_to_bind)())
FastDelegate8(DesiredRetType(*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8))
void bind(Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1))
StaticFunctionPtr m_nonzero
void bind(const Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8) const)
FastDelegate5(Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5))
bool operator==(StaticFunctionPtr funcptr)
int a_data_pointer_to_this_is_0_on_buggy_compilers
detail::ClosurePtr< GenericMemFn, StaticFunctionPtr, UnvoidStaticFunctionPtr > ClosureType
void bind(Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7))
void bind(const Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7) const)
void bind(Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2))
StaticFunctionPtr m_nonzero
RetType InvokeStaticFunction(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6) const
int a_data_pointer_to_this_is_0_on_buggy_compilers
void bind(Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4))
detail::DefaultVoidToVoid< RetType >::type DesiredRetType
FastDelegate0(const Y *pthis, DesiredRetType(X::*function_to_bind)() const)
static GenericClass * Convert(X *pthis, XFuncType function_to_bind, GenericMemFuncType &bound_func)
FastDelegate6(DesiredRetType(*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6))
detail::ClosurePtr< GenericMemFn, StaticFunctionPtr, UnvoidStaticFunctionPtr > ClosureType
detail::DefaultVoidToVoid< RetType >::type DesiredRetType
UnvoidStaticFuncPtr GetStaticFunction() const
FastDelegate0(const FastDelegate0 &x)
void bind(DesiredRetType(*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8))
void bind(DesiredRetType(*function_to_bind)(Param1 p1, Param2 p2, Param3 p3))
bool operator==(StaticFunctionPtr funcptr)
int a_data_pointer_to_this_is_0_on_buggy_compilers
void SetMemento(const DelegateMemento &any)
StaticFunctionPtr m_nonzero
const DelegateMemento & GetMemento()
FastDelegate0< FASTDLGT_RETTYPE > MakeDelegate(Y *x, RetType(X::*func)())
void bind(DesiredRetType(*function_to_bind)(Param1 p1, Param2 p2))
const DelegateMemento & GetMemento()
OutputClass horrible_cast(const InputClass input)
bool operator==(StaticFunctionPtr funcptr)
int a_data_pointer_to_this_is_0_on_buggy_compilers
FastDelegate3(Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3))
detail::ClosurePtr< GenericMemFn, StaticFunctionPtr, UnvoidStaticFunctionPtr > ClosureType
StaticFunctionPtr SafeBoolStruct::* unspecified_bool_type
const DelegateMemento & GetMemento()
void bind(DesiredRetType(*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6))
FastDelegate7(Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7))
FastDelegate4(const Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4) const)
void SetMemento(const DelegateMemento &any)
void CopyFrom(DerivedClass *pParent, const DelegateMemento &right)
detail::ClosurePtr< GenericMemFn, StaticFunctionPtr, UnvoidStaticFunctionPtr > ClosureType
bool operator!=(StaticFunctionPtr funcptr)
int a_data_pointer_to_this_is_0_on_buggy_compilers
detail::DefaultVoidToVoid< RetType >::type DesiredRetType
void bind(DesiredRetType(*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4))
void bind(Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3))
RetType InvokeStaticFunction(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5) const
FastDelegate8(const FastDelegate8 &x)
FastDelegate1(Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1))
bool IsEqual(const DelegateMemento &x) const
bool operator!=(StaticFunctionPtr funcptr)
bool operator==(StaticFunctionPtr funcptr)
bool operator!=(StaticFunctionPtr funcptr)
FastDelegate1(DesiredRetType(*function_to_bind)(Param1 p1))
FastDelegate7(const FastDelegate7 &x)
void bindstaticfunc(DerivedClass *pParent, ParentInvokerSig static_function_invoker, StaticFuncPtr function_to_bind)
detail::ClosurePtr< GenericMemFn, StaticFunctionPtr, UnvoidStaticFunctionPtr > ClosureType
void SetMemento(const DelegateMemento &any)
FastDelegate7(DesiredRetType(*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7))
FastDelegate6(const FastDelegate6 &x)
FastDelegate3(const FastDelegate3 &x)
RetType InvokeStaticFunction(Param1 p1, Param2 p2) const
detail::DefaultVoidToVoid< RetType >::type DesiredRetType
StaticFunctionPtr m_nonzero
FastDelegate3(const Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3) const)
detail::ClosurePtr< GenericMemFn, StaticFunctionPtr, UnvoidStaticFunctionPtr > ClosureType
detail::DefaultVoidToVoid< RetType >::type DesiredRetType
DelegateMemento(const DelegateMemento &right)
detail::DefaultVoidToVoid< RetType >::type DesiredRetType
StaticFunctionPtr m_nonzero
StaticFunctionPtr SafeBoolStruct::* unspecified_bool_type
FastDelegate4(DesiredRetType(*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4))
bool IsLess(const DelegateMemento &right) const
void SetMemento(const DelegateMemento &any)
bool operator==(StaticFunctionPtr funcptr)
const DelegateMemento & GetMemento()
FastDelegate7(const Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7) const)
void bind(const Y *pthis, DesiredRetType(X::*function_to_bind)() const)
StaticFunctionPtr SafeBoolStruct::* unspecified_bool_type
void bind(DesiredRetType(*function_to_bind)())
void SetMementoFrom(const DelegateMemento &right)
void SetMemento(const DelegateMemento &any)
void SetMemento(const DelegateMemento &any)
int a_data_pointer_to_this_is_0_on_buggy_compilers
RetType InvokeStaticFunction(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7) const
void bindmemfunc(X *pthis, XMemFunc function_to_bind)
FastDelegate5(const FastDelegate5 &x)
const DelegateMemento & GetMemento()
void bind(Y *pthis, DesiredRetType(X::*function_to_bind)())
StaticFunctionPtr SafeBoolStruct::* unspecified_bool_type
int a_data_pointer_to_this_is_0_on_buggy_compilers
int a_data_pointer_to_this_is_0_on_buggy_compilers
void bind(const Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1) const)
StaticFunctionPtr SafeBoolStruct::* unspecified_bool_type
StaticFunctionPtr m_nonzero
const int SINGLE_MEMFUNCPTR_SIZE
bool operator!=(StaticFunctionPtr funcptr)
bool operator!=(StaticFunctionPtr funcptr)
FastDelegate3(DesiredRetType(*function_to_bind)(Param1 p1, Param2 p2, Param3 p3))
#define FASTDELEGATE_USESTATICFUNCTIONHACK
RetType InvokeStaticFunction(Param1 p1, Param2 p2, Param3 p3) const
FastDelegate8(const Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8) const)
FastDelegate4(Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4))
const DelegateMemento & GetMemento()
detail::DefaultVoidToVoid< RetType >::type DesiredRetType
FastDelegate1(const Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1) const)
StaticFunctionPtr SafeBoolStruct::* unspecified_bool_type
RetType InvokeStaticFunction(Param1 p1) const
void bind(DesiredRetType(*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5))
void bind(DesiredRetType(*function_to_bind)(Param1 p1))
FastDelegate6(Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6))
detail::ClosurePtr< GenericMemFn, StaticFunctionPtr, UnvoidStaticFunctionPtr > ClosureType
FastDelegate2(Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2))
StaticFunctionPtr m_nonzero
bool operator==(StaticFunctionPtr funcptr)
detail::ClosurePtr< GenericMemFn, StaticFunctionPtr, UnvoidStaticFunctionPtr > ClosureType
void bind(DesiredRetType(*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7))
GenericMemFuncType m_pFunction
detail::DefaultVoidToVoid< RetType >::type DesiredRetType
bool operator!=(StaticFunctionPtr funcptr)
void bind(Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6))
void SetMemento(const DelegateMemento &any)
FastDelegate5(DesiredRetType(*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5))
void bind(const Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4) const)
FastDelegate2(DesiredRetType(*function_to_bind)(Param1 p1, Param2 p2))
bool operator!=(StaticFunctionPtr funcptr)
FastDelegate4(const FastDelegate4 &x)
FastDelegate5(const Y *pthis, DesiredRetType(X::*function_to_bind)(Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5) const)