mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #2191 from geky/callback-fp-deprecate
[api] Mark FunctionPointer and friends as deprecatedpull/2218/head
commit
51cd3cb972
|
@ -17,6 +17,7 @@
|
|||
#define MBED_FUNCTIONPOINTER_H
|
||||
|
||||
#include "Callback.h"
|
||||
#include "toolchain.h"
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
@ -28,10 +29,12 @@ namespace mbed {
|
|||
template <typename R, typename A1>
|
||||
class FunctionPointerArg1 : public Callback<R(A1)> {
|
||||
public:
|
||||
MBED_DEPRECATED("FunctionPointerArg1<R, A> has been replaced by Callback<R(A)>")
|
||||
FunctionPointerArg1(R (*function)(A1) = 0)
|
||||
: Callback<R(A1)>(function) {}
|
||||
|
||||
template<typename T>
|
||||
MBED_DEPRECATED("FunctionPointerArg1<R, A> has been replaced by Callback<R(A)>")
|
||||
FunctionPointerArg1(T *object, R (T::*member)(A1))
|
||||
: Callback<R(A1)>(object, member) {}
|
||||
|
||||
|
@ -43,10 +46,12 @@ public:
|
|||
template <typename R>
|
||||
class FunctionPointerArg1<R, void> : public Callback<R()> {
|
||||
public:
|
||||
MBED_DEPRECATED("FunctionPointer has been replaced by Callback<void()>")
|
||||
FunctionPointerArg1(R (*function)() = 0)
|
||||
: Callback<R()>(function) {}
|
||||
|
||||
template<typename T>
|
||||
MBED_DEPRECATED("FunctionPointer has been replaced by Callback<void()>")
|
||||
FunctionPointerArg1(T *object, R (T::*member)())
|
||||
: Callback<R()>(object, member) {}
|
||||
|
||||
|
|
Loading…
Reference in New Issue