Skip to content

Commit

Permalink
Add Delegate class reference
Browse files Browse the repository at this point in the history
Breathe can't handle `Delegate< ReturnType(ParamTypes...) >`
  • Loading branch information
mikee47 committed Jul 15, 2024
1 parent 9bfc46a commit ea7250a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sming/Core/Delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
#include <functional>
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 <typename> class Delegate; /* undefined */

/** @brief Delegate class
Expand Down
4 changes: 4 additions & 0 deletions docs/source/information/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

0 comments on commit ea7250a

Please sign in to comment.