Aria  2.8.0
ArCondition Class Reference

Threading condition wrapper class. More...

#include <ArCondition.h>

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.
 
const char * getLogName ()
 
void setLogName (const char *logName)
 
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
 
std::string myLogName
 
ArMutex myMutex
 

Static Protected Attributes

static ArStrMap ourStrMap
 

Detailed Description

Threading condition wrapper class.

Examples:
threadExample.cpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
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: