GPR5100 - Rollback
Loading...
Searching...
No Matches
Public Member Functions | List of all members
core::Action< Ts > Class Template Reference

Action is an utility class loosely based on the observer pattern and close to C# Action class. More...

#include <action_utility.h>

Public Member Functions

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...
 

Detailed Description

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
Tsarguments types of the callback function

Member Function Documentation

◆ Execute()

template<class ... Ts>
void core::Action< Ts >::Execute ( Ts ...  args)
inline

Execute is a method that calls the functions registered in the callbacks_.

Parameters
argsare 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
callbackis a function to be called when calling Execute

The documentation for this class was generated from the following file: