Public Types | Public Member Functions | Private Attributes | Static Private Attributes

threading::async_operation Class Reference

#include <thread.hpp>

Collaboration diagram for threading::async_operation:
Collaboration graph
[legend]

List of all members.

Public Types

enum  RESULT { COMPLETED, ABORTED }

Public Member Functions

 async_operation ()
virtual ~async_operation ()
RESULT execute (async_operation_ptr this_ptr, waiter &wait)
mutexget_mutex ()
virtual void run ()=0
bool notify_finished ()
bool is_aborted () const

Private Attributes

boost::scoped_ptr< threadthread_
bool aborted_
condition finished_
bool finishedVar_
mutex mutex_

Static Private Attributes

static active_operation_list active_

Detailed Description

Definition at line 214 of file thread.hpp.


Member Enumeration Documentation

Enumerator:
COMPLETED 
ABORTED 

Definition at line 218 of file thread.hpp.


Constructor & Destructor Documentation

threading::async_operation::async_operation (  )  [inline]

Definition at line 220 of file thread.hpp.

References active_.

virtual threading::async_operation::~async_operation (  )  [inline, virtual]

Definition at line 226 of file thread.hpp.


Member Function Documentation

async_operation::RESULT threading::async_operation::execute ( async_operation_ptr  this_ptr,
waiter wait 
)
mutex& threading::async_operation::get_mutex (  )  [inline]

Definition at line 230 of file thread.hpp.

References mutex_.

Referenced by execute().

Here is the caller graph for this function:

bool threading::async_operation::is_aborted (  )  const [inline]

Definition at line 241 of file thread.hpp.

References aborted_.

bool threading::async_operation::notify_finished (  ) 

Definition at line 145 of file thread.cpp.

References finished_, finishedVar_, and threading::condition::notify_one().

Here is the call graph for this function:

virtual void threading::async_operation::run (  )  [pure virtual]

Member Data Documentation

Definition at line 245 of file thread.hpp.

Referenced by execute(), and is_aborted().

Definition at line 250 of file thread.hpp.

Referenced by async_operation(), and execute().

Definition at line 246 of file thread.hpp.

Referenced by execute(), and notify_finished().

Definition at line 247 of file thread.hpp.

Referenced by execute(), and notify_finished().

Definition at line 248 of file thread.hpp.

Referenced by get_mutex().

boost::scoped_ptr<thread> threading::async_operation::thread_ [private]

Definition at line 244 of file thread.hpp.

Referenced by execute().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:26:11 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs