Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BLE_API mbed-dev-bin nRF51822
Fork of microbit-dal by
MemberFunctionCallback Class Reference
Class definition for a MemberFunctionCallback. More...
#include <MemberFunctionCallback.h>
Public Member Functions | |
| template<typename T > | |
| MemberFunctionCallback (T *object, void(T::*method)(MicroBitEvent e)) | |
| Constructor.   | |
| bool | operator== (const MemberFunctionCallback &mfc) | 
| A comparison of two MemberFunctionCallback objects.   | |
| void | fire (MicroBitEvent e) | 
| Calls the method reference held by this MemberFunctionCallback.   | |
Detailed Description
Class definition for a MemberFunctionCallback.
C++ member functions (also known as methods) have a more complex representation than normal C functions. This class allows a reference to a C++ member function to be stored then called at a later date.
This class is used extensively by the MicroBitMessageBus to deliver events to C++ methods.
Definition at line 44 of file MemberFunctionCallback.h.
Constructor & Destructor Documentation
| MemberFunctionCallback | ( | T * | object, | 
| void(T::*)(MicroBitEvent e) | method | ||
| ) | 
Constructor.
Creates a MemberFunctionCallback based on a pointer to given method.
- Parameters:
 - 
  
object The object the callback method should be invooked on. method The method to invoke.  
Definition at line 86 of file MemberFunctionCallback.h.
Member Function Documentation
| void fire | ( | MicroBitEvent | e ) | 
Calls the method reference held by this MemberFunctionCallback.
Class definition for a MemberFunctionCallback.
- Parameters:
 - 
  
e The event to deliver to the method  
C++ member functions (also known as methods) have a more complex representation than normal C functions. This class allows a reference to a C++ member function to be stored then called at a later date.
This class is used extensively by the MicroBitMessageBus to deliver events to C++ methods. Calls the method reference held by this MemberFunctionCallback.
- Parameters:
 - 
  
e The event to deliver to the method  
Definition at line 45 of file MemberFunctionCallback.cpp.
| bool operator== | ( | const MemberFunctionCallback & | mfc ) | 
A comparison of two MemberFunctionCallback objects.
- Returns:
 - true if the given MemberFunctionCallback is equivalent to this one, false otherwise.
 
Definition at line 55 of file MemberFunctionCallback.cpp.
Generated on Tue Jul 12 2022 20:18:16 by
 1.7.2 
    