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

Condition.cpp

Go to the documentation of this file.
00001 #ifndef TAO_CONDITION_CPP
00002 #define TAO_CONDITION_CPP
00003 #include "Condition.h"
00004 #include "ace/Log_Msg.h"
00005 
00006 #if !defined (__ACE_INLINE__)
00007 # include "tao/Condition.inl"
00008 #endif /* __ACE_INLINE__ */
00009 
00010 
00011 ACE_RCSID (TAO,
00012            Condition,
00013            "$Id: Condition.cpp,v 1.1.1.1 2003/02/21 18:36:44 chad Exp $")
00014 
00015 template <class MUTEX>
00016 TAO_Condition<MUTEX>::TAO_Condition (MUTEX &m)
00017 
00018   : mutex_ (&m),
00019     delete_lock_ (0),
00020     cond_ (0)
00021 {
00022   // @@todo: Need to add the allocatore here..
00023   ACE_NEW (this->cond_,
00024            TAO_SYNCH_CONDITION (*this->mutex_));
00025 }
00026 
00027 template <class MUTEX>
00028 TAO_Condition<MUTEX>::TAO_Condition (void)
00029     : mutex_ (0),
00030       delete_lock_ (0),
00031       cond_ (0)
00032 
00033 {
00034   // @@todo: Need to add the allocatore here..
00035 
00036   ACE_NEW (this->mutex_,
00037            MUTEX);
00038 
00039   this->delete_lock_ = 1;
00040 
00041   ACE_NEW (this->cond_,
00042            TAO_SYNCH_CONDITION (*this->mutex_));
00043 }
00044 
00045 
00046 template <class MUTEX>
00047 TAO_Condition<MUTEX>::~TAO_Condition (void)
00048 {
00049   if (this->remove () == -1)
00050     ACE_ERROR ((LM_ERROR,
00051                 ACE_LIB_TEXT ("%p\n"),
00052                 ACE_LIB_TEXT ("TAO_Condition::~TAO_Condition")));
00053 
00054   delete this->cond_;
00055 
00056   if (this->delete_lock_)
00057     delete this->mutex_;
00058 }
00059 
00060 #endif /* TAO_CONDITION_CPP*/

Generated on Mon Jun 16 13:48:05 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002