Incoming_Message_Queue.inl

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 //Incoming_Message_Queue.inl,v 1.16 2006/06/19 19:47:17 jwillemsen Exp
00004 
00005 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00006 
00007 /************************************************************************/
00008 // Methods for TAO_Incoming_Message_Queue
00009 /************************************************************************/
00010 ACE_INLINE CORBA::ULong
00011 TAO_Incoming_Message_Queue::queue_length (void) const
00012 {
00013   return this->size_;
00014 }
00015 
00016 /************************************************************************/
00017 // Methods  for TAO_Queued_Data
00018 /************************************************************************/
00019 
00020 /*static*/
00021 ACE_INLINE void
00022 TAO_Queued_Data::replace_data_block (ACE_Message_Block &mb)
00023 {
00024   size_t const newsize =
00025     ACE_CDR::total_length (&mb, 0) + ACE_CDR::MAX_ALIGNMENT;
00026 
00027   ACE_Data_Block *db =
00028     mb.data_block ()->clone_nocopy ();
00029 
00030   if (db->size (newsize) == -1)
00031     return;
00032 
00033   ACE_Message_Block tmp (db);
00034   ACE_CDR::mb_align (&tmp);
00035 
00036   tmp.copy (mb.rd_ptr (), mb.length());
00037   mb.data_block (tmp.data_block ()->duplicate ());
00038 
00039   mb.rd_ptr (tmp.rd_ptr ());
00040   mb.wr_ptr (tmp.wr_ptr ());
00041 
00042   // Remove the DONT_DELETE flags from mb
00043   mb.clr_self_flags (ACE_Message_Block::DONT_DELETE);
00044 }
00045 
00046 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Thu Nov 9 11:54:14 2006 for TAO by doxygen 1.3.6