44 callbacks_.push_back(callback);
53 for(
auto& callback : callbacks_)
60 std::vector<std::function<void(Ts...)>> callbacks_;
Action is an utility class loosely based on the observer pattern and close to C# Action class.
Definition: action_utility.h:36
void Execute(Ts ... args)
Execute is a method that calls the functions registered in the callbacks_.
Definition: action_utility.h:51
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...
Definition: action_utility.h:42