Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

TAO_Condition Class Template 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. More...


Public Methods

 TAO_Condition (MUTEX &m)
 Initialize the condition variable. More...

 TAO_Condition (void)
 A default constructor. Since no lock is provided by the user, one will be created internally. More...

 ~TAO_Condition (void)
 Implicitly destroy the condition variable. More...

int wait (const ACE_Time_Value *abstime)
 Block on condition, or until absolute time-of-day has passed. More...

int wait (void)
 Block on condition. More...

int wait (MUTEX &mutex, const ACE_Time_Value *abstime=0)
 Block on condition or until absolute time-of-day has passed. More...

int signal (void)
 Signal one waiting thread. More...

int broadcast (void)
 Signal *all* waiting threads. More...

int remove (void)
 Explicitly destroy the condition variable. More...

MUTEX * mutex (void)
 Returns a reference to the underlying mutex_;. More...


Private Attributes

MUTEX * mutex_
 Reference to mutex lock. More...

int delete_lock_
 A flag to indicate whether the lock needs to be deleted. More...

TAO_SYNCH_CONDITION * cond_
 Condition variable. More...


Detailed Description

template<class MUTEX>
class TAO_Condition< MUTEX >

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

template<class MUTEX>
typedef MUTEX TAO_Condition::LOCK
 

Useful typedef.


Constructor & Destructor Documentation

template<class MUTEX>
TAO_Condition< MUTEX >::TAO_Condition MUTEX &    m
 

Initialize the condition variable.

template<class MUTEX>
TAO_Condition< MUTEX >::TAO_Condition void   
 

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

template<class MUTEX>
TAO_Condition< MUTEX >::~TAO_Condition void   
 

Implicitly destroy the condition variable.


Member Function Documentation

template<class MUTEX>
ACE_INLINE int TAO_Condition< MUTEX >::broadcast void   
 

Signal *all* waiting threads.

template<class MUTEX>
ACE_INLINE MUTEX * TAO_Condition< MUTEX >::mutex void   
 

Returns a reference to the underlying mutex_;.

template<class MUTEX>
ACE_INLINE int TAO_Condition< MUTEX >::remove void   
 

Explicitly destroy the condition variable.

template<class MUTEX>
ACE_INLINE int TAO_Condition< MUTEX >::signal void   
 

Signal one waiting thread.

template<class MUTEX>
ACE_INLINE int TAO_Condition< MUTEX >::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.

template<class MUTEX>
ACE_INLINE int TAO_Condition< MUTEX >::wait void   
 

Block on condition.

template<class MUTEX>
ACE_INLINE int TAO_Condition< MUTEX >::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.


Member Data Documentation

template<class MUTEX>
TAO_SYNCH_CONDITION* TAO_Condition::cond_ [private]
 

Condition variable.

template<class MUTEX>
int TAO_Condition::delete_lock_ [private]
 

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

template<class MUTEX>
MUTEX* TAO_Condition::mutex_ [private]
 

Reference to mutex lock.


The documentation for this class was generated from the following files:
Generated on Thu Oct 10 18:28:15 2002 for TAO by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001