saga::task Class Reference

Brief description starts here. More...

#include <task.hpp>

Inheritance diagram for saga::task:

Inheritance graph
[legend]

List of all members.

Public Types

typedef task_base::state state
 Brief description starts here.

Public Member Functions

 task (saga::task_base::state t=saga::task_base::New)
 Brief description starts here.
 ~task ()
 Destroys the object.
void run (void)
 Starts the asynchronous operation.
void cancel (void)
 Cancels the asynchronous operation.
bool wait (double timeout=-1.0)
 Waits for the task to finish.
state get_state ()
 Gets the state of the task.
void rethrow ()
 Re-throws any exception a failed task caught.
saga::object get_object () const
 Gets the object from which this task was created.
template<typename Retval>
Retval & get_result ()
 Gets the result of the asynchronous operation.
template<typename Retval>
Retval const & get_result () const
void get_result ()
 Synchronization for API functions with no return value only.
void get_result () const

Friends

bool operator== (task const &lhs, task const &rhs)
 Brief description starts here.


Detailed Description

Brief description starts here.

/*! Operations performed in highly heterogeneous distributed environments may take a long time to complete, and it is thus desirable to have the ability to perform operations in an asynchronous manner. The SAGA task model provides this ability to all other SAGA classes.


Member Typedef Documentation

Brief description starts here.

Reimplemented from saga::task_base.


Constructor & Destructor Documentation

saga::task::task ( saga::task_base::state  t = saga::task_base::New  )  [explicit]

Brief description starts here.

saga::task::~task ( void   ) 

Destroys the object.


Member Function Documentation

void saga::task::run ( void   ) 

Starts the asynchronous operation.

Reimplemented in saga::job::job.

void saga::task::cancel ( void   ) 

Cancels the asynchronous operation.

Parameters:
timeout Time for freeing resources.

bool saga::task::wait ( double  timeout = -1.0  ) 

Waits for the task to finish.

Parameters:
timeout Second to wait
Returns:
Indicating if the task is done running.

Reimplemented in saga::job::job.

task::state saga::task::get_state ( void   ) 

Gets the state of the task.

Returns:
State of the task.

Reimplemented in saga::job::job.

Referenced by get_result(), and rethrow().

void saga::task::rethrow (  ) 

Re-throws any exception a failed task caught.

References saga::task_base::Failed, and get_state().

saga::object saga::task::get_object (  )  const

Gets the object from which this task was created.

Returns:
Object this task was created from.

template<typename Retval>
void saga::task::get_result (  )  [inline]

template<typename Retval>
void saga::task::get_result (  )  const [inline]

void saga::task::get_result (  ) 

Synchronization for API functions with no return value only.

void saga::task::get_result (  )  const


Friends And Related Function Documentation

bool operator== ( task const &  lhs,
task const &  rhs 
) [friend]

Brief description starts here.


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

Generated on Mon Aug 24 09:04:05 2009 for SAGA C++ API by  doxygen 1.5.6