Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / protocols / ace / TMCast / Messaging.hpp
blob883f52273e5a5f545c5f5599bd7bb44eeb267d2d
1 // author : Boris Kolpackov <boris@dre.vanderbilt.edu>
3 #ifndef TMCAST_MESSAGING_HPP
4 #define TMCAST_MESSAGING_HPP
6 #include <ace/Synch.h>
7 #include <ace/Bound_Ptr.h>
9 #include "MTQueue.hpp"
11 namespace ACE_TMCast
13 class Message
15 public:
16 virtual
17 ~Message () {}
20 typedef
21 ACE_Strong_Bound_Ptr<Message, ACE_SYNCH_MUTEX>
22 MessagePtr;
24 typedef
25 MTQueue<MessagePtr, ACE_Thread_Mutex, ACE_Condition<ACE_Thread_Mutex> >
26 MessageQueue;
28 struct MessageQueueAutoLock
30 MessageQueueAutoLock (MessageQueue& q)
31 : q_ (q)
33 q_.lock ();
36 void
37 unlock ()
39 q_.unlock ();
42 ~MessageQueueAutoLock ()
44 q_.unlock ();
47 private:
48 MessageQueue& q_;
52 #endif // TMCAST_MESSAGING_HPP