Action is an utility class loosely based on the observer pattern and close to C# Action class.
More...
#include <action_utility.h>
|
| void | RegisterCallback (const std::function< void(Ts ...)> &callback) |
| | RegisterCallback is a method that registers a function that will be called when the Execute method is called. More...
|
| |
| void | Execute (Ts ... args) |
| | Execute is a method that calls the functions registered in the callbacks_. More...
|
| |
template<class ... Ts>
class core::Action< Ts >
Action is an utility class loosely based on the observer pattern and close to C# Action class.
- Template Parameters
-
| Ts | arguments types of the callback function |
◆ Execute()
Execute is a method that calls the functions registered in the callbacks_.
- Parameters
-
| args | are the arguments needed to call the registered functions. |
◆ RegisterCallback()
template<class ... Ts>
| void core::Action< Ts >::RegisterCallback |
( |
const std::function< void(Ts ...)> & |
callback | ) |
|
|
inline |
RegisterCallback is a method that registers a function that will be called when the Execute method is called.
- Parameters
-
| callback | is a function to be called when calling Execute |
The documentation for this class was generated from the following file: