RR Thread Pool
 All Classes Functions Typedefs Groups Pages
Public Member Functions | List of all members
TaskFunction< Function > Class Template Reference

A task that executes a function. More...

#include <Task.h>

Inheritance diagram for TaskFunction< Function >:
Inheritance graph
[legend]
Collaboration diagram for TaskFunction< Function >:
Collaboration graph
[legend]

Public Member Functions

 TaskFunction (Function &function)
 Constructs the task from a passed function. More...
 
virtual void execute ()
 
- Public Member Functions inherited from ITask
virtual ~ITask ()
 Destructor.
 
virtual void cancel ()
 Cancels the task.
 
- Public Member Functions inherited from IMessage
virtual ~IMessage ()
 Destructor.
 

Detailed Description

template<typename Function>
class TaskFunction< Function >

A task that executes a function.

Template Parameters
FunctionA function class that can be called without any parameter.

Constructor & Destructor Documentation

template<typename Function >
TaskFunction< Function >::TaskFunction ( Function &  function)
inline

Constructs the task from a passed function.

Takes a reference to the function in order to call it later.

Member Function Documentation

template<typename Function >
virtual void TaskFunction< Function >::execute ( )
inlinevirtual

Executes the task.

Calls the function without any parameter.

Implements ITask.


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