|
Embedded Template Library 1.0
|
#include <callback_service.h>
Public Member Functions | |
| callback_service () | |
| template<size_t Id> | |
| void | register_callback (etl::ifunction< size_t > &callback) |
| void | register_callback (size_t id, etl::ifunction< size_t > &callback) |
| void | register_unhandled_callback (etl::ifunction< size_t > &callback) |
| template<size_t Id> | |
| void | callback () |
| void | callback (size_t id) |
An indexed callback service.
| Range | The number of callbacks to handle. |
| Offset | The lowest callback id value. The callback ids must range between Offset and Offset + Range - 1. |
|
inline |
Reset the callback service. Sets all callbacks to the internal default.
|
inline |
Executes the callback function for the index. Compile time assert if the id is out of range.
| Id | The id of the callback. |
|
inline |
Executes the callback function for the index.
| id | Id of the callback. |
|
inline |
Registers a callback for the specified id. Compile time assert if the id is out of range.
| Id | The id of the callback. |
| callback | Reference to the callback. |
|
inline |
Registers a callback for the specified id. No action if the id is out of range.
| id | Id of the callback. |
| callback | Reference to the callback. |
|
inline |
Registers an alternative callback for unhandled ids.
| callback | A reference to the user supplied 'unhandled' callback. |