Radium Engine
1.5.0
|
#include <Core/Tasks/Task.hpp>
Public Member Functions | |
FunctionTask (const std::function< void(void)> &f, const std::string &name) | |
Create a function task. | |
virtual std::string | getName () const override |
Return the provided task name. | |
virtual void | process () override |
Call the function. | |
Public Member Functions inherited from Ra::Core::Task | |
virtual | ~Task () |
Destructor. | |
Protected Attributes | |
std::function< void(void)> | m_f |
std::string | m_name |
The function to call. | |
A wrapper for a task around a std::function, which must be of type void(void) The process() method will simply call the provided function. Use std::bind to bind the arguments to the function object when creating the task.