mirror of https://github.com/ARMmbed/mbed-os.git
Remove deprecated Callback methods
parent
48f544f9e4
commit
0b28553ac2
|
@ -526,7 +526,7 @@ void test_dispatch0()
|
||||||
Verifier<T>::verify0(cb);
|
Verifier<T>::verify0(cb);
|
||||||
cb = static_func0;
|
cb = static_func0;
|
||||||
Verifier<T>::verify0(cb);
|
Verifier<T>::verify0(cb);
|
||||||
cb.attach(&bound_func0<T>, &thing);
|
cb = {&bound_func0<T>, &thing};
|
||||||
Verifier<T>::verify0(&cb, &Callback<T()>::call);
|
Verifier<T>::verify0(&cb, &Callback<T()>::call);
|
||||||
Verifier<T>::verify0(&Callback<T()>::thunk, (void *)&cb);
|
Verifier<T>::verify0(&Callback<T()>::thunk, (void *)&cb);
|
||||||
}
|
}
|
||||||
|
@ -557,7 +557,7 @@ void test_dispatch1()
|
||||||
Verifier<T>::verify1(cb);
|
Verifier<T>::verify1(cb);
|
||||||
cb = static_func1;
|
cb = static_func1;
|
||||||
Verifier<T>::verify1(cb);
|
Verifier<T>::verify1(cb);
|
||||||
cb.attach(&bound_func1<T>, &thing);
|
cb = {&bound_func1<T>, &thing};
|
||||||
Verifier<T>::verify1(&cb, &Callback<T(T)>::call);
|
Verifier<T>::verify1(&cb, &Callback<T(T)>::call);
|
||||||
Verifier<T>::verify1(&Callback<T(T)>::thunk, (void *)&cb);
|
Verifier<T>::verify1(&Callback<T(T)>::thunk, (void *)&cb);
|
||||||
}
|
}
|
||||||
|
@ -588,7 +588,7 @@ void test_dispatch2()
|
||||||
Verifier<T>::verify2(cb);
|
Verifier<T>::verify2(cb);
|
||||||
cb = static_func2;
|
cb = static_func2;
|
||||||
Verifier<T>::verify2(cb);
|
Verifier<T>::verify2(cb);
|
||||||
cb.attach(&bound_func2<T>, &thing);
|
cb = {&bound_func2<T>, &thing};
|
||||||
Verifier<T>::verify2(&cb, &Callback<T(T, T)>::call);
|
Verifier<T>::verify2(&cb, &Callback<T(T, T)>::call);
|
||||||
Verifier<T>::verify2(&Callback<T(T, T)>::thunk, (void *)&cb);
|
Verifier<T>::verify2(&Callback<T(T, T)>::thunk, (void *)&cb);
|
||||||
}
|
}
|
||||||
|
@ -619,7 +619,7 @@ void test_dispatch3()
|
||||||
Verifier<T>::verify3(cb);
|
Verifier<T>::verify3(cb);
|
||||||
cb = static_func3;
|
cb = static_func3;
|
||||||
Verifier<T>::verify3(cb);
|
Verifier<T>::verify3(cb);
|
||||||
cb.attach(&bound_func3<T>, &thing);
|
cb = {&bound_func3<T>, &thing};
|
||||||
Verifier<T>::verify3(&cb, &Callback<T(T, T, T)>::call);
|
Verifier<T>::verify3(&cb, &Callback<T(T, T, T)>::call);
|
||||||
Verifier<T>::verify3(&Callback<T(T, T, T)>::thunk, (void *)&cb);
|
Verifier<T>::verify3(&Callback<T(T, T, T)>::thunk, (void *)&cb);
|
||||||
}
|
}
|
||||||
|
@ -650,7 +650,7 @@ void test_dispatch4()
|
||||||
Verifier<T>::verify4(cb);
|
Verifier<T>::verify4(cb);
|
||||||
cb = static_func4;
|
cb = static_func4;
|
||||||
Verifier<T>::verify4(cb);
|
Verifier<T>::verify4(cb);
|
||||||
cb.attach(&bound_func4<T>, &thing);
|
cb = {&bound_func4<T>, &thing};
|
||||||
Verifier<T>::verify4(&cb, &Callback<T(T, T, T, T)>::call);
|
Verifier<T>::verify4(&cb, &Callback<T(T, T, T, T)>::call);
|
||||||
Verifier<T>::verify4(&Callback<T(T, T, T, T)>::thunk, (void *)&cb);
|
Verifier<T>::verify4(&Callback<T(T, T, T, T)>::thunk, (void *)&cb);
|
||||||
}
|
}
|
||||||
|
@ -681,7 +681,7 @@ void test_dispatch5()
|
||||||
Verifier<T>::verify5(cb);
|
Verifier<T>::verify5(cb);
|
||||||
cb = static_func5;
|
cb = static_func5;
|
||||||
Verifier<T>::verify5(cb);
|
Verifier<T>::verify5(cb);
|
||||||
cb.attach(&bound_func5<T>, &thing);
|
cb = {&bound_func5<T>, &thing};
|
||||||
Verifier<T>::verify5(&cb, &Callback<T(T, T, T, T, T)>::call);
|
Verifier<T>::verify5(&cb, &Callback<T(T, T, T, T, T)>::call);
|
||||||
Verifier<T>::verify5(&Callback<T(T, T, T, T, T)>::thunk, (void *)&cb);
|
Verifier<T>::verify5(&Callback<T(T, T, T, T, T)>::thunk, (void *)&cb);
|
||||||
}
|
}
|
||||||
|
|
|
@ -398,7 +398,7 @@ void test_dispatch0()
|
||||||
Verifier<T>::verify0(cb);
|
Verifier<T>::verify0(cb);
|
||||||
cb = static_func0;
|
cb = static_func0;
|
||||||
Verifier<T>::verify0(cb);
|
Verifier<T>::verify0(cb);
|
||||||
cb.attach(&bound_func0<T>, &thing);
|
cb = {&bound_func0<T>, &thing};
|
||||||
Verifier<T>::verify0(&cb, &Callback<T()>::call);
|
Verifier<T>::verify0(&cb, &Callback<T()>::call);
|
||||||
Verifier<T>::verify0(&Callback<T()>::thunk, (void *)&cb);
|
Verifier<T>::verify0(&Callback<T()>::thunk, (void *)&cb);
|
||||||
}
|
}
|
||||||
|
@ -422,7 +422,7 @@ void test_dispatch1()
|
||||||
Verifier<T>::verify1(cb);
|
Verifier<T>::verify1(cb);
|
||||||
cb = static_func1;
|
cb = static_func1;
|
||||||
Verifier<T>::verify1(cb);
|
Verifier<T>::verify1(cb);
|
||||||
cb.attach(&bound_func1<T>, &thing);
|
cb = {&bound_func1<T>, &thing};
|
||||||
Verifier<T>::verify1(&cb, &Callback<T(T)>::call);
|
Verifier<T>::verify1(&cb, &Callback<T(T)>::call);
|
||||||
Verifier<T>::verify1(&Callback<T(T)>::thunk, (void *)&cb);
|
Verifier<T>::verify1(&Callback<T(T)>::thunk, (void *)&cb);
|
||||||
}
|
}
|
||||||
|
@ -446,7 +446,7 @@ void test_dispatch2()
|
||||||
Verifier<T>::verify2(cb);
|
Verifier<T>::verify2(cb);
|
||||||
cb = static_func2;
|
cb = static_func2;
|
||||||
Verifier<T>::verify2(cb);
|
Verifier<T>::verify2(cb);
|
||||||
cb.attach(&bound_func2<T>, &thing);
|
cb = {&bound_func2<T>, &thing};
|
||||||
Verifier<T>::verify2(&cb, &Callback<T(T, T)>::call);
|
Verifier<T>::verify2(&cb, &Callback<T(T, T)>::call);
|
||||||
Verifier<T>::verify2(&Callback<T(T, T)>::thunk, (void *)&cb);
|
Verifier<T>::verify2(&Callback<T(T, T)>::thunk, (void *)&cb);
|
||||||
}
|
}
|
||||||
|
@ -470,7 +470,7 @@ void test_dispatch3()
|
||||||
Verifier<T>::verify3(cb);
|
Verifier<T>::verify3(cb);
|
||||||
cb = static_func3;
|
cb = static_func3;
|
||||||
Verifier<T>::verify3(cb);
|
Verifier<T>::verify3(cb);
|
||||||
cb.attach(&bound_func3<T>, &thing);
|
cb = {&bound_func3<T>, &thing};
|
||||||
Verifier<T>::verify3(&cb, &Callback<T(T, T, T)>::call);
|
Verifier<T>::verify3(&cb, &Callback<T(T, T, T)>::call);
|
||||||
Verifier<T>::verify3(&Callback<T(T, T, T)>::thunk, (void *)&cb);
|
Verifier<T>::verify3(&Callback<T(T, T, T)>::thunk, (void *)&cb);
|
||||||
}
|
}
|
||||||
|
@ -494,7 +494,7 @@ void test_dispatch4()
|
||||||
Verifier<T>::verify4(cb);
|
Verifier<T>::verify4(cb);
|
||||||
cb = static_func4;
|
cb = static_func4;
|
||||||
Verifier<T>::verify4(cb);
|
Verifier<T>::verify4(cb);
|
||||||
cb.attach(&bound_func4<T>, &thing);
|
cb = {&bound_func4<T>, &thing};
|
||||||
Verifier<T>::verify4(&cb, &Callback<T(T, T, T, T)>::call);
|
Verifier<T>::verify4(&cb, &Callback<T(T, T, T, T)>::call);
|
||||||
Verifier<T>::verify4(&Callback<T(T, T, T, T)>::thunk, (void *)&cb);
|
Verifier<T>::verify4(&Callback<T(T, T, T, T)>::thunk, (void *)&cb);
|
||||||
}
|
}
|
||||||
|
@ -518,7 +518,7 @@ void test_dispatch5()
|
||||||
Verifier<T>::verify5(cb);
|
Verifier<T>::verify5(cb);
|
||||||
cb = static_func5;
|
cb = static_func5;
|
||||||
Verifier<T>::verify5(cb);
|
Verifier<T>::verify5(cb);
|
||||||
cb.attach(&bound_func5<T>, &thing);
|
cb = {&bound_func5<T>, &thing};
|
||||||
Verifier<T>::verify5(&cb, &Callback<T(T, T, T, T, T)>::call);
|
Verifier<T>::verify5(&cb, &Callback<T(T, T, T, T, T)>::call);
|
||||||
Verifier<T>::verify5(&Callback<T(T, T, T, T, T)>::thunk, (void *)&cb);
|
Verifier<T>::verify5(&Callback<T(T, T, T, T, T)>::thunk, (void *)&cb);
|
||||||
}
|
}
|
||||||
|
|
|
@ -398,7 +398,7 @@ void test_dispatch0()
|
||||||
Verifier<T>::verify0(cb);
|
Verifier<T>::verify0(cb);
|
||||||
cb = static_func0;
|
cb = static_func0;
|
||||||
Verifier<T>::verify0(cb);
|
Verifier<T>::verify0(cb);
|
||||||
cb.attach(&bound_func0<T>, &thing);
|
cb = {&bound_func0<T>, &thing};
|
||||||
Verifier<T>::verify0(&cb, &Callback<T()>::call);
|
Verifier<T>::verify0(&cb, &Callback<T()>::call);
|
||||||
Verifier<T>::verify0(&Callback<T()>::thunk, (void *)&cb);
|
Verifier<T>::verify0(&Callback<T()>::thunk, (void *)&cb);
|
||||||
}
|
}
|
||||||
|
@ -422,7 +422,7 @@ void test_dispatch1()
|
||||||
Verifier<T>::verify1(cb);
|
Verifier<T>::verify1(cb);
|
||||||
cb = static_func1;
|
cb = static_func1;
|
||||||
Verifier<T>::verify1(cb);
|
Verifier<T>::verify1(cb);
|
||||||
cb.attach(&bound_func1<T>, &thing);
|
cb = {&bound_func1<T>, &thing};
|
||||||
Verifier<T>::verify1(&cb, &Callback<T(T)>::call);
|
Verifier<T>::verify1(&cb, &Callback<T(T)>::call);
|
||||||
Verifier<T>::verify1(&Callback<T(T)>::thunk, (void *)&cb);
|
Verifier<T>::verify1(&Callback<T(T)>::thunk, (void *)&cb);
|
||||||
}
|
}
|
||||||
|
@ -446,7 +446,7 @@ void test_dispatch2()
|
||||||
Verifier<T>::verify2(cb);
|
Verifier<T>::verify2(cb);
|
||||||
cb = static_func2;
|
cb = static_func2;
|
||||||
Verifier<T>::verify2(cb);
|
Verifier<T>::verify2(cb);
|
||||||
cb.attach(&bound_func2<T>, &thing);
|
cb = {&bound_func2<T>, &thing};
|
||||||
Verifier<T>::verify2(&cb, &Callback<T(T, T)>::call);
|
Verifier<T>::verify2(&cb, &Callback<T(T, T)>::call);
|
||||||
Verifier<T>::verify2(&Callback<T(T, T)>::thunk, (void *)&cb);
|
Verifier<T>::verify2(&Callback<T(T, T)>::thunk, (void *)&cb);
|
||||||
}
|
}
|
||||||
|
@ -470,7 +470,7 @@ void test_dispatch3()
|
||||||
Verifier<T>::verify3(cb);
|
Verifier<T>::verify3(cb);
|
||||||
cb = static_func3;
|
cb = static_func3;
|
||||||
Verifier<T>::verify3(cb);
|
Verifier<T>::verify3(cb);
|
||||||
cb.attach(&bound_func3<T>, &thing);
|
cb = {&bound_func3<T>, &thing};
|
||||||
Verifier<T>::verify3(&cb, &Callback<T(T, T, T)>::call);
|
Verifier<T>::verify3(&cb, &Callback<T(T, T, T)>::call);
|
||||||
Verifier<T>::verify3(&Callback<T(T, T, T)>::thunk, (void *)&cb);
|
Verifier<T>::verify3(&Callback<T(T, T, T)>::thunk, (void *)&cb);
|
||||||
}
|
}
|
||||||
|
@ -494,7 +494,7 @@ void test_dispatch4()
|
||||||
Verifier<T>::verify4(cb);
|
Verifier<T>::verify4(cb);
|
||||||
cb = static_func4;
|
cb = static_func4;
|
||||||
Verifier<T>::verify4(cb);
|
Verifier<T>::verify4(cb);
|
||||||
cb.attach(&bound_func4<T>, &thing);
|
cb = {&bound_func4<T>, &thing};
|
||||||
Verifier<T>::verify4(&cb, &Callback<T(T, T, T, T)>::call);
|
Verifier<T>::verify4(&cb, &Callback<T(T, T, T, T)>::call);
|
||||||
Verifier<T>::verify4(&Callback<T(T, T, T, T)>::thunk, (void *)&cb);
|
Verifier<T>::verify4(&Callback<T(T, T, T, T)>::thunk, (void *)&cb);
|
||||||
}
|
}
|
||||||
|
@ -518,7 +518,7 @@ void test_dispatch5()
|
||||||
Verifier<T>::verify5(cb);
|
Verifier<T>::verify5(cb);
|
||||||
cb = static_func5;
|
cb = static_func5;
|
||||||
Verifier<T>::verify5(cb);
|
Verifier<T>::verify5(cb);
|
||||||
cb.attach(&bound_func5<T>, &thing);
|
cb = {&bound_func5<T>, &thing};
|
||||||
Verifier<T>::verify5(&cb, &Callback<T(T, T, T, T, T)>::call);
|
Verifier<T>::verify5(&cb, &Callback<T(T, T, T, T, T)>::call);
|
||||||
Verifier<T>::verify5(&Callback<T(T, T, T, T, T)>::thunk, (void *)&cb);
|
Verifier<T>::verify5(&Callback<T(T, T, T, T, T)>::thunk, (void *)&cb);
|
||||||
}
|
}
|
||||||
|
|
|
@ -221,62 +221,6 @@ public:
|
||||||
generate(f);
|
generate(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Create a Callback with a static function and bound pointer
|
|
||||||
* @param obj Pointer to object to bind to function
|
|
||||||
* @param func Static function to attach
|
|
||||||
* @deprecated
|
|
||||||
* Arguments to callback have been reordered to Callback(func, arg)
|
|
||||||
*/
|
|
||||||
template<typename T, typename U>
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.1",
|
|
||||||
"Arguments to callback have been reordered to Callback(func, arg)")
|
|
||||||
Callback(U *obj, R(*func)(T *, ArgTs...))
|
|
||||||
{
|
|
||||||
new (this) Callback(func, obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Create a Callback with a static function and bound pointer
|
|
||||||
* @param obj Pointer to object to bind to function
|
|
||||||
* @param func Static function to attach
|
|
||||||
* @deprecated
|
|
||||||
* Arguments to callback have been reordered to Callback(func, arg)
|
|
||||||
*/
|
|
||||||
template<typename T, typename U>
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.1",
|
|
||||||
"Arguments to callback have been reordered to Callback(func, arg)")
|
|
||||||
Callback(const U *obj, R(*func)(const T *, ArgTs...))
|
|
||||||
{
|
|
||||||
new (this) Callback(func, obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Create a Callback with a static function and bound pointer
|
|
||||||
* @param obj Pointer to object to bind to function
|
|
||||||
* @param func Static function to attach
|
|
||||||
* @deprecated
|
|
||||||
* Arguments to callback have been reordered to Callback(func, arg)
|
|
||||||
*/
|
|
||||||
template<typename T, typename U>
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.1",
|
|
||||||
"Arguments to callback have been reordered to Callback(func, arg)")
|
|
||||||
Callback(volatile U *obj, R(*func)(volatile T *, ArgTs...))
|
|
||||||
{
|
|
||||||
new (this) Callback(func, obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Create a Callback with a static function and bound pointer
|
|
||||||
* @param obj Pointer to object to bind to function
|
|
||||||
* @param func Static function to attach
|
|
||||||
* @deprecated
|
|
||||||
* Arguments to callback have been reordered to Callback(func, arg)
|
|
||||||
*/
|
|
||||||
template<typename T, typename U>
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.1",
|
|
||||||
"Arguments to callback have been reordered to Callback(func, arg)")
|
|
||||||
Callback(const volatile U *obj, R(*func)(const volatile T *, ArgTs...))
|
|
||||||
{
|
|
||||||
new (this) Callback(func, obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Destroy a callback
|
/** Destroy a callback
|
||||||
*/
|
*/
|
||||||
~Callback()
|
~Callback()
|
||||||
|
@ -286,272 +230,6 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Attach a static function
|
|
||||||
* @param func Static function to attach
|
|
||||||
* @deprecated
|
|
||||||
* Replaced by simple assignment 'Callback cb = func'
|
|
||||||
*/
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
|
||||||
"Replaced by simple assignment 'Callback cb = func")
|
|
||||||
void attach(R(*func)(ArgTs...))
|
|
||||||
{
|
|
||||||
this->~Callback();
|
|
||||||
new (this) Callback(func);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Attach a Callback
|
|
||||||
* @param func The Callback to attach
|
|
||||||
* @deprecated
|
|
||||||
* Replaced by simple assignment 'Callback cb = func'
|
|
||||||
*/
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
|
||||||
"Replaced by simple assignment 'Callback cb = func")
|
|
||||||
void attach(const Callback<R(ArgTs...)> &func)
|
|
||||||
{
|
|
||||||
this->~Callback();
|
|
||||||
new (this) Callback(func);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Attach a member function
|
|
||||||
* @param obj Pointer to object to invoke member function on
|
|
||||||
* @param method Member function to attach
|
|
||||||
* @deprecated
|
|
||||||
* Replaced by simple assignment 'Callback cb = func'
|
|
||||||
*/
|
|
||||||
template<typename T, typename U>
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
|
||||||
"Replaced by simple assignment 'Callback cb = func")
|
|
||||||
void attach(U *obj, R(T::*method)(ArgTs...))
|
|
||||||
{
|
|
||||||
this->~Callback();
|
|
||||||
new (this) Callback(obj, method);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Attach a member function
|
|
||||||
* @param obj Pointer to object to invoke member function on
|
|
||||||
* @param method Member function to attach
|
|
||||||
* @deprecated
|
|
||||||
* Replaced by simple assignment 'Callback cb = func'
|
|
||||||
*/
|
|
||||||
template<typename T, typename U>
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
|
||||||
"Replaced by simple assignment 'Callback cb = func")
|
|
||||||
void attach(const U *obj, R(T::*method)(ArgTs...) const)
|
|
||||||
{
|
|
||||||
this->~Callback();
|
|
||||||
new (this) Callback(obj, method);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Attach a member function
|
|
||||||
* @param obj Pointer to object to invoke member function on
|
|
||||||
* @param method Member function to attach
|
|
||||||
* @deprecated
|
|
||||||
* Replaced by simple assignment 'Callback cb = func'
|
|
||||||
*/
|
|
||||||
template<typename T, typename U>
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
|
||||||
"Replaced by simple assignment 'Callback cb = func")
|
|
||||||
void attach(volatile U *obj, R(T::*method)(ArgTs...) volatile)
|
|
||||||
{
|
|
||||||
this->~Callback();
|
|
||||||
new (this) Callback(obj, method);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Attach a member function
|
|
||||||
* @param obj Pointer to object to invoke member function on
|
|
||||||
* @param method Member function to attach
|
|
||||||
* @deprecated
|
|
||||||
* Replaced by simple assignment 'Callback cb = func'
|
|
||||||
*/
|
|
||||||
template<typename T, typename U>
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
|
||||||
"Replaced by simple assignment 'Callback cb = func")
|
|
||||||
void attach(const volatile U *obj, R(T::*method)(ArgTs...) const volatile)
|
|
||||||
{
|
|
||||||
this->~Callback();
|
|
||||||
new (this) Callback(obj, method);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Attach a static function with a bound pointer
|
|
||||||
* @param func Static function to attach
|
|
||||||
* @param arg Pointer argument to function
|
|
||||||
* @deprecated
|
|
||||||
* Replaced by simple assignment 'Callback cb = func'
|
|
||||||
*/
|
|
||||||
template <typename T, typename U>
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
|
||||||
"Replaced by simple assignment 'Callback cb = func")
|
|
||||||
void attach(R(*func)(T *, ArgTs...), U *arg)
|
|
||||||
{
|
|
||||||
this->~Callback();
|
|
||||||
new (this) Callback(func, arg);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Attach a static function with a bound pointer
|
|
||||||
* @param func Static function to attach
|
|
||||||
* @param arg Pointer argument to function
|
|
||||||
* @deprecated
|
|
||||||
* Replaced by simple assignment 'Callback cb = func'
|
|
||||||
*/
|
|
||||||
template <typename T, typename U>
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
|
||||||
"Replaced by simple assignment 'Callback cb = func")
|
|
||||||
void attach(R(*func)(const T *, ArgTs...), const U *arg)
|
|
||||||
{
|
|
||||||
this->~Callback();
|
|
||||||
new (this) Callback(func, arg);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Attach a static function with a bound pointer
|
|
||||||
* @param func Static function to attach
|
|
||||||
* @param arg Pointer argument to function
|
|
||||||
* @deprecated
|
|
||||||
* Replaced by simple assignment 'Callback cb = func'
|
|
||||||
*/
|
|
||||||
template <typename T, typename U>
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
|
||||||
"Replaced by simple assignment 'Callback cb = func")
|
|
||||||
void attach(R(*func)(volatile T *, ArgTs...), volatile U *arg)
|
|
||||||
{
|
|
||||||
this->~Callback();
|
|
||||||
new (this) Callback(func, arg);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Attach a static function with a bound pointer
|
|
||||||
* @param func Static function to attach
|
|
||||||
* @param arg Pointer argument to function
|
|
||||||
* @deprecated
|
|
||||||
* Replaced by simple assignment 'Callback cb = func'
|
|
||||||
*/
|
|
||||||
template <typename T, typename U>
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
|
||||||
"Replaced by simple assignment 'Callback cb = func")
|
|
||||||
void attach(R(*func)(const volatile T *, ArgTs...), const volatile U *arg)
|
|
||||||
{
|
|
||||||
this->~Callback();
|
|
||||||
new (this) Callback(func, arg);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Attach a function object
|
|
||||||
* @param f Function object to attach
|
|
||||||
* @note The function object is limited to a single word of storage
|
|
||||||
* @deprecated
|
|
||||||
* Replaced by simple assignment 'Callback cb = func'
|
|
||||||
*/
|
|
||||||
template <typename F>
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
|
||||||
"Replaced by simple assignment 'Callback cb = func")
|
|
||||||
void attach(F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(ArgTs...)))
|
|
||||||
{
|
|
||||||
this->~Callback();
|
|
||||||
new (this) Callback(f);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Attach a function object
|
|
||||||
* @param f Function object to attach
|
|
||||||
* @note The function object is limited to a single word of storage
|
|
||||||
* @deprecated
|
|
||||||
* Replaced by simple assignment 'Callback cb = func'
|
|
||||||
*/
|
|
||||||
template <typename F>
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
|
||||||
"Replaced by simple assignment 'Callback cb = func")
|
|
||||||
void attach(const F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(ArgTs...) const))
|
|
||||||
{
|
|
||||||
this->~Callback();
|
|
||||||
new (this) Callback(f);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Attach a function object
|
|
||||||
* @param f Function object to attach
|
|
||||||
* @note The function object is limited to a single word of storage
|
|
||||||
* @deprecated
|
|
||||||
* Replaced by simple assignment 'Callback cb = func'
|
|
||||||
*/
|
|
||||||
template <typename F>
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
|
||||||
"Replaced by simple assignment 'Callback cb = func")
|
|
||||||
void attach(volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(ArgTs...) volatile))
|
|
||||||
{
|
|
||||||
this->~Callback();
|
|
||||||
new (this) Callback(f);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Attach a function object
|
|
||||||
* @param f Function object to attach
|
|
||||||
* @note The function object is limited to a single word of storage
|
|
||||||
* @deprecated
|
|
||||||
* Replaced by simple assignment 'Callback cb = func'
|
|
||||||
*/
|
|
||||||
template <typename F>
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.4",
|
|
||||||
"Replaced by simple assignment 'Callback cb = func")
|
|
||||||
void attach(const volatile F f, MBED_ENABLE_IF_CALLBACK_COMPATIBLE(F, R(F::*)(ArgTs...) const volatile))
|
|
||||||
{
|
|
||||||
this->~Callback();
|
|
||||||
new (this) Callback(f);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Attach a static function with a bound pointer
|
|
||||||
* @param obj Pointer to object to bind to function
|
|
||||||
* @param func Static function to attach
|
|
||||||
* @deprecated
|
|
||||||
* Arguments to callback have been reordered to attach(func, arg)
|
|
||||||
*/
|
|
||||||
template <typename T, typename U>
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.1",
|
|
||||||
"Arguments to callback have been reordered to attach(func, arg)")
|
|
||||||
void attach(U *obj, R(*func)(T *, ArgTs...))
|
|
||||||
{
|
|
||||||
this->~Callback();
|
|
||||||
new (this) Callback(func, obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Attach a static function with a bound pointer
|
|
||||||
* @param obj Pointer to object to bind to function
|
|
||||||
* @param func Static function to attach
|
|
||||||
* @deprecated
|
|
||||||
* Arguments to callback have been reordered to attach(func, arg)
|
|
||||||
*/
|
|
||||||
template <typename T, typename U>
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.1",
|
|
||||||
"Arguments to callback have been reordered to attach(func, arg)")
|
|
||||||
void attach(const U *obj, R(*func)(const T *, ArgTs...))
|
|
||||||
{
|
|
||||||
this->~Callback();
|
|
||||||
new (this) Callback(func, obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Attach a static function with a bound pointer
|
|
||||||
* @param obj Pointer to object to bind to function
|
|
||||||
* @param func Static function to attach
|
|
||||||
* @deprecated
|
|
||||||
* Arguments to callback have been reordered to attach(func, arg)
|
|
||||||
*/
|
|
||||||
template <typename T, typename U>
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.1",
|
|
||||||
"Arguments to callback have been reordered to attach(func, arg)")
|
|
||||||
void attach(volatile U *obj, R(*func)(volatile T *, ArgTs...))
|
|
||||||
{
|
|
||||||
this->~Callback();
|
|
||||||
new (this) Callback(func, obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Attach a static function with a bound pointer
|
|
||||||
* @param obj Pointer to object to bind to function
|
|
||||||
* @param func Static function to attach
|
|
||||||
* @deprecated
|
|
||||||
* Arguments to callback have been reordered to attach(func, arg)
|
|
||||||
*/
|
|
||||||
template <typename T, typename U>
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.1",
|
|
||||||
"Arguments to callback have been reordered to attach(func, arg)")
|
|
||||||
void attach(const volatile U *obj, R(*func)(const volatile T *, ArgTs...))
|
|
||||||
{
|
|
||||||
this->~Callback();
|
|
||||||
new (this) Callback(func, obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Assign a callback
|
/** Assign a callback
|
||||||
*/
|
*/
|
||||||
Callback &operator=(const Callback &that)
|
Callback &operator=(const Callback &that)
|
||||||
|
@ -818,70 +496,6 @@ Callback<R(ArgTs...)> callback(R(*func)(const volatile T *, ArgTs...), const vol
|
||||||
return Callback<R(ArgTs...)>(func, arg);
|
return Callback<R(ArgTs...)>(func, arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Create a callback class with type inferred from the arguments
|
|
||||||
*
|
|
||||||
* @param obj Optional pointer to object to bind to function
|
|
||||||
* @param func Static function to attach
|
|
||||||
* @return Callback with inferred type
|
|
||||||
* @deprecated
|
|
||||||
* Arguments to callback have been reordered to callback(func, arg)
|
|
||||||
*/
|
|
||||||
template <typename T, typename U, typename R, typename... ArgTs>
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.1",
|
|
||||||
"Arguments to callback have been reordered to callback(func, arg)")
|
|
||||||
Callback<R(ArgTs...)> callback(U *obj, R(*func)(T *, ArgTs...))
|
|
||||||
{
|
|
||||||
return Callback<R(ArgTs...)>(func, obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Create a callback class with type inferred from the arguments
|
|
||||||
*
|
|
||||||
* @param obj Optional pointer to object to bind to function
|
|
||||||
* @param func Static function to attach
|
|
||||||
* @return Callback with inferred type
|
|
||||||
* @deprecated
|
|
||||||
* Arguments to callback have been reordered to callback(func, arg)
|
|
||||||
*/
|
|
||||||
template <typename T, typename U, typename R, typename... ArgTs>
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.1",
|
|
||||||
"Arguments to callback have been reordered to callback(func, arg)")
|
|
||||||
Callback<R(ArgTs...)> callback(const U *obj, R(*func)(const T *, ArgTs...))
|
|
||||||
{
|
|
||||||
return Callback<R(ArgTs...)>(func, obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Create a callback class with type inferred from the arguments
|
|
||||||
*
|
|
||||||
* @param obj Optional pointer to object to bind to function
|
|
||||||
* @param func Static function to attach
|
|
||||||
* @return Callback with inferred type
|
|
||||||
* @deprecated
|
|
||||||
* Arguments to callback have been reordered to callback(func, arg)
|
|
||||||
*/
|
|
||||||
template <typename T, typename U, typename R, typename... ArgTs>
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.1",
|
|
||||||
"Arguments to callback have been reordered to callback(func, arg)")
|
|
||||||
Callback<R(ArgTs...)> callback(volatile U *obj, R(*func)(volatile T *, ArgTs...))
|
|
||||||
{
|
|
||||||
return Callback<R(ArgTs...)>(func, obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Create a callback class with type inferred from the arguments
|
|
||||||
*
|
|
||||||
* @param obj Optional pointer to object to bind to function
|
|
||||||
* @param func Static function to attach
|
|
||||||
* @return Callback with inferred type
|
|
||||||
* @deprecated
|
|
||||||
* Arguments to callback have been reordered to callback(func, arg)
|
|
||||||
*/
|
|
||||||
template <typename T, typename U, typename R, typename... ArgTs>
|
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.1",
|
|
||||||
"Arguments to callback have been reordered to callback(func, arg)")
|
|
||||||
Callback<R(ArgTs...)> callback(const volatile U *obj, R(*func)(const volatile T *, ArgTs...))
|
|
||||||
{
|
|
||||||
return Callback<R(ArgTs...)>(func, obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**@}*/
|
/**@}*/
|
||||||
|
|
||||||
/**@}*/
|
/**@}*/
|
||||||
|
|
Loading…
Reference in New Issue