17 #ifndef MBED_CALLBACK_H 18 #define MBED_CALLBACK_H 23 #include "platform/mbed_assert.h" 24 #include "platform/mbed_toolchain.h" 53 template <
bool B,
typename R = nil>
61 template <
typename M, M>
63 static const bool value =
true;
67 #define MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, M) \ 68 typename detail::enable_if< \ 69 detail::is_type<M, &F::operator()>::value && \ 70 sizeof(F) <= sizeof(uintptr_t) \ 71 >::type = detail::nil() 99 func._ops->move(
this, &func);
108 template<
typename T,
typename U>
111 generate(method_context<T, R(T::*)()>(obj, method));
118 template<
typename T,
typename U>
121 generate(method_context<
const T, R(T::*)()
const>(obj, method));
128 template<
typename T,
typename U>
129 Callback(
volatile U *obj, R(T::*method)()
volatile)
131 generate(method_context<
volatile T, R(T::*)()
volatile>(obj, method));
138 template<
typename T,
typename U>
139 Callback(
const volatile U *obj, R(T::*method)()
const volatile)
141 generate(method_context<
const volatile T, R(T::*)()
const volatile>(obj, method));
148 template<
typename T,
typename U>
151 generate(function_context<R(*)(T *), T>(func, arg));
158 template<
typename T,
typename U>
161 generate(function_context<R(*)(
const T *),
const T>(func, arg));
168 template<
typename T,
typename U>
171 generate(function_context<R(*)(
volatile T *),
volatile T>(func, arg));
178 template<
typename T,
typename U>
179 Callback(R(*func)(
const volatile T *),
const volatile U *arg)
181 generate(function_context<R(*)(
const volatile T *),
const volatile T>(func, arg));
188 template <
typename F>
189 Callback(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)()))
198 template <
typename F>
199 Callback(
const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)()
const))
208 template <
typename F>
209 Callback(
volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)()
volatile))
218 template <
typename F>
219 Callback(
const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)()
const volatile))
230 template<
typename T,
typename U>
232 "Arguments to callback have been reordered to Callback(func, arg)")
244 template<
typename T,
typename U>
246 "Arguments to callback have been reordered to Callback(func, arg)")
258 template<
typename T,
typename U>
260 "Arguments to callback have been reordered to Callback(func, arg)")
272 template<
typename T,
typename U>
274 "Arguments to callback have been reordered to Callback(func, arg)")
275 Callback(const volatile U *obj, R(*func)(const volatile T *))
295 "Replaced by simple assignment 'Callback cb = func")
296 void attach(R(*func)())
308 "Replaced by simple assignment 'Callback cb = func")
321 template<
typename T,
typename U>
323 "Replaced by simple assignment 'Callback cb = func")
324 void attach(U *obj, R(T::*method)())
336 template<
typename T,
typename U>
338 "Replaced by simple assignment 'Callback cb = func")
339 void attach(const U *obj, R(T::*method)() const)
351 template<
typename T,
typename U>
353 "Replaced by simple assignment 'Callback cb = func")
354 void attach(volatile U *obj, R(T::*method)() volatile)
366 template<
typename T,
typename U>
368 "Replaced by simple assignment 'Callback cb = func")
369 void attach(const volatile U *obj, R(T::*method)() const volatile)
381 template <
typename T,
typename U>
383 "Replaced by simple assignment 'Callback cb = func")
384 void attach(R(*func)(T *), U *arg)
396 template <
typename T,
typename U>
398 "Replaced by simple assignment 'Callback cb = func")
399 void attach(R(*func)(const T *), const U *arg)
411 template <
typename T,
typename U>
413 "Replaced by simple assignment 'Callback cb = func")
414 void attach(R(*func)(volatile T *), volatile U *arg)
426 template <
typename T,
typename U>
428 "Replaced by simple assignment 'Callback cb = func")
429 void attach(R(*func)(const volatile T *), const volatile U *arg)
441 template <
typename F>
443 "Replaced by simple assignment 'Callback cb = func")
444 void attach(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)()))
456 template <
typename F>
458 "Replaced by simple assignment 'Callback cb = func")
459 void attach(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)() const))
471 template <
typename F>
473 "Replaced by simple assignment 'Callback cb = func")
474 void attach(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)() volatile))
486 template <
typename F>
488 "Replaced by simple assignment 'Callback cb = func")
489 void attach(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)() const volatile))
501 template <
typename T,
typename U>
503 "Arguments to callback have been reordered to attach(func, arg)")
504 void attach(U *obj, R(*func)(T *))
516 template <
typename T,
typename U>
518 "Arguments to callback have been reordered to attach(func, arg)")
519 void attach(const U *obj, R(*func)(const T *))
531 template <
typename T,
typename U>
533 "Arguments to callback have been reordered to attach(func, arg)")
534 void attach(volatile U *obj, R(*func)(volatile T *))
546 template <
typename T,
typename U>
548 "Arguments to callback have been reordered to attach(func, arg)")
549 void attach(const volatile U *obj, R(*func)(const volatile T *))
572 return _ops->call(
this);
584 operator bool()
const 593 return memcmp(&l, &r,
sizeof(
Callback)) == 0;
610 return static_cast<Callback *
>(func)->call();
619 void (*_staticfunc)();
620 void (*_boundfunc)(_class *);
621 void (_class::*_methodfunc)();
627 R(*call)(
const void *);
628 void (*move)(
void *,
const void *);
629 void (*dtor)(
void *);
633 template <
typename F>
634 void generate(
const F &f)
636 static const ops ops = {
637 &Callback::function_call<F>,
638 &Callback::function_move<F>,
639 &Callback::function_dtor<F>,
643 "Type F must not exceed the size of the Callback class");
650 template <
typename F>
651 static R function_call(
const void *p)
656 template <
typename F>
657 static void function_move(
void *d,
const void *p)
662 template <
typename F>
663 static void function_dtor(
void *p)
669 template <
typename O,
typename M>
670 struct method_context {
674 method_context(O *obj, M method)
675 : method(method), obj(obj) {}
679 return (obj->*method)();
683 template <
typename F,
typename A>
684 struct function_context {
688 function_context(F func, A *arg)
689 : func(func), arg(arg) {}
702 template <
typename R,
typename A0>
724 func._ops->move(
this, &func);
733 template<
typename T,
typename U>
736 generate(method_context<T, R(T::*)(A0)>(obj, method));
743 template<
typename T,
typename U>
746 generate(method_context<
const T, R(T::*)(A0)
const>(obj, method));
753 template<
typename T,
typename U>
754 Callback(
volatile U *obj, R(T::*method)(A0)
volatile)
756 generate(method_context<
volatile T, R(T::*)(A0)
volatile>(obj, method));
763 template<
typename T,
typename U>
764 Callback(
const volatile U *obj, R(T::*method)(A0)
const volatile)
766 generate(method_context<
const volatile T, R(T::*)(A0)
const volatile>(obj, method));
773 template<
typename T,
typename U>
776 generate(function_context<R(*)(T *, A0), T>(func, arg));
783 template<
typename T,
typename U>
786 generate(function_context<R(*)(
const T *, A0),
const T>(func, arg));
793 template<
typename T,
typename U>
794 Callback(R(*func)(
volatile T *, A0),
volatile U *arg)
796 generate(function_context<R(*)(
volatile T *, A0),
volatile T>(func, arg));
803 template<
typename T,
typename U>
804 Callback(R(*func)(
const volatile T *, A0),
const volatile U *arg)
806 generate(function_context<R(*)(
const volatile T *, A0),
const volatile T>(func, arg));
813 template <
typename F>
814 Callback(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0)))
823 template <
typename F>
824 Callback(
const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0)
const))
833 template <
typename F>
834 Callback(
volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0)
volatile))
843 template <
typename F>
844 Callback(
const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0)
const volatile))
855 template<
typename T,
typename U>
857 "Arguments to callback have been reordered to Callback(func, arg)")
869 template<
typename T,
typename U>
871 "Arguments to callback have been reordered to Callback(func, arg)")
883 template<
typename T,
typename U>
885 "Arguments to callback have been reordered to Callback(func, arg)")
886 Callback(volatile U *obj, R(*func)(volatile T *, A0))
897 template<
typename T,
typename U>
899 "Arguments to callback have been reordered to Callback(func, arg)")
900 Callback(const volatile U *obj, R(*func)(const volatile T *, A0))
920 "Replaced by simple assignment 'Callback cb = func")
921 void attach(R(*func)(A0))
933 "Replaced by simple assignment 'Callback cb = func")
946 template<
typename T,
typename U>
948 "Replaced by simple assignment 'Callback cb = func")
949 void attach(U *obj, R(T::*method)(A0))
961 template<
typename T,
typename U>
963 "Replaced by simple assignment 'Callback cb = func")
964 void attach(const U *obj, R(T::*method)(A0) const)
976 template<
typename T,
typename U>
978 "Replaced by simple assignment 'Callback cb = func")
979 void attach(volatile U *obj, R(T::*method)(A0) volatile)
991 template<
typename T,
typename U>
993 "Replaced by simple assignment 'Callback cb = func")
994 void attach(const volatile U *obj, R(T::*method)(A0) const volatile)
1006 template <
typename T,
typename U>
1008 "Replaced by simple assignment 'Callback cb = func")
1009 void attach(R(*func)(T *, A0), U *arg)
1021 template <
typename T,
typename U>
1023 "Replaced by simple assignment 'Callback cb = func")
1024 void attach(R(*func)(const T *, A0), const U *arg)
1036 template <
typename T,
typename U>
1038 "Replaced by simple assignment 'Callback cb = func")
1039 void attach(R(*func)(volatile T *, A0), volatile U *arg)
1051 template <
typename T,
typename U>
1053 "Replaced by simple assignment 'Callback cb = func")
1054 void attach(R(*func)(const volatile T *, A0), const volatile U *arg)
1066 template <
typename F>
1068 "Replaced by simple assignment 'Callback cb = func")
1069 void attach(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0)))
1081 template <
typename F>
1083 "Replaced by simple assignment 'Callback cb = func")
1084 void attach(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0) const))
1096 template <
typename F>
1098 "Replaced by simple assignment 'Callback cb = func")
1099 void attach(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0) volatile))
1111 template <
typename F>
1113 "Replaced by simple assignment 'Callback cb = func")
1114 void attach(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0) const volatile))
1126 template <
typename T,
typename U>
1128 "Arguments to callback have been reordered to attach(func, arg)")
1129 void attach(U *obj, R(*func)(T *, A0))
1141 template <
typename T,
typename U>
1143 "Arguments to callback have been reordered to attach(func, arg)")
1144 void attach(const U *obj, R(*func)(const T *, A0))
1156 template <
typename T,
typename U>
1158 "Arguments to callback have been reordered to attach(func, arg)")
1159 void attach(volatile U *obj, R(*func)(volatile T *, A0))
1171 template <
typename T,
typename U>
1173 "Arguments to callback have been reordered to attach(func, arg)")
1174 void attach(const volatile U *obj, R(*func)(const volatile T *, A0))
1184 if (
this != &that) {
1197 return _ops->call(
this, a0);
1209 operator bool()
const 1218 return memcmp(&l, &r,
sizeof(
Callback)) == 0;
1236 return static_cast<Callback *
>(func)->call(a0);
1245 void (*_staticfunc)(A0);
1246 void (*_boundfunc)(_class *, A0);
1247 void (_class::*_methodfunc)(A0);
1253 R(*call)(
const void *, A0);
1254 void (*move)(
void *,
const void *);
1255 void (*dtor)(
void *);
1259 template <
typename F>
1260 void generate(
const F &f)
1262 static const ops ops = {
1263 &Callback::function_call<F>,
1264 &Callback::function_move<F>,
1265 &Callback::function_dtor<F>,
1269 "Type F must not exceed the size of the Callback class");
1276 template <
typename F>
1277 static R function_call(
const void *p, A0 a0)
1279 return (*(F *)p)(a0);
1282 template <
typename F>
1283 static void function_move(
void *d,
const void *p)
1288 template <
typename F>
1289 static void function_dtor(
void *p)
1295 template <
typename O,
typename M>
1296 struct method_context {
1300 method_context(O *obj, M method)
1301 : method(method), obj(obj) {}
1303 R operator()(A0 a0)
const 1305 return (obj->*method)(a0);
1309 template <
typename F,
typename A>
1310 struct function_context {
1314 function_context(F func, A *arg)
1315 : func(func), arg(arg) {}
1317 R operator()(A0 a0)
const 1319 return func(arg, a0);
1328 template <
typename R,
typename A0,
typename A1>
1350 func._ops->move(
this, &func);
1359 template<
typename T,
typename U>
1362 generate(method_context<T, R(T::*)(A0, A1)>(obj, method));
1369 template<
typename T,
typename U>
1372 generate(method_context<
const T, R(T::*)(A0, A1)
const>(obj, method));
1379 template<
typename T,
typename U>
1380 Callback(
volatile U *obj, R(T::*method)(A0, A1)
volatile)
1382 generate(method_context<
volatile T, R(T::*)(A0, A1)
volatile>(obj, method));
1389 template<
typename T,
typename U>
1390 Callback(
const volatile U *obj, R(T::*method)(A0, A1)
const volatile)
1392 generate(method_context<
const volatile T, R(T::*)(A0, A1)
const volatile>(obj, method));
1399 template<
typename T,
typename U>
1402 generate(function_context<R(*)(T *, A0, A1), T>(func, arg));
1409 template<
typename T,
typename U>
1412 generate(function_context<R(*)(
const T *, A0, A1),
const T>(func, arg));
1419 template<
typename T,
typename U>
1420 Callback(R(*func)(
volatile T *, A0, A1),
volatile U *arg)
1422 generate(function_context<R(*)(
volatile T *, A0, A1),
volatile T>(func, arg));
1429 template<
typename T,
typename U>
1430 Callback(R(*func)(
const volatile T *, A0, A1),
const volatile U *arg)
1432 generate(function_context<R(*)(
const volatile T *, A0, A1),
const volatile T>(func, arg));
1439 template <
typename F>
1440 Callback(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1)))
1449 template <
typename F>
1450 Callback(
const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1)
const))
1459 template <
typename F>
1460 Callback(
volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1)
volatile))
1469 template <
typename F>
1470 Callback(
const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1)
const volatile))
1481 template<
typename T,
typename U>
1483 "Arguments to callback have been reordered to Callback(func, arg)")
1495 template<
typename T,
typename U>
1497 "Arguments to callback have been reordered to Callback(func, arg)")
1509 template<
typename T,
typename U>
1511 "Arguments to callback have been reordered to Callback(func, arg)")
1512 Callback(volatile U *obj, R(*func)(volatile T *, A0, A1))
1523 template<
typename T,
typename U>
1525 "Arguments to callback have been reordered to Callback(func, arg)")
1526 Callback(const volatile U *obj, R(*func)(const volatile T *, A0, A1))
1546 "Replaced by simple assignment 'Callback cb = func")
1547 void attach(R(*func)(A0, A1))
1559 "Replaced by simple assignment 'Callback cb = func")
1572 template<
typename T,
typename U>
1574 "Replaced by simple assignment 'Callback cb = func")
1575 void attach(U *obj, R(T::*method)(A0, A1))
1587 template<
typename T,
typename U>
1589 "Replaced by simple assignment 'Callback cb = func")
1590 void attach(const U *obj, R(T::*method)(A0, A1) const)
1602 template<
typename T,
typename U>
1604 "Replaced by simple assignment 'Callback cb = func")
1605 void attach(volatile U *obj, R(T::*method)(A0, A1) volatile)
1617 template<
typename T,
typename U>
1619 "Replaced by simple assignment 'Callback cb = func")
1620 void attach(const volatile U *obj, R(T::*method)(A0, A1) const volatile)
1632 template <
typename T,
typename U>
1634 "Replaced by simple assignment 'Callback cb = func")
1635 void attach(R(*func)(T *, A0, A1), U *arg)
1647 template <
typename T,
typename U>
1649 "Replaced by simple assignment 'Callback cb = func")
1650 void attach(R(*func)(const T *, A0, A1), const U *arg)
1662 template <
typename T,
typename U>
1664 "Replaced by simple assignment 'Callback cb = func")
1665 void attach(R(*func)(volatile T *, A0, A1), volatile U *arg)
1677 template <
typename T,
typename U>
1679 "Replaced by simple assignment 'Callback cb = func")
1680 void attach(R(*func)(const volatile T *, A0, A1), const volatile U *arg)
1692 template <
typename F>
1694 "Replaced by simple assignment 'Callback cb = func")
1695 void attach(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1)))
1707 template <
typename F>
1709 "Replaced by simple assignment 'Callback cb = func")
1710 void attach(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1) const))
1722 template <
typename F>
1724 "Replaced by simple assignment 'Callback cb = func")
1725 void attach(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1) volatile))
1737 template <
typename F>
1739 "Replaced by simple assignment 'Callback cb = func")
1740 void attach(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1) const volatile))
1752 template <
typename T,
typename U>
1754 "Arguments to callback have been reordered to attach(func, arg)")
1755 void attach(U *obj, R(*func)(T *, A0, A1))
1767 template <
typename T,
typename U>
1769 "Arguments to callback have been reordered to attach(func, arg)")
1770 void attach(const U *obj, R(*func)(const T *, A0, A1))
1782 template <
typename T,
typename U>
1784 "Arguments to callback have been reordered to attach(func, arg)")
1785 void attach(volatile U *obj, R(*func)(volatile T *, A0, A1))
1797 template <
typename T,
typename U>
1799 "Arguments to callback have been reordered to attach(func, arg)")
1800 void attach(const volatile U *obj, R(*func)(const volatile T *, A0, A1))
1810 if (
this != &that) {
1823 return _ops->call(
this, a0, a1);
1830 return call(a0, a1);
1835 operator bool()
const 1844 return memcmp(&l, &r,
sizeof(
Callback)) == 0;
1861 static R
thunk(
void *func, A0 a0, A1 a1)
1863 return static_cast<Callback *
>(func)->call(a0, a1);
1872 void (*_staticfunc)(A0, A1);
1873 void (*_boundfunc)(_class *, A0, A1);
1874 void (_class::*_methodfunc)(A0, A1);
1880 R(*call)(
const void *, A0, A1);
1881 void (*move)(
void *,
const void *);
1882 void (*dtor)(
void *);
1886 template <
typename F>
1887 void generate(
const F &f)
1889 static const ops ops = {
1890 &Callback::function_call<F>,
1891 &Callback::function_move<F>,
1892 &Callback::function_dtor<F>,
1896 "Type F must not exceed the size of the Callback class");
1903 template <
typename F>
1904 static R function_call(
const void *p, A0 a0, A1 a1)
1906 return (*(F *)p)(a0, a1);
1909 template <
typename F>
1910 static void function_move(
void *d,
const void *p)
1915 template <
typename F>
1916 static void function_dtor(
void *p)
1922 template <
typename O,
typename M>
1923 struct method_context {
1927 method_context(O *obj, M method)
1928 : method(method), obj(obj) {}
1930 R operator()(A0 a0, A1 a1)
const 1932 return (obj->*method)(a0, a1);
1936 template <
typename F,
typename A>
1937 struct function_context {
1941 function_context(F func, A *arg)
1942 : func(func), arg(arg) {}
1944 R operator()(A0 a0, A1 a1)
const 1946 return func(arg, a0, a1);
1955 template <
typename R,
typename A0,
typename A1,
typename A2>
1977 func._ops->move(
this, &func);
1986 template<
typename T,
typename U>
1989 generate(method_context<T, R(T::*)(A0, A1, A2)>(obj, method));
1996 template<
typename T,
typename U>
1997 Callback(
const U *obj, R(T::*method)(A0, A1, A2)
const)
1999 generate(method_context<
const T, R(T::*)(A0, A1, A2)
const>(obj, method));
2006 template<
typename T,
typename U>
2007 Callback(
volatile U *obj, R(T::*method)(A0, A1, A2)
volatile)
2009 generate(method_context<
volatile T, R(T::*)(A0, A1, A2)
volatile>(obj, method));
2016 template<
typename T,
typename U>
2017 Callback(
const volatile U *obj, R(T::*method)(A0, A1, A2)
const volatile)
2019 generate(method_context<
const volatile T, R(T::*)(A0, A1, A2)
const volatile>(obj, method));
2026 template<
typename T,
typename U>
2029 generate(function_context<R(*)(T *, A0, A1, A2), T>(func, arg));
2036 template<
typename T,
typename U>
2037 Callback(R(*func)(
const T *, A0, A1, A2),
const U *arg)
2039 generate(function_context<R(*)(
const T *, A0, A1, A2),
const T>(func, arg));
2046 template<
typename T,
typename U>
2047 Callback(R(*func)(
volatile T *, A0, A1, A2),
volatile U *arg)
2049 generate(function_context<R(*)(
volatile T *, A0, A1, A2),
volatile T>(func, arg));
2056 template<
typename T,
typename U>
2057 Callback(R(*func)(
const volatile T *, A0, A1, A2),
const volatile U *arg)
2059 generate(function_context<R(*)(
const volatile T *, A0, A1, A2),
const volatile T>(func, arg));
2066 template <
typename F>
2067 Callback(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2)))
2076 template <
typename F>
2077 Callback(
const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2)
const))
2086 template <
typename F>
2087 Callback(
volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2)
volatile))
2096 template <
typename F>
2097 Callback(
const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2)
const volatile))
2108 template<
typename T,
typename U>
2110 "Arguments to callback have been reordered to Callback(func, arg)")
2122 template<
typename T,
typename U>
2124 "Arguments to callback have been reordered to Callback(func, arg)")
2125 Callback(const U *obj, R(*func)(const T *, A0, A1, A2))
2136 template<
typename T,
typename U>
2138 "Arguments to callback have been reordered to Callback(func, arg)")
2139 Callback(volatile U *obj, R(*func)(volatile T *, A0, A1, A2))
2150 template<
typename T,
typename U>
2152 "Arguments to callback have been reordered to Callback(func, arg)")
2153 Callback(const volatile U *obj, R(*func)(const volatile T *, A0, A1, A2))
2173 "Replaced by simple assignment 'Callback cb = func")
2174 void attach(R(*func)(A0, A1, A2))
2186 "Replaced by simple assignment 'Callback cb = func")
2199 template<
typename T,
typename U>
2201 "Replaced by simple assignment 'Callback cb = func")
2202 void attach(U *obj, R(T::*method)(A0, A1, A2))
2214 template<
typename T,
typename U>
2216 "Replaced by simple assignment 'Callback cb = func")
2217 void attach(const U *obj, R(T::*method)(A0, A1, A2) const)
2229 template<
typename T,
typename U>
2231 "Replaced by simple assignment 'Callback cb = func")
2232 void attach(volatile U *obj, R(T::*method)(A0, A1, A2) volatile)
2244 template<
typename T,
typename U>
2246 "Replaced by simple assignment 'Callback cb = func")
2247 void attach(const volatile U *obj, R(T::*method)(A0, A1, A2) const volatile)
2259 template <
typename T,
typename U>
2261 "Replaced by simple assignment 'Callback cb = func")
2262 void attach(R(*func)(T *, A0, A1, A2), U *arg)
2274 template <
typename T,
typename U>
2276 "Replaced by simple assignment 'Callback cb = func")
2277 void attach(R(*func)(const T *, A0, A1, A2), const U *arg)
2289 template <
typename T,
typename U>
2291 "Replaced by simple assignment 'Callback cb = func")
2292 void attach(R(*func)(volatile T *, A0, A1, A2), volatile U *arg)
2304 template <
typename T,
typename U>
2306 "Replaced by simple assignment 'Callback cb = func")
2307 void attach(R(*func)(const volatile T *, A0, A1, A2), const volatile U *arg)
2319 template <
typename F>
2321 "Replaced by simple assignment 'Callback cb = func")
2322 void attach(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2)))
2334 template <
typename F>
2336 "Replaced by simple assignment 'Callback cb = func")
2337 void attach(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2) const))
2349 template <
typename F>
2351 "Replaced by simple assignment 'Callback cb = func")
2352 void attach(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2) volatile))
2364 template <
typename F>
2366 "Replaced by simple assignment 'Callback cb = func")
2367 void attach(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2) const volatile))
2379 template <
typename T,
typename U>
2381 "Arguments to callback have been reordered to attach(func, arg)")
2382 void attach(U *obj, R(*func)(T *, A0, A1, A2))
2394 template <
typename T,
typename U>
2396 "Arguments to callback have been reordered to attach(func, arg)")
2397 void attach(const U *obj, R(*func)(const T *, A0, A1, A2))
2409 template <
typename T,
typename U>
2411 "Arguments to callback have been reordered to attach(func, arg)")
2412 void attach(volatile U *obj, R(*func)(volatile T *, A0, A1, A2))
2424 template <
typename T,
typename U>
2426 "Arguments to callback have been reordered to attach(func, arg)")
2427 void attach(const volatile U *obj, R(*func)(const volatile T *, A0, A1, A2))
2437 if (
this != &that) {
2450 return _ops->call(
this, a0, a1, a2);
2457 return call(a0, a1, a2);
2462 operator bool()
const 2471 return memcmp(&l, &r,
sizeof(
Callback)) == 0;
2489 static R
thunk(
void *func, A0 a0, A1 a1, A2 a2)
2491 return static_cast<Callback *
>(func)->call(a0, a1, a2);
2500 void (*_staticfunc)(A0, A1, A2);
2501 void (*_boundfunc)(_class *, A0, A1, A2);
2502 void (_class::*_methodfunc)(A0, A1, A2);
2508 R(*call)(
const void *, A0, A1, A2);
2509 void (*move)(
void *,
const void *);
2510 void (*dtor)(
void *);
2514 template <
typename F>
2515 void generate(
const F &f)
2517 static const ops ops = {
2518 &Callback::function_call<F>,
2519 &Callback::function_move<F>,
2520 &Callback::function_dtor<F>,
2524 "Type F must not exceed the size of the Callback class");
2531 template <
typename F>
2532 static R function_call(
const void *p, A0 a0, A1 a1, A2 a2)
2534 return (*(F *)p)(a0, a1, a2);
2537 template <
typename F>
2538 static void function_move(
void *d,
const void *p)
2543 template <
typename F>
2544 static void function_dtor(
void *p)
2550 template <
typename O,
typename M>
2551 struct method_context {
2555 method_context(O *obj, M method)
2556 : method(method), obj(obj) {}
2558 R operator()(A0 a0, A1 a1, A2 a2)
const 2560 return (obj->*method)(a0, a1, a2);
2564 template <
typename F,
typename A>
2565 struct function_context {
2569 function_context(F func, A *arg)
2570 : func(func), arg(arg) {}
2572 R operator()(A0 a0, A1 a1, A2 a2)
const 2574 return func(arg, a0, a1, a2);
2583 template <
typename R,
typename A0,
typename A1,
typename A2,
typename A3>
2605 func._ops->move(
this, &func);
2614 template<
typename T,
typename U>
2617 generate(method_context<T, R(T::*)(A0, A1, A2, A3)>(obj, method));
2624 template<
typename T,
typename U>
2625 Callback(
const U *obj, R(T::*method)(A0, A1, A2, A3)
const)
2627 generate(method_context<
const T, R(T::*)(A0, A1, A2, A3)
const>(obj, method));
2634 template<
typename T,
typename U>
2635 Callback(
volatile U *obj, R(T::*method)(A0, A1, A2, A3)
volatile)
2637 generate(method_context<
volatile T, R(T::*)(A0, A1, A2, A3)
volatile>(obj, method));
2644 template<
typename T,
typename U>
2645 Callback(
const volatile U *obj, R(T::*method)(A0, A1, A2, A3)
const volatile)
2647 generate(method_context<
const volatile T, R(T::*)(A0, A1, A2, A3)
const volatile>(obj, method));
2654 template<
typename T,
typename U>
2657 generate(function_context<R(*)(T *, A0, A1, A2, A3), T>(func, arg));
2664 template<
typename T,
typename U>
2665 Callback(R(*func)(
const T *, A0, A1, A2, A3),
const U *arg)
2667 generate(function_context<R(*)(
const T *, A0, A1, A2, A3),
const T>(func, arg));
2674 template<
typename T,
typename U>
2675 Callback(R(*func)(
volatile T *, A0, A1, A2, A3),
volatile U *arg)
2677 generate(function_context<R(*)(
volatile T *, A0, A1, A2, A3),
volatile T>(func, arg));
2684 template<
typename T,
typename U>
2685 Callback(R(*func)(
const volatile T *, A0, A1, A2, A3),
const volatile U *arg)
2687 generate(function_context<R(*)(
const volatile T *, A0, A1, A2, A3),
const volatile T>(func, arg));
2694 template <
typename F>
2695 Callback(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2, A3)))
2704 template <
typename F>
2705 Callback(
const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2, A3)
const))
2714 template <
typename F>
2715 Callback(
volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2, A3)
volatile))
2724 template <
typename F>
2725 Callback(
const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2, A3)
const volatile))
2736 template<
typename T,
typename U>
2738 "Arguments to callback have been reordered to Callback(func, arg)")
2750 template<
typename T,
typename U>
2752 "Arguments to callback have been reordered to Callback(func, arg)")
2753 Callback(const U *obj, R(*func)(const T *, A0, A1, A2, A3))
2764 template<
typename T,
typename U>
2766 "Arguments to callback have been reordered to Callback(func, arg)")
2767 Callback(volatile U *obj, R(*func)(volatile T *, A0, A1, A2, A3))
2778 template<
typename T,
typename U>
2780 "Arguments to callback have been reordered to Callback(func, arg)")
2781 Callback(const volatile U *obj, R(*func)(const volatile T *, A0, A1, A2, A3))
2801 "Replaced by simple assignment 'Callback cb = func")
2802 void attach(R(*func)(A0, A1, A2, A3))
2814 "Replaced by simple assignment 'Callback cb = func")
2827 template<
typename T,
typename U>
2829 "Replaced by simple assignment 'Callback cb = func")
2830 void attach(U *obj, R(T::*method)(A0, A1, A2, A3))
2842 template<
typename T,
typename U>
2844 "Replaced by simple assignment 'Callback cb = func")
2845 void attach(const U *obj, R(T::*method)(A0, A1, A2, A3) const)
2857 template<
typename T,
typename U>
2859 "Replaced by simple assignment 'Callback cb = func")
2860 void attach(volatile U *obj, R(T::*method)(A0, A1, A2, A3) volatile)
2872 template<
typename T,
typename U>
2874 "Replaced by simple assignment 'Callback cb = func")
2875 void attach(const volatile U *obj, R(T::*method)(A0, A1, A2, A3) const volatile)
2887 template <
typename T,
typename U>
2889 "Replaced by simple assignment 'Callback cb = func")
2890 void attach(R(*func)(T *, A0, A1, A2, A3), U *arg)
2902 template <
typename T,
typename U>
2904 "Replaced by simple assignment 'Callback cb = func")
2905 void attach(R(*func)(const T *, A0, A1, A2, A3), const U *arg)
2917 template <
typename T,
typename U>
2919 "Replaced by simple assignment 'Callback cb = func")
2920 void attach(R(*func)(volatile T *, A0, A1, A2, A3), volatile U *arg)
2932 template <
typename T,
typename U>
2934 "Replaced by simple assignment 'Callback cb = func")
2935 void attach(R(*func)(const volatile T *, A0, A1, A2, A3), const volatile U *arg)
2947 template <
typename F>
2949 "Replaced by simple assignment 'Callback cb = func")
2950 void attach(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2, A3)))
2962 template <
typename F>
2964 "Replaced by simple assignment 'Callback cb = func")
2965 void attach(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2, A3) const))
2977 template <
typename F>
2979 "Replaced by simple assignment 'Callback cb = func")
2980 void attach(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2, A3) volatile))
2992 template <
typename F>
2994 "Replaced by simple assignment 'Callback cb = func")
2995 void attach(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2, A3) const volatile))
3007 template <
typename T,
typename U>
3009 "Arguments to callback have been reordered to attach(func, arg)")
3010 void attach(U *obj, R(*func)(T *, A0, A1, A2, A3))
3022 template <
typename T,
typename U>
3024 "Arguments to callback have been reordered to attach(func, arg)")
3025 void attach(const U *obj, R(*func)(const T *, A0, A1, A2, A3))
3037 template <
typename T,
typename U>
3039 "Arguments to callback have been reordered to attach(func, arg)")
3040 void attach(volatile U *obj, R(*func)(volatile T *, A0, A1, A2, A3))
3052 template <
typename T,
typename U>
3054 "Arguments to callback have been reordered to attach(func, arg)")
3055 void attach(const volatile U *obj, R(*func)(const volatile T *, A0, A1, A2, A3))
3065 if (
this != &that) {
3075 R
call(A0 a0, A1 a1, A2 a2, A3 a3)
const 3078 return _ops->call(
this, a0, a1, a2, a3);
3085 return call(a0, a1, a2, a3);
3090 operator bool()
const 3099 return memcmp(&l, &r,
sizeof(
Callback)) == 0;
3118 static R
thunk(
void *func, A0 a0, A1 a1, A2 a2, A3 a3)
3120 return static_cast<Callback *
>(func)->call(a0, a1, a2, a3);
3129 void (*_staticfunc)(A0, A1, A2, A3);
3130 void (*_boundfunc)(_class *, A0, A1, A2, A3);
3131 void (_class::*_methodfunc)(A0, A1, A2, A3);
3137 R(*call)(
const void *, A0, A1, A2, A3);
3138 void (*move)(
void *,
const void *);
3139 void (*dtor)(
void *);
3143 template <
typename F>
3144 void generate(
const F &f)
3146 static const ops ops = {
3147 &Callback::function_call<F>,
3148 &Callback::function_move<F>,
3149 &Callback::function_dtor<F>,
3153 "Type F must not exceed the size of the Callback class");
3160 template <
typename F>
3161 static R function_call(
const void *p, A0 a0, A1 a1, A2 a2, A3 a3)
3163 return (*(F *)p)(a0, a1, a2, a3);
3166 template <
typename F>
3167 static void function_move(
void *d,
const void *p)
3172 template <
typename F>
3173 static void function_dtor(
void *p)
3179 template <
typename O,
typename M>
3180 struct method_context {
3184 method_context(O *obj, M method)
3185 : method(method), obj(obj) {}
3187 R operator()(A0 a0, A1 a1, A2 a2, A3 a3)
const 3189 return (obj->*method)(a0, a1, a2, a3);
3193 template <
typename F,
typename A>
3194 struct function_context {
3198 function_context(F func, A *arg)
3199 : func(func), arg(arg) {}
3201 R operator()(A0 a0, A1 a1, A2 a2, A3 a3)
const 3203 return func(arg, a0, a1, a2, a3);
3212 template <
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
3234 func._ops->move(
this, &func);
3243 template<
typename T,
typename U>
3246 generate(method_context<T, R(T::*)(A0, A1, A2, A3, A4)>(obj, method));
3253 template<
typename T,
typename U>
3254 Callback(
const U *obj, R(T::*method)(A0, A1, A2, A3, A4)
const)
3256 generate(method_context<
const T, R(T::*)(A0, A1, A2, A3, A4)
const>(obj, method));
3263 template<
typename T,
typename U>
3264 Callback(
volatile U *obj, R(T::*method)(A0, A1, A2, A3, A4)
volatile)
3266 generate(method_context<
volatile T, R(T::*)(A0, A1, A2, A3, A4)
volatile>(obj, method));
3273 template<
typename T,
typename U>
3274 Callback(
const volatile U *obj, R(T::*method)(A0, A1, A2, A3, A4)
const volatile)
3276 generate(method_context<
const volatile T, R(T::*)(A0, A1, A2, A3, A4)
const volatile>(obj, method));
3283 template<
typename T,
typename U>
3286 generate(function_context<R(*)(T *, A0, A1, A2, A3, A4), T>(func, arg));
3293 template<
typename T,
typename U>
3294 Callback(R(*func)(
const T *, A0, A1, A2, A3, A4),
const U *arg)
3296 generate(function_context<R(*)(
const T *, A0, A1, A2, A3, A4),
const T>(func, arg));
3303 template<
typename T,
typename U>
3304 Callback(R(*func)(
volatile T *, A0, A1, A2, A3, A4),
volatile U *arg)
3306 generate(function_context<R(*)(
volatile T *, A0, A1, A2, A3, A4),
volatile T>(func, arg));
3313 template<
typename T,
typename U>
3314 Callback(R(*func)(
const volatile T *, A0, A1, A2, A3, A4),
const volatile U *arg)
3316 generate(function_context<R(*)(
const volatile T *, A0, A1, A2, A3, A4),
const volatile T>(func, arg));
3323 template <
typename F>
3324 Callback(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2, A3, A4)))
3333 template <
typename F>
3334 Callback(
const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2, A3, A4)
const))
3343 template <
typename F>
3344 Callback(
volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2, A3, A4)
volatile))
3353 template <
typename F>
3354 Callback(
const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2, A3, A4)
const volatile))
3365 template<
typename T,
typename U>
3367 "Arguments to callback have been reordered to Callback(func, arg)")
3379 template<
typename T,
typename U>
3381 "Arguments to callback have been reordered to Callback(func, arg)")
3382 Callback(const U *obj, R(*func)(const T *, A0, A1, A2, A3, A4))
3393 template<
typename T,
typename U>
3395 "Arguments to callback have been reordered to Callback(func, arg)")
3396 Callback(volatile U *obj, R(*func)(volatile T *, A0, A1, A2, A3, A4))
3407 template<
typename T,
typename U>
3409 "Arguments to callback have been reordered to Callback(func, arg)")
3410 Callback(const volatile U *obj, R(*func)(const volatile T *, A0, A1, A2, A3, A4))
3430 "Replaced by simple assignment 'Callback cb = func")
3431 void attach(R(*func)(A0, A1, A2, A3, A4))
3443 "Replaced by simple assignment 'Callback cb = func")
3444 void attach(const
Callback<R(A0, A1, A2, A3, A4)> &func)
3456 template<
typename T,
typename U>
3458 "Replaced by simple assignment 'Callback cb = func")
3459 void attach(U *obj, R(T::*method)(A0, A1, A2, A3, A4))
3471 template<
typename T,
typename U>
3473 "Replaced by simple assignment 'Callback cb = func")
3474 void attach(const U *obj, R(T::*method)(A0, A1, A2, A3, A4) const)
3486 template<
typename T,
typename U>
3488 "Replaced by simple assignment 'Callback cb = func")
3489 void attach(volatile U *obj, R(T::*method)(A0, A1, A2, A3, A4) volatile)
3501 template<
typename T,
typename U>
3503 "Replaced by simple assignment 'Callback cb = func")
3504 void attach(const volatile U *obj, R(T::*method)(A0, A1, A2, A3, A4) const volatile)
3516 template <
typename T,
typename U>
3518 "Replaced by simple assignment 'Callback cb = func")
3519 void attach(R(*func)(T *, A0, A1, A2, A3, A4), U *arg)
3531 template <
typename T,
typename U>
3533 "Replaced by simple assignment 'Callback cb = func")
3534 void attach(R(*func)(const T *, A0, A1, A2, A3, A4), const U *arg)
3546 template <
typename T,
typename U>
3548 "Replaced by simple assignment 'Callback cb = func")
3549 void attach(R(*func)(volatile T *, A0, A1, A2, A3, A4), volatile U *arg)
3561 template <
typename T,
typename U>
3563 "Replaced by simple assignment 'Callback cb = func")
3564 void attach(R(*func)(const volatile T *, A0, A1, A2, A3, A4), const volatile U *arg)
3576 template <
typename F>
3578 "Replaced by simple assignment 'Callback cb = func")
3579 void attach(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2, A3, A4)))
3591 template <
typename F>
3593 "Replaced by simple assignment 'Callback cb = func")
3594 void attach(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2, A3, A4) const))
3606 template <
typename F>
3608 "Replaced by simple assignment 'Callback cb = func")
3609 void attach(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2, A3, A4) volatile))
3621 template <
typename F>
3623 "Replaced by simple assignment 'Callback cb = func")
3624 void attach(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(A0, A1, A2, A3, A4) const volatile))
3636 template <
typename T,
typename U>
3638 "Arguments to callback have been reordered to attach(func, arg)")
3639 void attach(U *obj, R(*func)(T *, A0, A1, A2, A3, A4))
3651 template <
typename T,
typename U>
3653 "Arguments to callback have been reordered to attach(func, arg)")
3654 void attach(const U *obj, R(*func)(const T *, A0, A1, A2, A3, A4))
3666 template <
typename T,
typename U>
3668 "Arguments to callback have been reordered to attach(func, arg)")
3669 void attach(volatile U *obj, R(*func)(volatile T *, A0, A1, A2, A3, A4))
3681 template <
typename T,
typename U>
3683 "Arguments to callback have been reordered to attach(func, arg)")
3684 void attach(const volatile U *obj, R(*func)(const volatile T *, A0, A1, A2, A3, A4))
3694 if (
this != &that) {
3704 R
call(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4)
const 3707 return _ops->call(
this, a0, a1, a2, a3, a4);
3714 return call(a0, a1, a2, a3, a4);
3719 operator bool()
const 3728 return memcmp(&l, &r,
sizeof(
Callback)) == 0;
3748 static R
thunk(
void *func, A0 a0, A1 a1, A2 a2, A3 a3, A4 a4)
3750 return static_cast<Callback *
>(func)->call(a0, a1, a2, a3, a4);
3759 void (*_staticfunc)(A0, A1, A2, A3, A4);
3760 void (*_boundfunc)(_class *, A0, A1, A2, A3, A4);
3761 void (_class::*_methodfunc)(A0, A1, A2, A3, A4);
3767 R(*call)(
const void *, A0, A1, A2, A3, A4);
3768 void (*move)(
void *,
const void *);
3769 void (*dtor)(
void *);
3773 template <
typename F>
3774 void generate(
const F &f)
3776 static const ops ops = {
3777 &Callback::function_call<F>,
3778 &Callback::function_move<F>,
3779 &Callback::function_dtor<F>,
3783 "Type F must not exceed the size of the Callback class");
3790 template <
typename F>
3791 static R function_call(
const void *p, A0 a0, A1 a1, A2 a2, A3 a3, A4 a4)
3793 return (*(F *)p)(a0, a1, a2, a3, a4);
3796 template <
typename F>
3797 static void function_move(
void *d,
const void *p)
3802 template <
typename F>
3803 static void function_dtor(
void *p)
3809 template <
typename O,
typename M>
3810 struct method_context {
3814 method_context(O *obj, M method)
3815 : method(method), obj(obj) {}
3817 R operator()(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4)
const 3819 return (obj->*method)(a0, a1, a2, a3, a4);
3823 template <
typename F,
typename A>
3824 struct function_context {
3828 function_context(F func, A *arg)
3829 : func(func), arg(arg) {}
3831 R operator()(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4)
const 3833 return func(arg, a0, a1, a2, a3, a4);
3847 template <
typename R>
3858 template <
typename R>
3870 template<
typename T,
typename U,
typename R>
3882 template<
typename T,
typename U,
typename R>
3894 template<
typename T,
typename U,
typename R>
3906 template<
typename T,
typename U,
typename R>
3918 template <
typename T,
typename U,
typename R>
3930 template <
typename T,
typename U,
typename R>
3942 template <
typename T,
typename U,
typename R>
3954 template <
typename T,
typename U,
typename R>
3968 template <
typename T,
typename U,
typename R>
3970 "Arguments to callback have been reordered to callback(func, arg)")
3984 template <
typename T,
typename U,
typename R>
3986 "Arguments to callback have been reordered to callback(func, arg)")
4000 template <
typename T,
typename U,
typename R>
4002 "Arguments to callback have been reordered to callback(func, arg)")
4016 template <
typename T,
typename U,
typename R>
4018 "Arguments to callback have been reordered to callback(func, arg)")
4030 template <
typename R,
typename A0>
4041 template <
typename R,
typename A0>
4053 template<
typename T,
typename U,
typename R,
typename A0>
4065 template<
typename T,
typename U,
typename R,
typename A0>
4077 template<
typename T,
typename U,
typename R,
typename A0>
4089 template<
typename T,
typename U,
typename R,
typename A0>
4101 template <
typename T,
typename U,
typename R,
typename A0>
4113 template <
typename T,
typename U,
typename R,
typename A0>
4125 template <
typename T,
typename U,
typename R,
typename A0>
4137 template <
typename T,
typename U,
typename R,
typename A0>
4151 template <
typename T,
typename U,
typename R,
typename A0>
4153 "Arguments to callback have been reordered to callback(func, arg)")
4167 template <
typename T,
typename U,
typename R,
typename A0>
4169 "Arguments to callback have been reordered to callback(func, arg)")
4183 template <
typename T,
typename U,
typename R,
typename A0>
4185 "Arguments to callback have been reordered to callback(func, arg)")
4199 template <
typename T,
typename U,
typename R,
typename A0>
4201 "Arguments to callback have been reordered to callback(func, arg)")
4213 template <
typename R,
typename A0,
typename A1>
4224 template <
typename R,
typename A0,
typename A1>
4236 template<
typename T,
typename U,
typename R,
typename A0,
typename A1>
4248 template<
typename T,
typename U,
typename R,
typename A0,
typename A1>
4260 template<
typename T,
typename U,
typename R,
typename A0,
typename A1>
4272 template<
typename T,
typename U,
typename R,
typename A0,
typename A1>
4284 template <
typename T,
typename U,
typename R,
typename A0,
typename A1>
4296 template <
typename T,
typename U,
typename R,
typename A0,
typename A1>
4308 template <
typename T,
typename U,
typename R,
typename A0,
typename A1>
4320 template <
typename T,
typename U,
typename R,
typename A0,
typename A1>
4334 template <
typename T,
typename U,
typename R,
typename A0,
typename A1>
4336 "Arguments to callback have been reordered to callback(func, arg)")
4350 template <
typename T,
typename U,
typename R,
typename A0,
typename A1>
4352 "Arguments to callback have been reordered to callback(func, arg)")
4366 template <
typename T,
typename U,
typename R,
typename A0,
typename A1>
4368 "Arguments to callback have been reordered to callback(func, arg)")
4382 template <
typename T,
typename U,
typename R,
typename A0,
typename A1>
4384 "Arguments to callback have been reordered to callback(func, arg)")
4396 template <
typename R,
typename A0,
typename A1,
typename A2>
4407 template <
typename R,
typename A0,
typename A1,
typename A2>
4419 template<
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2>
4431 template<
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2>
4443 template<
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2>
4455 template<
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2>
4467 template <
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2>
4479 template <
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2>
4491 template <
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2>
4503 template <
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2>
4517 template <
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2>
4519 "Arguments to callback have been reordered to callback(func, arg)")
4533 template <
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2>
4535 "Arguments to callback have been reordered to callback(func, arg)")
4549 template <
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2>
4551 "Arguments to callback have been reordered to callback(func, arg)")
4565 template <
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2>
4567 "Arguments to callback have been reordered to callback(func, arg)")
4568 Callback<R(A0, A1, A2)>
callback(const volatile U *obj, R(*func)(const volatile T *, A0, A1, A2))
4579 template <
typename R,
typename A0,
typename A1,
typename A2,
typename A3>
4590 template <
typename R,
typename A0,
typename A1,
typename A2,
typename A3>
4602 template<
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2,
typename A3>
4614 template<
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2,
typename A3>
4626 template<
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2,
typename A3>
4638 template<
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2,
typename A3>
4650 template <
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2,
typename A3>
4662 template <
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2,
typename A3>
4674 template <
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2,
typename A3>
4686 template <
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2,
typename A3>
4700 template <
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2,
typename A3>
4702 "Arguments to callback have been reordered to callback(func, arg)")
4716 template <
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2,
typename A3>
4718 "Arguments to callback have been reordered to callback(func, arg)")
4732 template <
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2,
typename A3>
4734 "Arguments to callback have been reordered to callback(func, arg)")
4748 template <
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2,
typename A3>
4750 "Arguments to callback have been reordered to callback(func, arg)")
4751 Callback<R(A0, A1, A2, A3)>
callback(const volatile U *obj, R(*func)(const volatile T *, A0, A1, A2, A3))
4762 template <
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
4773 template <
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
4785 template<
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
4797 template<
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
4809 template<
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
4821 template<
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
4833 template <
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
4834 Callback<R(A0, A1, A2, A3, A4)> callback(R(*func)(T *, A0, A1, A2, A3, A4), U *arg)
4845 template <
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
4846 Callback<R(A0, A1, A2, A3, A4)> callback(R(*func)(
const T *, A0, A1, A2, A3, A4),
const U *arg)
4857 template <
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
4858 Callback<R(A0, A1, A2, A3, A4)> callback(R(*func)(
volatile T *, A0, A1, A2, A3, A4),
volatile U *arg)
4869 template <
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
4870 Callback<R(A0, A1, A2, A3, A4)> callback(R(*func)(
const volatile T *, A0, A1, A2, A3, A4),
const volatile U *arg)
4883 template <
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
4885 "Arguments to callback have been reordered to callback(func, arg)")
4886 Callback<R(A0, A1, A2, A3, A4)>
callback(U *obj, R(*func)(T *, A0, A1, A2, A3, A4))
4899 template <
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
4901 "Arguments to callback have been reordered to callback(func, arg)")
4902 Callback<R(A0, A1, A2, A3, A4)>
callback(const U *obj, R(*func)(const T *, A0, A1, A2, A3, A4))
4915 template <
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
4917 "Arguments to callback have been reordered to callback(func, arg)")
4918 Callback<R(A0, A1, A2, A3, A4)>
callback(volatile U *obj, R(*func)(volatile T *, A0, A1, A2, A3, A4))
4931 template <
typename T,
typename U,
typename R,
typename A0,
typename A1,
typename A2,
typename A3,
typename A4>
4933 "Arguments to callback have been reordered to callback(func, arg)")
4934 Callback<R(A0, A1, A2, A3, A4)>
callback(const volatile U *obj, R(*func)(const volatile T *, A0, A1, A2, A3, A4))
Callback(R(*func)(A0, A1, A2)=0)
Create a Callback with a static function.
Callback(const Callback< R()> &func)
Attach a Callback.
Callback(const U *obj, R(T::*method)(A0) const)
Create a Callback with a member function.
~Callback()
Destroy a callback.
Callback(const Callback< R(A0, A1, A2)> &func)
Attach a Callback.
friend bool operator==(const Callback &l, const Callback &r)
Test for equality.
Callback(R(*func)(volatile T *, A0, A1), volatile U *arg)
Create a Callback with a static function and bound pointer.
Callback(R(*func)(volatile T *, A0, A1, A2, A3, A4), volatile U *arg)
Create a Callback with a static function and bound pointer.
static R thunk(void *func, A0 a0, A1 a1)
Static thunk for passing as C-style function.
Callback(R(*func)(const T *, A0, A1, A2, A3, A4), const U *arg)
Create a Callback with a static function and bound pointer.
Callback(const F f,)
Create a Callback with a function object.
Callback(R(*func)(T *, A0, A1), U *arg)
Create a Callback with a static function and bound pointer.
Callback(U *obj, R(T::*method)())
Create a Callback with a member function.
R call(A0 a0, A1 a1, A2 a2) const
Call the attached function.
Callback(R(*func)(const volatile T *, A0, A1, A2, A3), const volatile U *arg)
Create a Callback with a static function and bound pointer.
Callback(U *obj, R(T::*method)(A0, A1, A2))
Create a Callback with a member function.
Callback(const Callback< R(A0, A1, A2, A3)> &func)
Attach a Callback.
Callback(const F f,)
Create a Callback with a function object.
Callback(volatile U *obj, R(T::*method)(A0) volatile)
Create a Callback with a member function.
R operator()(A0 a0, A1 a1, A2 a2, A3 a3) const
Call the attached function.
friend bool operator==(const Callback &l, const Callback &r)
Test for equality.
Callback(const volatile U *obj, R(T::*method)() const volatile)
Create a Callback with a member function.
Callback(R(*func)(A0, A1, A2, A3, A4)=0)
Create a Callback with a static function.
friend bool operator==(const Callback &l, const Callback &r)
Test for equality.
Callback(volatile U *obj, R(T::*method)(A0, A1, A2, A3, A4) volatile)
Create a Callback with a member function.
Callback(volatile U *obj, R(T::*method)() volatile)
Create a Callback with a member function.
R call(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) const
Call the attached function.
Callback & operator=(const Callback &that)
Assign a callback.
Callback(const volatile U *obj, R(T::*method)(A0, A1, A2, A3, A4) const volatile)
Create a Callback with a member function.
Callback(volatile F f,)
Create a Callback with a function object.
Callback(const volatile F f,)
Create a Callback with a function object.
Callback(F f,)
Create a Callback with a function object.
Callback class based on template specialization.
~Callback()
Destroy a callback.
Callback class based on template specialization.
R call(A0 a0, A1 a1, A2 a2, A3 a3) const
Call the attached function.
Callback(const Callback< R(A0, A1)> &func)
Attach a Callback.
Callback(R(*func)(volatile T *), volatile U *arg)
Create a Callback with a static function and bound pointer.
Callback(R(*func)(T *, A0, A1, A2, A3), U *arg)
Create a Callback with a static function and bound pointer.
Callback(R(*func)(const T *), const U *arg)
Create a Callback with a static function and bound pointer.
Callback(R(*func)(A0)=0)
Create a Callback with a static function.
Callback(R(*func)(const T *, A0, A1, A2, A3), const U *arg)
Create a Callback with a static function and bound pointer.
Callback(R(*func)(T *), U *arg)
Create a Callback with a static function and bound pointer.
Callback & operator=(const Callback &that)
Assign a callback.
Callback(F f,)
Create a Callback with a function object.
R operator()() const
Call the attached function.
R operator()(A0 a0) const
Call the attached function.
Callback(R(*func)(A0, A1, A2, A3)=0)
Create a Callback with a static function.
Callback(volatile U *obj, R(T::*method)(A0, A1, A2, A3) volatile)
Create a Callback with a member function.
R call() const
Call the attached function.
Callback(const F f,)
Create a Callback with a function object.
friend bool operator!=(const Callback &l, const Callback &r)
Test for inequality.
Callback(R(*func)(const T *, A0, A1), const U *arg)
Create a Callback with a static function and bound pointer.
Callback(R(*func)()=0)
Create a Callback with a static function.
static R thunk(void *func, A0 a0)
Static thunk for passing as C-style function.
Callback(const F f,)
Create a Callback with a function object.
Callback(R(*func)(A0, A1)=0)
Create a Callback with a static function.
Callback(R(*func)(volatile T *, A0, A1, A2, A3), volatile U *arg)
Create a Callback with a static function and bound pointer.
Callback(const volatile F f,)
Create a Callback with a function object.
friend bool operator!=(const Callback &l, const Callback &r)
Test for inequality.
Callback(volatile F f,)
Create a Callback with a function object.
Callback(const volatile U *obj, R(T::*method)(A0) const volatile)
Create a Callback with a member function.
Callback(const volatile F f,)
Create a Callback with a function object.
Callback class based on template specialization.
static R thunk(void *func, A0 a0, A1 a1, A2 a2)
Static thunk for passing as C-style function.
Callback(F f,)
Create a Callback with a function object.
R call(A0 a0) const
Call the attached function.
Callback(const volatile F f,)
Create a Callback with a function object.
Callback(R(*func)(const volatile T *), const volatile U *arg)
Create a Callback with a static function and bound pointer.
Callback(const Callback< R(A0, A1, A2, A3, A4)> &func)
Attach a Callback.
R operator()(A0 a0, A1 a1) const
Call the attached function.
Callback(U *obj, R(T::*method)(A0, A1, A2, A3, A4))
Create a Callback with a member function.
Callback(const U *obj, R(T::*method)(A0, A1, A2, A3) const)
Create a Callback with a member function.
Callback(const volatile U *obj, R(T::*method)(A0, A1, A2, A3) const volatile)
Create a Callback with a member function.
friend bool operator==(const Callback &l, const Callback &r)
Test for equality.
Callback(R(*func)(const volatile T *, A0, A1, A2, A3, A4), const volatile U *arg)
Create a Callback with a static function and bound pointer.
friend bool operator!=(const Callback &l, const Callback &r)
Test for inequality.
Callback(const U *obj, R(T::*method)(A0, A1, A2) const)
Create a Callback with a member function.
friend bool operator!=(const Callback &l, const Callback &r)
Test for inequality.
~Callback()
Destroy a callback.
Callback & operator=(const Callback &that)
Assign a callback.
Callback(volatile F f,)
Create a Callback with a function object.
static R thunk(void *func)
Static thunk for passing as C-style function.
friend bool operator!=(const Callback &l, const Callback &r)
Test for inequality.
Callback(R(*func)(T *, A0, A1, A2, A3, A4), U *arg)
Create a Callback with a static function and bound pointer.
R call(A0 a0, A1 a1) const
Call the attached function.
~Callback()
Destroy a callback.
Callback(F f,)
Create a Callback with a function object.
Callback(const Callback< R(A0)> &func)
Attach a Callback.
Callback class based on template specialization.
Callback(const volatile U *obj, R(T::*method)(A0, A1) const volatile)
Create a Callback with a member function.
Callback(volatile U *obj, R(T::*method)(A0, A1) volatile)
Create a Callback with a member function.
friend bool operator==(const Callback &l, const Callback &r)
Test for equality.
Callback(U *obj, R(T::*method)(A0, A1))
Create a Callback with a member function.
Callback(const U *obj, R(T::*method)(A0, A1, A2, A3, A4) const)
Create a Callback with a member function.
Callback(const F f,)
Create a Callback with a function object.
~Callback()
Destroy a callback.
Callback class based on template specialization.
Callback(volatile F f,)
Create a Callback with a function object.
Callback(R(*func)(const T *, A0, A1, A2), const U *arg)
Create a Callback with a static function and bound pointer.
Callback(const volatile F f,)
Create a Callback with a function object.
Callback(const volatile U *obj, R(T::*method)(A0, A1, A2) const volatile)
Create a Callback with a member function.
Callback(const U *obj, R(T::*method)() const)
Create a Callback with a member function.
Callback(R(*func)(const volatile T *, A0, A1), const volatile U *arg)
Create a Callback with a static function and bound pointer.
~Callback()
Destroy a callback.
Callback(U *obj, R(T::*method)(A0))
Create a Callback with a member function.
Callback(volatile F f,)
Create a Callback with a function object.
Callback(volatile U *obj, R(T::*method)(A0, A1, A2) volatile)
Create a Callback with a member function.
Callback(R(*func)(volatile T *, A0, A1, A2), volatile U *arg)
Create a Callback with a static function and bound pointer.
R operator()(A0 a0, A1 a1, A2 a2) const
Call the attached function.
friend bool operator==(const Callback &l, const Callback &r)
Test for equality.
Callback class based on template specialization.
Callback(const F f,)
Create a Callback with a function object.
Callback & operator=(const Callback &that)
Assign a callback.
Callback(volatile F f,)
Create a Callback with a function object.
Callback(const volatile F f,)
Create a Callback with a function object.
Callback(R(*func)(const volatile T *, A0), const volatile U *arg)
Create a Callback with a static function and bound pointer.
static R thunk(void *func, A0 a0, A1 a1, A2 a2, A3 a3)
Static thunk for passing as C-style function.
Callback class based on template specialization.
Callback(const U *obj, R(T::*method)(A0, A1) const)
Create a Callback with a member function.
Callback & operator=(const Callback &that)
Assign a callback.
Callback & operator=(const Callback &that)
Assign a callback.
static R thunk(void *func, A0 a0, A1 a1, A2 a2, A3 a3, A4 a4)
Static thunk for passing as C-style function.
Callback(U *obj, R(T::*method)(A0, A1, A2, A3))
Create a Callback with a member function.
Callback(R(*func)(T *, A0), U *arg)
Create a Callback with a static function and bound pointer.
Callback(F f,)
Create a Callback with a function object.
Callback(R(*func)(const volatile T *, A0, A1, A2), const volatile U *arg)
Create a Callback with a static function and bound pointer.
R operator()(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) const
Call the attached function.
Callback(R(*func)(volatile T *, A0), volatile U *arg)
Create a Callback with a static function and bound pointer.
Callback(F f,)
Create a Callback with a function object.
Callback(R(*func)(const T *, A0), const U *arg)
Create a Callback with a static function and bound pointer.
Callback(R(*func)(T *, A0, A1, A2), U *arg)
Create a Callback with a static function and bound pointer.
friend bool operator!=(const Callback &l, const Callback &r)
Test for inequality.