Typed_SV_Message_Queue.inl

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Typed_SV_Message_Queue.inl,v 4.2 2005/10/28 23:55:10 ossama Exp
00004 
00005 #include "ace/SV_Message_Queue.h"
00006 
00007 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00008 
00009 template <class T> ACE_INLINE int
00010 ACE_Typed_SV_Message_Queue<T>::open (key_t external_id,
00011                                      int create,
00012                                      int perms)
00013 {
00014   ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::open");
00015   return this->message_queue_.open (external_id, create, perms);
00016 }
00017 
00018 // What does it mean to close a message queue?!
00019 
00020 template <class T> ACE_INLINE int
00021 ACE_Typed_SV_Message_Queue<T>::close (void)
00022 {
00023   ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::close");
00024   return 1;
00025 }
00026 
00027 template <class T> ACE_INLINE int
00028 ACE_Typed_SV_Message_Queue<T>::recv (ACE_Typed_SV_Message<T> &mb,
00029                                      int mflags)
00030 {
00031   ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::recv");
00032 
00033   int length =
00034     this->message_queue_.recv (reinterpret_cast<ACE_SV_Message &> (mb),
00035                                mb.max_size (),
00036                                mb.type (),
00037                                mflags);
00038   if (length != -1)
00039     mb.length (length);
00040 
00041   return length;
00042 }
00043 
00044 template <class T> ACE_INLINE int
00045 ACE_Typed_SV_Message_Queue<T>::send (const ACE_Typed_SV_Message<T> &mb,
00046                                      int mflags)
00047 {
00048   ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::send");
00049   return
00050     this->message_queue_.send (
00051       reinterpret_cast<ACE_SV_Message &> (
00052         const_cast<ACE_Typed_SV_Message<T> &> (mb)),
00053       mb.length (),
00054       mflags);
00055 }
00056 
00057 template <class T> ACE_INLINE int
00058 ACE_Typed_SV_Message_Queue<T>::remove (void)
00059 {
00060   ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::remove");
00061 
00062   return this->message_queue_.remove ();
00063 }
00064 
00065 template <class T> ACE_INLINE int
00066 ACE_Typed_SV_Message_Queue<T>::control (int option,
00067                                         void *arg)
00068 {
00069   ACE_TRACE ("ACE_Typed_SV_Message_Queue<T>::control");
00070 
00071   return this->message_queue_.control (option, arg);
00072 }
00073 
00074 template <class T> ACE_INLINE int
00075 ACE_Typed_SV_Message_Queue<T>::get_id (void) const
00076 {
00077   return this->message_queue_.get_id ();
00078 }
00079 
00080 ACE_END_VERSIONED_NAMESPACE_DECL

Generated on Thu Nov 9 09:42:08 2006 for ACE by doxygen 1.3.6