threading::condition Class Reference

#include <thread.hpp>

List of all members.

Public Types

enum  WAIT_TIMEOUT_RESULT { WAIT_OK, WAIT_TIMEOUT, WAIT_ERROR }

Public Member Functions

 condition ()
 ~condition ()
bool wait (const mutex &m)
WAIT_TIMEOUT_RESULT wait_timeout (const mutex &m, unsigned int timeout)
bool notify_one ()
bool notify_all ()

Private Member Functions

 condition (const condition &)
void operator= (const condition &)

Private Attributes

SDL_cond *const cond_


Detailed Description

Definition at line 131 of file thread.hpp.


Member Enumeration Documentation

Enumerator:
WAIT_OK 
WAIT_TIMEOUT 
WAIT_ERROR 

Definition at line 154 of file thread.hpp.


Constructor & Destructor Documentation

threading::condition::condition (  ) 

Definition at line 111 of file thread.cpp.

threading::condition::~condition (  ) 

Definition at line 114 of file thread.cpp.

References cond_.

threading::condition::condition ( const condition  )  [private]


Member Function Documentation

bool threading::condition::wait ( const mutex m  ) 

Definition at line 119 of file thread.cpp.

References cond_, and threading::mutex::m_.

Referenced by process_queue().

condition::WAIT_TIMEOUT_RESULT threading::condition::wait_timeout ( const mutex m,
unsigned int  timeout 
)

Definition at line 124 of file thread.cpp.

References cond_, ERR_G, threading::mutex::m_, WAIT_ERROR, WAIT_OK, and WAIT_TIMEOUT.

Referenced by threading::async_operation::execute().

bool threading::condition::notify_one (  ) 

bool threading::condition::notify_all (  ) 

Definition at line 146 of file thread.cpp.

References cond_, and ERR_G.

Referenced by network_worker_pool::manager::~manager().

void threading::condition::operator= ( const condition  )  [private]


Member Data Documentation

SDL_cond* const threading::condition::cond_ [private]

Definition at line 181 of file thread.hpp.

Referenced by notify_all(), notify_one(), wait(), wait_timeout(), and ~condition().


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

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs