Radium Engine  1.5.0
Ra::Core::FunctionTask Class Reference

#include <Core/Tasks/Task.hpp>

+ Inheritance diagram for Ra::Core::FunctionTask:
+ Collaboration diagram for Ra::Core::FunctionTask:

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.
 

Detailed Description

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.

Definition at line 29 of file Task.hpp.


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