version 3.3

VRS::MT::Task< RESULT_TYPE > Class Template Reference

Defines a specific interface for tasks generating a certain type of result. More...

#include <vrs/mt/taskmanager.h>

Inheritance diagram for VRS::MT::Task< RESULT_TYPE >:

VRS::MT::TaskBase VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

const RESULT_TYPE & result () const
 Returns the result of the computation task.

Protected Member Functions

 Task (SO< CallbackR< RESULT_TYPE > > taskCallback, double priority, double cancelIfNotStartedWithinSeconds)
 The protected constructor takes a VRS callback as input parameter.
 Task (const RESULT_TYPE &result)
 The protected constructor takes an already calculated result.
virtual void work ()
 Implement the work() method.

Friends

class TaskManager


Detailed Description

template<class RESULT_TYPE>
class VRS::MT::Task< RESULT_TYPE >

Defines a specific interface for tasks generating a certain type of result.

Constructor & Destructor Documentation

template<class RESULT_TYPE>
VRS::MT::Task< RESULT_TYPE >::Task ( SO< CallbackR< RESULT_TYPE > >  taskCallback,
double  priority,
double  cancelIfNotStartedWithinSeconds 
) [inline, protected]

The protected constructor takes a VRS callback as input parameter.

template<class RESULT_TYPE>
VRS::MT::Task< RESULT_TYPE >::Task ( const RESULT_TYPE &  result  )  [inline, protected]

The protected constructor takes an already calculated result.


Member Function Documentation

template<class RESULT_TYPE>
const RESULT_TYPE& VRS::MT::Task< RESULT_TYPE >::result (  )  const [inline]

Returns the result of the computation task.

If the task has not been finished, wait() is called before. If the result is not available (because the task has been canceled or an exception occured during task execution) an exception will be thrown.

template<class RESULT_TYPE>
virtual void VRS::MT::Task< RESULT_TYPE >::work (  )  [inline, protected, virtual]

Implement the work() method.

Implements VRS::MT::TaskBase.


Friends And Related Function Documentation

template<class RESULT_TYPE>
friend class TaskManager [friend]

Reimplemented from VRS::MT::TaskBase.


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

Generated on Mon May 21 06:00:33 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact