44 typedef T& reference_t;
45 typedef const T const_t;
46 typedef const T* const_pointer_t;
47 typedef const T& const_reference_t;
48 typedef const T*
const const_pointer_to_const_t;
50 typedef const T& mkArg_t;
59 typedef T& reference_t;
60 typedef const T const_t;
61 typedef const T* const_pointer_t;
62 typedef const T& const_reference_t;
63 typedef const T*
const const_pointer_to_const_t;
74 typedef T& reference_t;
75 typedef const T const_t;
76 typedef const T* const_pointer_t;
77 typedef const T& const_reference_t;
78 typedef const T*
const const_pointer_to_const_t;
80 typedef const T& mkArg_t;
89 typedef T& reference_t;
90 typedef const T const_t;
91 typedef const T* const_pointer_t;
92 typedef const T& const_reference_t;
93 typedef const T*
const const_pointer_to_const_t;
95 typedef const T& mkArg_t;
101 typedef const T& id_t;
103 typedef T* pointer_t;
104 typedef T& reference_t;
105 typedef const T const_t;
106 typedef const T* const_pointer_t;
107 typedef const T& const_reference_t;
108 typedef const T*
const const_pointer_to_const_t;
110 typedef const T& mkArg_t;
116 typedef const T* id_t;
118 typedef T* pointer_t;
119 typedef T& reference_t;
120 typedef const T const_t;
121 typedef const T* const_pointer_t;
122 typedef const T& const_reference_t;
123 typedef const T*
const const_pointer_to_const_t;
125 typedef const T* mkArg_t;
132 typedef typename typeTraits<T>::mkArg_t Type_t;
139 template<
typename R,
typename F>
162 inline operator R()
const
168 inline R operator()()
const
184 template<
typename R,
typename F>
185 inline std::ostream& operator<<(std::ostream& os, const Fct0<R, F>&)
187 os <<
"0-ary function";
191 template<
typename A0,
typename R,
typename F>
221 closureT(
const F& _op,
typename curryArgMode<A0>::Type_t _pa0)
227 : op(rhs.op), pa0(rhs.pa0)
231 inline R operator()()
const
240 inline closure_t closure(
typename curryArgMode<A0>::Type_t a0)
const
246 inline R operator()(
typename curryArgMode<A0>::Type_t a0)
const
255 template<
typename A0,
typename R>
256 inline Fct1<A0, R, R (*)(A0)> curry(R (*f)(A0))
258 return Fct1<A0, R, R (*)(A0)>(f);
262 template<
typename A0,
typename R,
typename F>
263 inline std::ostream& operator<<(std::ostream& os, const Fct1<A0, R, F>&)
265 os <<
"1-ary function";
268 template<
typename A0,
typename A1,
typename R,
typename F>
299 closureT(
const F& _op,
typename curryArgMode<A0>::Type_t _pa0,
typename curryArgMode<A1>::Type_t _pa1)
300 : op(_op), pa0(_pa0), pa1(_pa1)
305 : op(rhs.op), pa0(rhs.pa0), pa1(rhs.pa1)
309 inline R operator()()
const
318 inline closure_t closure(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1)
const
324 inline R operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1)
const
337 PartialAppl1(
const F& _f,
typename curryArgMode<A0>::Type_t _pa0)
343 : f(rhs.f), pa0(rhs.pa0)
347 inline R operator()(
typename curryArgMode<A1>::Type_t a1)
const
356 inline ffunc1_t operator()(
typename curryArgMode<A0>::Type_t a0)
const
363 template<
typename A0,
typename A1,
typename R>
364 inline Fct2<A0, A1, R, R (*)(A0, A1)> curry(R (*f)(A0, A1))
366 return Fct2<A0, A1, R, R (*)(A0, A1)>(f);
370 template<
typename A0,
typename A1,
typename R,
typename F>
371 inline std::ostream& operator<<(std::ostream& os, const Fct2<A0, A1, R, F> &)
373 os <<
"2-ary function";
377 template<
typename A0,
typename A1,
typename A2,
typename R,
typename F>
409 closureT(
const F& _op,
typename curryArgMode<A0>::Type_t _pa0,
typename curryArgMode<A1>::Type_t _pa1,
410 typename curryArgMode<A2>::Type_t _pa2)
411 : op(_op), pa0(_pa0), pa1(_pa1), pa2(_pa2)
416 : op(rhs.op), pa0(rhs.pa0), pa1(rhs.pa1), pa2(rhs.pa2)
420 inline R operator()()
const
422 return op(pa0, pa1, pa2);
429 inline closure_t closure(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
430 typename curryArgMode<A2>::Type_t a2)
const
436 inline R operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
437 typename curryArgMode<A2>::Type_t a2)
const
439 return f(a0, a1, a2);
450 PartialAppl1(
const F& _f,
typename curryArgMode<A0>::Type_t _pa0)
456 : f(rhs.f), pa0(rhs.pa0)
460 inline R operator()(
typename curryArgMode<A1>::Type_t a1,
typename curryArgMode<A2>::Type_t a2)
const
462 return f(pa0, a1, a2);
469 inline ffunc1_t operator()(
typename curryArgMode<A0>::Type_t a0)
const
482 PartialAppl2(
const F& _f,
typename curryArgMode<A0>::Type_t _pa0,
typename curryArgMode<A1>::Type_t _pa1)
483 : f(_f), pa0(_pa0), pa1(_pa1)
488 : f(rhs.f), pa0(rhs.pa0), pa1(rhs.pa1)
492 inline R operator()(
typename curryArgMode<A2>::Type_t a2)
const
494 return f(pa0, pa1, a2);
501 inline ffunc2_t operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1)
const
509 template<
typename A0,
typename A1,
typename A2,
typename R>
510 inline Fct3<A0, A1, A2, R, R (*)(A0, A1, A2)> curry(R (*f)(A0, A1, A2))
512 return Fct3<A0, A1, A2, R, R (*)(A0, A1, A2)>(f);
516 template<
typename A0,
typename A1,
typename A2,
typename R,
typename F>
517 inline std::ostream& operator<<(std::ostream& os, const Fct3<A0, A1, A2, R, F> &)
519 os <<
"3-ary function";
523 template<
typename A0,
typename A1,
typename A2,
typename A3,
typename R,
typename F>
556 closureT(
const F& _op,
typename curryArgMode<A0>::Type_t _pa0,
typename curryArgMode<A1>::Type_t _pa1,
557 typename curryArgMode<A2>::Type_t _pa2,
typename curryArgMode<A3>::Type_t _pa3)
558 : op(_op), pa0(_pa0), pa1(_pa1), pa2(_pa2), pa3(_pa3)
563 : op(rhs.op), pa0(rhs.pa0), pa1(rhs.pa1), pa2(rhs.pa2), pa3(rhs.pa3)
567 inline R operator()()
const
569 return op(pa0, pa1, pa2, pa3);
575 inline closure_t closure(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
576 typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3)
const
582 inline R operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
583 typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3)
const
585 return f(a0, a1, a2, a3);
596 PartialAppl1(
const F& _f,
typename curryArgMode<A0>::Type_t _pa0)
602 : f(rhs.f), pa0(rhs.pa0)
606 inline R operator()(
typename curryArgMode<A1>::Type_t a1,
typename curryArgMode<A2>::Type_t a2,
607 typename curryArgMode<A3>::Type_t a3)
const
609 return f(pa0, a1, a2, a3);
615 inline ffunc1_t operator()(
typename curryArgMode<A0>::Type_t a0)
const
628 PartialAppl2(
const F& _f,
typename curryArgMode<A0>::Type_t _pa0,
typename curryArgMode<A1>::Type_t _pa1)
629 : f(_f), pa0(_pa0), pa1(_pa1)
634 : f(rhs.f), pa0(rhs.pa0), pa1(rhs.pa1)
638 inline R operator()(
typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3)
const
640 return f(pa0, pa1, a2, a3);
646 inline ffunc2_t operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1)
const
660 PartialAppl3(
const F& _f,
typename curryArgMode<A0>::Type_t _pa0,
typename curryArgMode<A1>::Type_t _pa1,
661 typename curryArgMode<A2>::Type_t _pa2)
662 : f(_f), pa0(_pa0), pa1(_pa1), pa2(_pa2)
667 : f(rhs.f), pa0(rhs.pa0), pa1(rhs.pa1), pa2(rhs.pa2)
671 inline R operator()(
typename curryArgMode<A3>::Type_t a3)
const
673 return f(pa0, pa1, pa2, a3);
679 inline ffunc3_t operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
680 typename curryArgMode<A2>::Type_t a2)
const
687 template<
typename A0,
typename A1,
typename A2,
typename A3,
typename R>
688 inline Fct4<A0, A1, A2, A3, R, R (*)(A0, A1, A2, A3)> curry(R (*f)(A0, A1, A2, A3))
690 return Fct4<A0, A1, A2, A3, R, R (*)(A0, A1, A2, A3)>(f);
694 template<
typename A0,
typename A1,
typename A2,
typename A3,
typename R,
typename F>
695 inline std::ostream& operator<<(std::ostream& os, const Fct4<A0, A1, A2, A3, R, F> &)
697 os <<
"4-ary function";
701 template<
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename R,
typename F>
735 closureT(
const F& _op,
typename curryArgMode<A0>::Type_t _pa0,
typename curryArgMode<A1>::Type_t _pa1,
736 typename curryArgMode<A2>::Type_t _pa2,
typename curryArgMode<A3>::Type_t _pa3,
737 typename curryArgMode<A4>::Type_t _pa4)
738 : op(_op), pa0(_pa0), pa1(_pa1), pa2(_pa2), pa3(_pa3), pa4(_pa4)
743 : op(rhs.op), pa0(rhs.pa0), pa1(rhs.pa1), pa2(rhs.pa2), pa3(rhs.pa3), pa4(rhs.pa4)
747 inline R operator()()
const
749 return op(pa0, pa1, pa2, pa3, pa4);
755 inline closure_t closure(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
756 typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3,
757 typename curryArgMode<A4>::Type_t a4)
const
763 inline R operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
764 typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3,
765 typename curryArgMode<A4>::Type_t a4)
const
767 return f(a0, a1, a2, a3, a4);
778 PartialAppl1(
const F& _f,
typename curryArgMode<A0>::Type_t _pa0)
784 : f(rhs.f), pa0(rhs.pa0)
788 inline R operator()(
typename curryArgMode<A1>::Type_t a1,
typename curryArgMode<A2>::Type_t a2,
789 typename curryArgMode<A3>::Type_t a3,
typename curryArgMode<A4>::Type_t a4)
const
791 return f(pa0, a1, a2, a3, a4);
797 inline ffunc1_t operator()(
typename curryArgMode<A0>::Type_t a0)
const
810 PartialAppl2(
const F& _f,
typename curryArgMode<A0>::Type_t _pa0,
typename curryArgMode<A1>::Type_t _pa1)
811 : f(_f), pa0(_pa0), pa1(_pa1)
816 : f(rhs.f), pa0(rhs.pa0), pa1(rhs.pa1)
820 inline R operator()(
typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3,
821 typename curryArgMode<A4>::Type_t a4)
const
823 return f(pa0, pa1, a2, a3, a4);
829 inline ffunc2_t operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1)
const
843 PartialAppl3(
const F& _f,
typename curryArgMode<A0>::Type_t _pa0,
typename curryArgMode<A1>::Type_t _pa1,
844 typename curryArgMode<A2>::Type_t _pa2)
845 : f(_f), pa0(_pa0), pa1(_pa1), pa2(_pa2)
850 : f(rhs.f), pa0(rhs.pa0), pa1(rhs.pa1), pa2(rhs.pa2)
854 inline R operator()(
typename curryArgMode<A3>::Type_t a3,
typename curryArgMode<A4>::Type_t a4)
const
856 return f(pa0, pa1, pa2, a3, a4);
862 inline ffunc3_t operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
863 typename curryArgMode<A2>::Type_t a2)
const
878 PartialAppl4(
const F& _f,
typename curryArgMode<A0>::Type_t _pa0,
typename curryArgMode<A1>::Type_t _pa1,
879 typename curryArgMode<A2>::Type_t _pa2,
typename curryArgMode<A3>::Type_t _pa3)
880 : f(_f), pa0(_pa0), pa1(_pa1), pa2(_pa2), pa3(_pa3)
885 : f(rhs.f), pa0(rhs.pa0), pa1(rhs.pa1), pa2(rhs.pa2), pa3(rhs.pa3)
889 inline R operator()(
typename curryArgMode<A4>::Type_t a4)
const
891 return f(pa0, pa1, pa2, pa3, a4);
897 inline ffunc4_t operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
898 typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3)
const
905 template<
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename R>
906 inline Fct5<A0, A1, A2, A3, A4, R, R (*)(A0, A1, A2, A3, A4)> curry(R (*f)(A0, A1, A2, A3, A4))
908 return Fct5<A0, A1, A2, A3, A4, R, R (*)(A0, A1, A2, A3, A4)>(f);
912 template<
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename R,
typename F>
913 inline std::ostream& operator<<(std::ostream& os, const Fct5<A0, A1, A2, A3, A4, R, F> &)
915 os <<
"5-ary function";
919 template<
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename R,
typename F>
954 closureT(
const F& _op,
typename curryArgMode<A0>::Type_t _pa0,
typename curryArgMode<A1>::Type_t _pa1,
955 typename curryArgMode<A2>::Type_t _pa2,
typename curryArgMode<A3>::Type_t _pa3,
956 typename curryArgMode<A4>::Type_t _pa4,
typename curryArgMode<A5>::Type_t _pa5)
957 : op(_op), pa0(_pa0), pa1(_pa1), pa2(_pa2), pa3(_pa3), pa4(_pa4), pa5(_pa5)
962 : op(rhs.op), pa0(rhs.pa0), pa1(rhs.pa1), pa2(rhs.pa2), pa3(rhs.pa3), pa4(rhs.pa4), pa5(rhs.pa5)
966 inline R operator()()
const
968 return op(pa0, pa1, pa2, pa3, pa4, pa5);
974 inline closure_t closure(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
975 typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3,
976 typename curryArgMode<A4>::Type_t a4,
typename curryArgMode<A5>::Type_t a5)
const
982 inline R operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
983 typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3,
984 typename curryArgMode<A4>::Type_t a4,
typename curryArgMode<A5>::Type_t a5)
const
986 return f(a0, a1, a2, a3, a4, a5);
997 PartialAppl1(
const F& _f,
typename curryArgMode<A0>::Type_t _pa0)
1003 : f(rhs.f), pa0(rhs.pa0)
1007 inline R operator()(
typename curryArgMode<A1>::Type_t a1,
typename curryArgMode<A2>::Type_t a2,
1008 typename curryArgMode<A3>::Type_t a3,
typename curryArgMode<A4>::Type_t a4,
1009 typename curryArgMode<A5>::Type_t a5)
const
1011 return f(pa0, a1, a2, a3, a4, a5);
1017 inline ffunc1_t operator()(
typename curryArgMode<A0>::Type_t a0)
const
1030 PartialAppl2(
const F& _f,
typename curryArgMode<A0>::Type_t _pa0,
typename curryArgMode<A1>::Type_t _pa1)
1031 : f(_f), pa0(_pa0), pa1(_pa1)
1036 : f(rhs.f), pa0(rhs.pa0), pa1(rhs.pa1)
1040 inline R operator()(
typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3,
1041 typename curryArgMode<A4>::Type_t a4,
typename curryArgMode<A5>::Type_t a5)
const
1043 return f(pa0, pa1, a2, a3, a4, a5);
1049 inline ffunc2_t operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1)
const
1063 PartialAppl3(
const F& _f,
typename curryArgMode<A0>::Type_t _pa0,
typename curryArgMode<A1>::Type_t _pa1,
1064 typename curryArgMode<A2>::Type_t _pa2)
1065 : f(_f), pa0(_pa0), pa1(_pa1), pa2(_pa2)
1070 : f(rhs.f), pa0(rhs.pa0), pa1(rhs.pa1), pa2(rhs.pa2)
1074 inline R operator()(
typename curryArgMode<A3>::Type_t a3,
typename curryArgMode<A4>::Type_t a4,
1075 typename curryArgMode<A5>::Type_t a5)
const
1077 return f(pa0, pa1, pa2, a3, a4, a5);
1083 inline ffunc3_t operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
1084 typename curryArgMode<A2>::Type_t a2)
const
1099 PartialAppl4(
const F& _f,
typename curryArgMode<A0>::Type_t _pa0,
typename curryArgMode<A1>::Type_t _pa1,
1100 typename curryArgMode<A2>::Type_t _pa2,
typename curryArgMode<A3>::Type_t _pa3)
1101 : f(_f), pa0(_pa0), pa1(_pa1), pa2(_pa2), pa3(_pa3)
1106 : f(rhs.f), pa0(rhs.pa0), pa1(rhs.pa1), pa2(rhs.pa2), pa3(rhs.pa3)
1110 inline R operator()(
typename curryArgMode<A4>::Type_t a4,
typename curryArgMode<A5>::Type_t a5)
const
1112 return f(pa0, pa1, pa2, pa3, a4, a5);
1118 inline ffunc4_t operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
1119 typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3)
const
1135 PartialAppl5(
const F& _f,
typename curryArgMode<A0>::Type_t _pa0,
typename curryArgMode<A1>::Type_t _pa1,
1136 typename curryArgMode<A2>::Type_t _pa2,
typename curryArgMode<A3>::Type_t _pa3,
1137 typename curryArgMode<A4>::Type_t _pa4)
1138 : f(_f), pa0(_pa0), pa1(_pa1), pa2(_pa2), pa3(_pa3), pa4(_pa4)
1143 : f(rhs.f), pa0(rhs.pa0), pa1(rhs.pa1), pa2(rhs.pa2), pa3(rhs.pa3), pa4(rhs.pa4)
1147 inline R operator()(
typename curryArgMode<A5>::Type_t a5)
const
1149 return f(pa0, pa1, pa2, pa3, pa4, a5);
1155 inline ffunc5_t operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
1156 typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3,
1157 typename curryArgMode<A4>::Type_t a4)
const
1164 template<
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename R>
1165 inline Fct6<A0, A1, A2, A3, A4, A5, R, R (*)(A0, A1, A2, A3, A4, A5)> curry(R (*f)(A0, A1, A2, A3, A4, A5))
1167 return Fct6<A0, A1, A2, A3, A4, A5, R, R (*)(A0, A1, A2, A3, A4, A5)>(f);
1171 template<
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename R,
typename F>
1172 inline std::ostream& operator<<(std::ostream& os, const Fct6<A0, A1, A2, A3, A4, A5, R, F> &)
1174 os <<
"6-ary function";
1178 template<
typename R>
1194 inline virtual R operator()()
const = 0;
1198 template<
typename R,
typename F>
1219 inline virtual R operator()()
const
1226 template<
typename R>
1233 template<
typename F>
1237 refCount =
new int(1);
1241 : refCount(rhs.refCount), op(rhs.op)
1248 if (--(*refCount) == 0) {
1256 if (rhs.op == op)
return *
this;
1258 if (--(*refCount) == 0) {
1264 refCount = rhs.refCount;
1269 template<
typename F>
1272 if (rhs.op == op)
return *
this;
1274 if (--(*refCount) == 0) {
1280 refCount =
new int(1);
1285 inline R operator()()
const
1292 template<
typename A0,
typename R>
1308 inline virtual R operator()(
typename curryArgMode<A0>::Type_t a0)
const = 0;
1312 template<
typename A0,
typename R,
typename F>
1333 inline virtual R operator()(
typename curryArgMode<A0>::Type_t a0)
const
1340 template<
typename A0,
typename R>
1347 template<
typename F>
1351 refCount =
new int(1);
1355 : refCount(rhs.refCount), op(rhs.op)
1362 if (--(*refCount) == 0) {
1370 if (rhs.op == op)
return *
this;
1372 if (--(*refCount) == 0) {
1378 refCount = rhs.refCount;
1383 template<
typename F>
1386 if (rhs.op == op)
return *
this;
1388 if (--(*refCount) == 0) {
1394 refCount =
new int(1);
1399 inline R operator()(
typename curryArgMode<A0>::Type_t a0)
const
1405 template<
typename A0,
typename A1,
typename R>
1421 inline virtual R operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1)
const = 0;
1425 template<
typename A0,
typename A1,
typename R,
typename F>
1446 inline virtual R operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1)
const
1453 template<
typename A0,
typename A1,
typename R>
1460 template<
typename F>
1464 refCount =
new int(1);
1468 : refCount(rhs.refCount), op(rhs.op)
1475 if (--(*refCount) == 0) {
1483 if (rhs.op == op)
return *
this;
1485 if (--(*refCount) == 0) {
1491 refCount = rhs.refCount;
1496 template<
typename F>
1499 if (rhs.op == op)
return *
this;
1501 if (--(*refCount) == 0) {
1507 refCount =
new int(1);
1512 inline R operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1)
const
1514 return (*op)(a0, a1);
1525 : op(_op), pa0(_pa0)
1530 : op(rhs.op), pa0(rhs.pa0)
1534 inline R operator()(
typename curryArgMode<A1>::Type_t a1)
const
1536 return (*op)(pa0, a1);
1543 inline ffunc1_t operator()(
typename curryArgMode<A0>::Type_t a0)
const
1550 template<
typename A0,
typename A1,
typename A2,
typename R>
1566 inline virtual R operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
1567 typename curryArgMode<A2>::Type_t a2)
const = 0;
1571 template<
typename A0,
typename A1,
typename A2,
typename R,
typename F>
1592 inline virtual R operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
1593 typename curryArgMode<A2>::Type_t a2)
const
1595 return f(a0, a1, a2);
1600 template<
typename A0,
typename A1,
typename A2,
typename R>
1607 template<
typename F>
1611 refCount =
new int(1);
1615 : refCount(rhs.refCount), op(rhs.op)
1622 if (--(*refCount) == 0) {
1630 if (rhs.op == op)
return *
this;
1632 if (--(*refCount) == 0) {
1638 refCount = rhs.refCount;
1643 template<
typename F>
1646 if (rhs.op == op)
return *
this;
1648 if (--(*refCount) == 0) {
1654 refCount =
new int(1);
1659 inline R operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
1660 typename curryArgMode<A2>::Type_t a2)
const
1662 return (*op)(a0, a1, a2);
1674 : op(_op), pa0(_pa0)
1679 : op(rhs.op), pa0(rhs.pa0)
1683 inline R operator()(
typename curryArgMode<A1>::Type_t a1,
typename curryArgMode<A2>::Type_t a2)
const
1685 return (*op)(pa0, a1, a2);
1692 inline ffunc1_t operator()(
typename curryArgMode<A0>::Type_t a0)
const
1707 typename curryArgMode<A1>::Type_t _pa1)
1708 : op(_op), pa0(_pa0), pa1(_pa1)
1713 : op(rhs.op), pa0(rhs.pa0), pa1(rhs.pa1)
1717 inline R operator()(
typename curryArgMode<A2>::Type_t a2)
const
1719 return (*op)(pa0, pa1, a2);
1725 inline ffunc2_t operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1)
const
1732 template<
typename A0,
typename A1,
typename A2,
typename A3,
typename R>
1748 inline virtual R operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
1749 typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3)
const = 0;
1753 template<
typename A0,
typename A1,
typename A2,
typename A3,
typename R,
typename F>
1774 inline virtual R operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
1775 typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3)
const
1777 return f(a0, a1, a2, a3);
1782 template<
typename A0,
typename A1,
typename A2,
typename A3,
typename R>
1789 template<
typename F>
1793 refCount =
new int(1);
1797 : refCount(rhs.refCount), op(rhs.op)
1804 if (--(*refCount) == 0) {
1812 if (rhs.op == op)
return *
this;
1814 if (--(*refCount) == 0) {
1820 refCount = rhs.refCount;
1825 template<
typename F>
1828 if (rhs.op == op)
return *
this;
1830 if (--(*refCount) == 0) {
1836 refCount =
new int(1);
1841 inline R operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
1842 typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3)
const
1844 return (*op)(a0, a1, a2, a3);
1856 : op(_op), pa0(_pa0)
1861 : op(rhs.op), pa0(rhs.pa0)
1865 inline R operator()(
typename curryArgMode<A1>::Type_t a1,
typename curryArgMode<A2>::Type_t a2,
1866 typename curryArgMode<A3>::Type_t a3)
const
1868 return (*op)(pa0, a1, a2, a3);
1875 inline ffunc1_t operator()(
typename curryArgMode<A0>::Type_t a0)
const
1889 typename curryArgMode<A1>::Type_t _pa1)
1890 : op(_op), pa0(_pa0), pa1(_pa1)
1895 : op(rhs.op), pa0(rhs.pa0), pa1(rhs.pa1)
1899 inline R operator()(
typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3)
const
1901 return (*op)(pa0, pa1, a2, a3);
1908 inline ffunc2_t operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1)
const
1924 typename curryArgMode<A1>::Type_t _pa1,
typename curryArgMode<A2>::Type_t _pa2)
1925 : op(_op), pa0(_pa0), pa1(_pa1), pa2(_pa2)
1930 : op(rhs.op), pa0(rhs.pa0), pa1(rhs.pa1), pa2(rhs.pa2)
1934 inline R operator()(
typename curryArgMode<A3>::Type_t a3)
const
1936 return (*op)(pa0, pa1, pa2, a3);
1943 inline ffunc3_t operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
1944 typename curryArgMode<A2>::Type_t a2)
const
1951 template<
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename R>
1967 inline virtual R operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
1968 typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3,
1969 typename curryArgMode<A4>::Type_t a4)
const = 0;
1973 template<
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename R,
typename F>
1995 inline virtual R operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
1996 typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3,
1997 typename curryArgMode<A4>::Type_t a4)
const
1999 return f(a0, a1, a2, a3, a4);
2004 template<
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename R>
2011 template<
typename F>
2015 refCount =
new int(1);
2019 : refCount(rhs.refCount), op(rhs.op)
2026 if (--(*refCount) == 0) {
2031 DFct5<A0, A1, A2, A3, A4, R> operator=(
const DFct5<A0, A1, A2, A3, A4, R>& rhs)
2033 if (rhs.op == op)
return *
this;
2035 if (--(*refCount) == 0) {
2041 refCount = rhs.refCount;
2046 template<
typename F>
2047 DFct5<A0, A1, A2, A3, A4, R> operator=(
const Fct5<A0, A1, A2, A3, A4, R, F>& rhs)
2049 if (rhs.op == op)
return *
this;
2051 if (--(*refCount) == 0) {
2057 refCount =
new int(1);
2062 inline R operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
2063 typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3,
2064 typename curryArgMode<A4>::Type_t a4)
const
2066 return (*op)(a0, a1, a2, a3, a4);
2078 : op(_op), pa0(_pa0)
2083 : op(rhs.op), pa0(rhs.pa0)
2087 inline R operator()(
typename curryArgMode<A1>::Type_t a1,
typename curryArgMode<A2>::Type_t a2,
2088 typename curryArgMode<A3>::Type_t a3,
typename curryArgMode<A4>::Type_t a4)
const
2090 return (*op)(pa0, a1, a2, a3, a4);
2097 inline ffunc1_t operator()(
typename curryArgMode<A0>::Type_t a0)
const
2112 typename curryArgMode<A1>::Type_t _pa1)
2113 : op(_op), pa0(_pa0), pa1(_pa1)
2118 : op(rhs.op), pa0(rhs.pa0), pa1(rhs.pa1)
2122 inline R operator()(
typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3,
2123 typename curryArgMode<A4>::Type_t a4)
const
2125 return (*op)(pa0, pa1, a2, a3, a4);
2132 inline ffunc2_t operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1)
const
2148 typename curryArgMode<A1>::Type_t _pa1,
typename curryArgMode<A2>::Type_t _pa2)
2149 : op(_op), pa0(_pa0), pa1(_pa1), pa2(_pa2)
2154 : op(rhs.op), pa0(rhs.pa0), pa1(rhs.pa1), pa2(rhs.pa2)
2158 inline R operator()(
typename curryArgMode<A3>::Type_t a3,
typename curryArgMode<A4>::Type_t a4)
const
2160 return (*op)(pa0, pa1, pa2, a3, a4);
2167 inline ffunc3_t operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
2168 typename curryArgMode<A2>::Type_t a2)
const
2185 typename curryArgMode<A1>::Type_t _pa1,
typename curryArgMode<A2>::Type_t _pa2,
2186 typename curryArgMode<A3>::Type_t _pa3)
2187 : op(_op), pa0(_pa0), pa1(_pa1), pa2(_pa2), pa3(_pa3)
2192 : op(rhs.op), pa0(rhs.pa0), pa1(rhs.pa1), pa2(rhs.pa2), pa3(rhs.pa3)
2196 inline R operator()(
typename curryArgMode<A4>::Type_t a4)
const
2198 return (*op)(pa0, pa1, pa2, pa3, a4);
2204 inline ffunc4_t operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
2205 typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3)
const
2212 template<
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename R>
2228 inline virtual R operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
2229 typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3,
2230 typename curryArgMode<A4>::Type_t a4,
typename curryArgMode<A5>::Type_t a5)
const = 0;
2234 template<
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename R,
typename F>
2255 inline virtual R operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
2256 typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3,
2257 typename curryArgMode<A4>::Type_t a4,
typename curryArgMode<A5>::Type_t a5)
const
2259 return f(a0, a1, a2, a3, a4, a5);
2264 template<
typename A0,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
typename R>
2271 template<
typename F>
2275 refCount =
new int(1);
2279 : refCount(rhs.refCount), op(rhs.op)
2286 if (--(*refCount) == 0) {
2292 DFct6<A0, A1, A2, A3, A4, A5, R> operator=(
const DFct6<A0, A1, A2, A3, A4, A5, R>& rhs)
2294 if (rhs.op == op)
return *
this;
2296 if (--(*refCount) == 0) {
2302 refCount = rhs.refCount;
2307 template<
typename F>
2308 DFct6<A0, A1, A2, A3, A4, A5, R> operator=(
const Fct6<A0, A1, A2, A3, A4, A5, R, F>& rhs)
2310 if (rhs.op == op)
return *
this;
2312 if (--(*refCount) == 0) {
2318 refCount =
new int(1);
2323 inline R operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
2324 typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3,
2325 typename curryArgMode<A4>::Type_t a4,
typename curryArgMode<A5>::Type_t a5)
const
2327 return (*op)(a0, a1, a2, a3, a4, a5);
2339 : op(_op), pa0(_pa0)
2344 : op(rhs.op), pa0(rhs.pa0)
2348 inline R operator()(
typename curryArgMode<A1>::Type_t a1,
typename curryArgMode<A2>::Type_t a2,
2349 typename curryArgMode<A3>::Type_t a3,
typename curryArgMode<A4>::Type_t a4,
2350 typename curryArgMode<A5>::Type_t a5)
const
2352 return (*op)(pa0, a1, a2, a3, a4, a5);
2359 inline ffunc1_t operator()(
typename curryArgMode<A0>::Type_t a0)
const
2374 typename curryArgMode<A1>::Type_t _pa1)
2375 : op(_op), pa0(_pa0), pa1(_pa1)
2380 : op(rhs.op), pa0(rhs.pa0), pa1(rhs.pa1)
2384 inline R operator()(
typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3,
2385 typename curryArgMode<A4>::Type_t a4,
typename curryArgMode<A5>::Type_t a5)
const
2387 return (*op)(pa0, pa1, a2, a3, a4, a5);
2394 inline ffunc2_t operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1)
const
2410 typename curryArgMode<A1>::Type_t _pa1,
typename curryArgMode<A2>::Type_t _pa2)
2411 : op(_op), pa0(_pa0), pa1(_pa1), pa2(_pa2)
2416 : op(rhs.op), pa0(rhs.pa0), pa1(rhs.pa1), pa2(rhs.pa2)
2420 inline R operator()(
typename curryArgMode<A3>::Type_t a3,
typename curryArgMode<A4>::Type_t a4,
2421 typename curryArgMode<A5>::Type_t a5)
const
2423 return (*op)(pa0, pa1, pa2, a3, a4, a5);
2430 inline ffunc3_t operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
2431 typename curryArgMode<A2>::Type_t a2)
const
2448 typename curryArgMode<A1>::Type_t _pa1,
typename curryArgMode<A2>::Type_t _pa2,
2449 typename curryArgMode<A3>::Type_t _pa3)
2450 : op(_op), pa0(_pa0), pa1(_pa1), pa2(_pa2), pa3(_pa3)
2455 : op(rhs.op), pa0(rhs.pa0), pa1(rhs.pa1), pa2(rhs.pa2), pa3(rhs.pa3)
2459 inline R operator()(
typename curryArgMode<A4>::Type_t a4,
typename curryArgMode<A5>::Type_t a5)
const
2461 return (*op)(pa0, pa1, pa2, pa3, a4, a5);
2468 inline ffunc4_t operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
2469 typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3)
const
2487 typename curryArgMode<A1>::Type_t _pa1,
typename curryArgMode<A2>::Type_t _pa2,
2488 typename curryArgMode<A3>::Type_t _pa3,
typename curryArgMode<A4>::Type_t _pa4)
2489 : op(_op), pa0(_pa0), pa1(_pa1), pa2(_pa2), pa3(_pa3), pa4(_pa4)
2494 : op(rhs.op), pa0(rhs.pa0), pa1(rhs.pa1), pa2(rhs.pa2), pa3(rhs.pa3), pa4(rhs.pa4)
2498 inline R operator()(
typename curryArgMode<A5>::Type_t a5)
const
2500 return (*op)(pa0, pa1, pa2, pa3, pa4, a5);
2506 inline ffunc5_t operator()(
typename curryArgMode<A0>::Type_t a0,
typename curryArgMode<A1>::Type_t a1,
2507 typename curryArgMode<A2>::Type_t a2,
typename curryArgMode<A3>::Type_t a3,
2508 typename curryArgMode<A4>::Type_t a4)
const