CallbackMap< T, E > Class Template Reference
HiCR
|
HiCR::tasking::CallbackMap< T, E > Class Template Reference
#include <callbackMap.hpp>
Public Member Functions | |
__INLINE__ void | clear () |
__INLINE__ void | removeCallback (const E callback) |
__INLINE__ void | setCallback (const E callback, callbackFc_t< T > fc) |
__INLINE__ void | trigger (T arg, const E callback) const |
__INLINE__ bool | isCallbackSet (const E callback) const |
Detailed Description
template<class T, class E>
class HiCR::tasking::CallbackMap< T, E >
class HiCR::tasking::CallbackMap< T, E >
Defines a map that relates task-related callbacks to their corresponding callback.
The callback is defined by the user and manually triggered by other (e.g., Task) classes, as the corresponding callback occurs.
Member Function Documentation
◆ clear()
template<class T , class E >
|
inline |
Clears the callback map (no callbacks will be triggered)
◆ isCallbackSet()
template<class T , class E >
|
inline |
Checks whether the specified callback is set
- Parameters
-
[in] callback The callback to check for
- Returns
- True, if the callback has been set; false, otherwise
◆ removeCallback()
template<class T , class E >
|
inline |
Remove a particular event's callback from the map
- Parameters
-
[in] callback The callback to remove from the map
◆ setCallback()
template<class T , class E >
|
inline |
Adds a callback for a particular event
- Parameters
-
[in] callback The callback to add [in] fc The callback function to call when the callback is triggered
◆ trigger()
template<class T , class E >
|
inline |
Triggers the execution of the callback function for a given event
- Parameters
-
[in] arg The argument to the trigger function. [in] callback The triggered callback.
The documentation for this class was generated from the following file:
- /home/runner/work/HiCR/HiCR/include/hicr/frontends/tasking/callbackMap.hpp
Generated by