Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages | Examples

ArCondition Class Reference

#include <ArCondition.h>

List of all members.


Detailed Description

Threading condition wrapper class.
Examples:

threadExample.cpp.


Public Types

enum  {
  STATUS_FAILED = 1, STATUS_FAILED_DESTROY, STATUS_FAILED_INIT, STATUS_WAIT_TIMEDOUT,
  STATUS_WAIT_INTR, STATUS_MUTEX_FAILED_INIT, STATUS_MUTEX_FAILED
}
typedef pthread_cond_t CondType

Public Member Functions

 ArCondition ()
 Constructor.
int broadcast ()
 Broadcast a signal to all threads waiting.
const char * getError (int messageNumber) const
 Translate error into string.
int signal ()
 Signal the thread waiting.
int timedWait (unsigned int msecs)
 Wait for a signal for a period of time in milliseconds.
int wait ()
 Wait for a signal.
virtual ~ArCondition ()
 Desctructor.

Protected Attributes

CondType myCond
bool myFailedInit
ArMutex myMutex

Static Protected Attributes

static ArStrMap ourStrMap


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
STATUS_FAILED  General failure.
STATUS_FAILED_DESTROY  Another thread is waiting on this condition so it can not be destroyed.
STATUS_FAILED_INIT  Failed to initialize thread. Requested action is imposesible.
STATUS_WAIT_TIMEDOUT  The timedwait timed out before signaling.
STATUS_WAIT_INTR  The wait was interupted by a signal.
STATUS_MUTEX_FAILED_INIT  The underlying mutex failed to init.
STATUS_MUTEX_FAILED  The underlying mutex failed in some fashion.


The documentation for this class was generated from the following files:
Generated on Thu Jan 7 10:34:40 2010 for Aria by  doxygen 1.4.2