The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Private Attributes | Static Private Attributes | List of all members
threading::async_operation Class Referenceabstract

#include <thread.hpp>

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 217 of file thread.hpp.

Member Enumeration Documentation

Enumerator
COMPLETED 
ABORTED 

Definition at line 221 of file thread.hpp.

Constructor & Destructor Documentation

threading::async_operation::async_operation ( )
inline

Definition at line 223 of file thread.hpp.

References active_.

virtual threading::async_operation::~async_operation ( )
inlinevirtual

Definition at line 229 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 233 of file thread.hpp.

References mutex_.

Referenced by execute().

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

Definition at line 244 of file thread.hpp.

References aborted_.

bool threading::async_operation::notify_finished ( )

Definition at line 144 of file thread.cpp.

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

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

Member Data Documentation

bool threading::async_operation::aborted_
private

Definition at line 248 of file thread.hpp.

Referenced by execute(), and is_aborted().

active_operation_list threading::async_operation::active_
staticprivate

Definition at line 253 of file thread.hpp.

Referenced by async_operation(), and execute().

condition threading::async_operation::finished_
private

Definition at line 249 of file thread.hpp.

Referenced by execute(), and notify_finished().

bool threading::async_operation::finishedVar_
private

Definition at line 250 of file thread.hpp.

Referenced by execute(), and notify_finished().

mutex threading::async_operation::mutex_
private

Definition at line 251 of file thread.hpp.

Referenced by get_mutex().

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

Definition at line 247 of file thread.hpp.

Referenced by execute().


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