saga::task Class Reference

#include <task.hpp>

Inheritance diagram for saga::task:

saga::object saga::detail::monitorable< Derived > saga::task_base saga::job::job saga::cpr::job saga::job::self saga::cpr::self

List of all members.


Detailed Description

Brief description starts here.

/*! Operations performed in highly heterogenous 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.

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 (void) const
 Gets the state of the task.
void rethrow () const
 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

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


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.

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

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

Gets the state of the task.

Returns:
State of the task.

Reimplemented in saga::job::job.

Referenced by rethrow(), and wait().

void saga::task::rethrow (  )  const

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>
SAGA_EXPORT void saga::task::get_result (  )  [inline]

template<typename Retval>
SAGA_EXPORT 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

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

Brief description starts here.


Generated on Mon Aug 25 13:15:45 2008 for SAGA C++ API by  doxygen 1.5.6