From ea7250a50a4042df7a906959f8c7114fde6f0054 Mon Sep 17 00:00:00 2001 From: mikee47 Date: Mon, 15 Jul 2024 22:29:50 +0100 Subject: [PATCH] Add Delegate class reference Breathe can't handle `Delegate< ReturnType(ParamTypes...) >` --- Sming/Core/Delegate.h | 4 ++++ docs/source/information/events.rst | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Sming/Core/Delegate.h b/Sming/Core/Delegate.h index 891795702d..2d8ff92a65 100644 --- a/Sming/Core/Delegate.h +++ b/Sming/Core/Delegate.h @@ -17,6 +17,10 @@ #include using namespace std::placeholders; +/** + * @brief Delegate class, encapsulates a std::function + * Added constructor template implements lambda callback which is more efficient than std::bind. + */ template class Delegate; /* undefined */ /** @brief Delegate class diff --git a/docs/source/information/events.rst b/docs/source/information/events.rst index 1632338168..572c06cc66 100644 --- a/docs/source/information/events.rst +++ b/docs/source/information/events.rst @@ -91,3 +91,7 @@ This flexibility comes at a cost, however: These are the main reasons why you should not use Delegates in an interrupt context. See :pull-request:`1734` for some further details about the relative speeds. + + +.. doxygenclass:: Delegate + :members: