mirror of https://github.com/ARMmbed/mbed-os.git
Deprecate CallChain
This patch deprecates the CallChain class since it is an internal API (not in mbed.h) and is only being used by InterruptManager which is also deprecated.pull/5393/head
parent
8deef6a699
commit
891b06e61b
|
@ -1,3 +1,10 @@
|
|||
|
||||
// Suppress deprecation warnings since this whole
|
||||
// class is deprecated already
|
||||
#include "mbed_toolchain.h"
|
||||
#undef MBED_DEPRECATED_SINCE
|
||||
#define MBED_DEPRECATED_SINCE(...)
|
||||
|
||||
#include "platform/CallChain.h"
|
||||
#include "cmsis.h"
|
||||
#include "platform/mbed_critical.h"
|
||||
|
|
|
@ -72,7 +72,12 @@ public:
|
|||
*
|
||||
* @param size (optional) Initial size of the chain
|
||||
*/
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.6", "This class is not part of the "
|
||||
"public API of mbed-os and is being removed in the future.")
|
||||
CallChain(int size = 4);
|
||||
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.6", "This class is not part of the "
|
||||
"public API of mbed-os and is being removed in the future.")
|
||||
virtual ~CallChain();
|
||||
|
||||
/** Add a function at the end of the chain
|
||||
|
@ -82,6 +87,8 @@ public:
|
|||
* @returns
|
||||
* The function object created for 'func'
|
||||
*/
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.6", "This class is not part of the "
|
||||
"public API of mbed-os and is being removed in the future.")
|
||||
pFunctionPointer_t add(Callback<void()> func);
|
||||
|
||||
/** Add a function at the end of the chain
|
||||
|
@ -111,6 +118,8 @@ public:
|
|||
* @returns
|
||||
* The function object created for 'func'
|
||||
*/
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.6", "This class is not part of the "
|
||||
"public API of mbed-os and is being removed in the future.")
|
||||
pFunctionPointer_t add_front(Callback<void()> func);
|
||||
|
||||
/** Add a function at the beginning of the chain
|
||||
|
@ -135,6 +144,8 @@ public:
|
|||
|
||||
/** Get the number of functions in the chain
|
||||
*/
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.6", "This class is not part of the "
|
||||
"public API of mbed-os and is being removed in the future.")
|
||||
int size() const;
|
||||
|
||||
/** Get a function object from the chain
|
||||
|
@ -144,6 +155,8 @@ public:
|
|||
* @returns
|
||||
* The function object at position 'i' in the chain
|
||||
*/
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.6", "This class is not part of the "
|
||||
"public API of mbed-os and is being removed in the future.")
|
||||
pFunctionPointer_t get(int i) const;
|
||||
|
||||
/** Look for a function object in the call chain
|
||||
|
@ -153,10 +166,14 @@ public:
|
|||
* @returns
|
||||
* The index of the function object if found, -1 otherwise.
|
||||
*/
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.6", "This class is not part of the "
|
||||
"public API of mbed-os and is being removed in the future.")
|
||||
int find(pFunctionPointer_t f) const;
|
||||
|
||||
/** Clear the call chain (remove all functions in the chain).
|
||||
*/
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.6", "This class is not part of the "
|
||||
"public API of mbed-os and is being removed in the future.")
|
||||
void clear();
|
||||
|
||||
/** Remove a function object from the chain
|
||||
|
@ -166,15 +183,24 @@ public:
|
|||
* @returns
|
||||
* true if the function object was found and removed, false otherwise.
|
||||
*/
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.6", "This class is not part of the "
|
||||
"public API of mbed-os and is being removed in the future.")
|
||||
bool remove(pFunctionPointer_t f);
|
||||
|
||||
/** Call all the functions in the chain in sequence
|
||||
*/
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.6", "This class is not part of the "
|
||||
"public API of mbed-os and is being removed in the future.")
|
||||
void call();
|
||||
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.6", "This class is not part of the "
|
||||
"public API of mbed-os and is being removed in the future.")
|
||||
void operator ()(void) {
|
||||
call();
|
||||
}
|
||||
|
||||
MBED_DEPRECATED_SINCE("mbed-os-5.6", "This class is not part of the "
|
||||
"public API of mbed-os and is being removed in the future.")
|
||||
pFunctionPointer_t operator [](int i) const {
|
||||
return get(i);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue