![]() |
Soldered 125kHz RFID board Arduino library 1.0.0
Library for Soldered 125kHz RFID board.
|
#include <MultiDelegate.h>
Inherits delegate::detail::MultiDelegate< Delegate, Delegate::target_type, false, 32 >.
The MultiDelegate class template can be specialized to either a queue or an event multiplexer. It is designed to be used with Delegate, the efficient runtime wrapper for C function ptr and C++ std::function.
Delegate | specifies the concrete type that MultiDelegate bases the queue or event multiplexer on. |
ISQUEUE | modifies the generated MultiDelegate class in subtle ways. In queue mode (ISQUEUE == true), the value of QUEUE_CAPACITY enforces the maximum number of simultaneous items the queue can contain. This is exploited to minimize the use of new and delete by reusing already allocated items, thus reducing heap fragmentation. In event multiplexer mode (ISQUEUE = false), new and delete are used for allocation of the event handler items. If the result type of the function call operator of Delegate is void, calling a MultiDelegate queue removes each item after calling it; a Multidelegate event multiplexer keeps event handlers until explicitly removed. If the result type of the function call operator of Delegate is non-void, in a MultiDelegate queue the type-conversion to bool of that result determines if the item is immediately removed or kept after each call: if true is returned, the item is removed. A Multidelegate event multiplexer keeps event handlers until they are explicitly removed. |
QUEUE_CAPACITY | is only used if ISQUEUE == true. Then, it sets the maximum capacity that the queue dynamically allocates from the heap. Unused items are not returned to the heap, but are managed by the MultiDelegate instance during its own lifetime for efficiency. |