TAO  2.0.6
Public Types | Public Member Functions | Private Attributes
TAO_Condition Class Reference

Same as to the ACE_Condition variable wrapper. More...

#include <Condition.h>

Inheritance diagram for TAO_Condition:
Inheritance graph
[legend]
Collaboration diagram for TAO_Condition:
Collaboration graph
[legend]

List of all members.

Public Types

typedef MUTEX LOCK
 Useful typedef.

Public Member Functions

 TAO_Condition (MUTEX &m)
 Initialize the condition variable.
 TAO_Condition (void)
 ~TAO_Condition (void)
 Implicitly destroy the condition variable.
int wait (const ACE_Time_Value *abstime)
int wait (void)
 Block on condition.
int wait (MUTEX &mutex, const ACE_Time_Value *abstime=0)
int signal (void)
 Signal one waiting thread.
int broadcast (void)
 Signal *all* waiting threads.
int remove (void)
 Explicitly destroy the condition variable.
MUTEX * mutex (void)
 Returns a reference to the underlying mutex_;.

Private Attributes

MUTEX * mutex_
 Reference to mutex lock.
bool delete_lock_
 A flag to indicate whether the lock needs to be deleted.
TAO_SYNCH_CONDITION * cond_
 Condition variable.

Detailed Description

Same as to the ACE_Condition variable wrapper.

This class differs from ACE_Condition in that it uses a TAO_SYNCH_CONDITION instead of ACE_cond_t under the hood to provide blocking.


Member Typedef Documentation

typedef MUTEX TAO_Condition::LOCK

Useful typedef.


Constructor & Destructor Documentation

TAO_Condition::TAO_Condition ( MUTEX &  m)

Initialize the condition variable.

TAO_Condition::TAO_Condition ( void  )

A default constructor. Since no lock is provided by the user, one will be created internally.

TAO_Condition::~TAO_Condition ( void  )

Implicitly destroy the condition variable.


Member Function Documentation

int TAO_Condition::broadcast ( void  )

Signal *all* waiting threads.

MUTEX * TAO_Condition::mutex ( void  )

Returns a reference to the underlying mutex_;.

int TAO_Condition::remove ( void  )

Explicitly destroy the condition variable.

int TAO_Condition::signal ( void  )

Signal one waiting thread.

int TAO_Condition::wait ( const ACE_Time_Value abstime)

Block on condition, or until absolute time-of-day has passed. If abstime == 0 use "blocking" <wait> semantics. Else, if <abstime> != 0 and the call times out before the condition is signaled <wait> returns -1 and sets errno to ETIME.

int TAO_Condition::wait ( void  )

Block on condition.

int TAO_Condition::wait ( MUTEX &  mutex,
const ACE_Time_Value abstime = 0 
)

Block on condition or until absolute time-of-day has passed. If abstime == 0 use "blocking" wait() semantics on the <mutex> passed as a parameter (this is useful if you need to store the <Condition> in shared memory). Else, if <abstime> != 0 and the call times out before the condition is signaled <wait> returns -1 and sets errno to ETIME.


Member Data Documentation

TAO_SYNCH_CONDITION* TAO_Condition::cond_ [private]

Condition variable.

A flag to indicate whether the lock needs to be deleted.

MUTEX* TAO_Condition::mutex_ [private]

Reference to mutex lock.


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