00001
00002
00003 #if !defined (ACE_MESSAGE_BLOCK_T_C)
00004 #define ACE_MESSAGE_BLOCK_T_C
00005
00006
00007 ACE_RCSID(ace, Message_Block_T, "$Id: Message_Block_T.cpp,v 1.1.1.4 2003/02/21 18:36:32 chad Exp $")
00008
00009 #include "ace/Malloc_Base.h"
00010
00011 #if !defined (__ACE_INLINE__)
00012 #include "ace/Message_Block_T.i"
00013 #endif
00014
00015 template<class L>
00016 ACE_Locked_Data_Block<L>::~ACE_Locked_Data_Block (void)
00017 {
00018 }
00019
00020 template<class ACE_LOCK> ACE_Data_Block *
00021 ACE_Locked_Data_Block<ACE_LOCK>::clone_nocopy (ACE_Message_Block::Message_Flags mask) const
00022 {
00023 ACE_TRACE ("ACE_Locked_Data_Block::clone_nocopy");
00024
00025
00026
00027 const ACE_Message_Block::Message_Flags always_clear =
00028 ACE_Message_Block::DONT_DELETE;
00029
00030 ACE_Locked_Data_Block<ACE_LOCK> *nb;
00031
00032 ACE_NEW_MALLOC_RETURN (nb,
00033 ACE_static_cast(ACE_Locked_Data_Block<ACE_LOCK>*,
00034 this->data_block_allocator ()->malloc (sizeof (ACE_Locked_Data_Block<ACE_LOCK>))),
00035 ACE_Locked_Data_Block<ACE_LOCK> (this->size (),
00036 this->msg_type (),
00037 0,
00038 this->allocator_strategy (),
00039 this->flags (),
00040 this->data_block_allocator ()),
00041 0);
00042
00043
00044 nb->clr_flags (mask | always_clear);
00045 return nb;
00046 }
00047
00048 #endif