|
FastArduino
v1.9
C++ library to build fast but small Arduino/AVR projects
|
Holder of a "virtual method". More...
#include <fastarduino/virtual.h>
Public Types | |
| using | METHOD = void(*)(void *) |
| The type of function that will get the call. | |
Public Member Functions | |
| VirtualMethod (const VirtualMethod &)=default | |
| VirtualMethod & | operator= (const VirtualMethod &)=default |
| VirtualMethod (METHOD method=nullptr, void *arg=nullptr) | |
Create a VirtualMethod with the given arguments. More... | |
| void | operator() () const |
| Call dispatching method. | |
Holder of a "virtual method".
Typical use:
|
inlineexplicit |
Create a VirtualMethod with the given arguments.
| method | the method that will receive the call and shall dispatch to the proper method of the proper object, which pointer is given by arg |
| arg | a pointer to the object that should receive the actual dispatch |