00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #include "DCPS/DdsDcps_pch.h" //Only the _pch include should start with DCPS/ 00009 #include "TransportControlElement.h" 00010 #include "dds/DCPS/transport/framework/EntryExit.h" 00011 00012 #if !defined (__ACE_INLINE__) 00013 #include "TransportControlElement.inl" 00014 #endif /* __ACE_INLINE__ */ 00015 00016 OpenDDS::DCPS::TransportControlElement::TransportControlElement( 00017 const ACE_Message_Block* msg_block, 00018 const RepoId& /*pub_id*/, 00019 bool owner 00020 ) : TransportQueueElement(1), 00021 msg_( ACE_Message_Block::duplicate(msg_block)), 00022 owner_( owner) 00023 { 00024 DBG_ENTRY_LVL("TransportControlElement","TransportControlElement",6); 00025 } 00026 00027 OpenDDS::DCPS::TransportControlElement::~TransportControlElement() 00028 { 00029 DBG_ENTRY_LVL("TransportControlElement","~TransportControlElement",6); 00030 } 00031 00032 void 00033 OpenDDS::DCPS::TransportControlElement::release_element( 00034 bool /* dropped_by_transport */ 00035 ) 00036 { 00037 if (this->msg_) { 00038 this->msg_->release(); 00039 this->msg_ = 0; 00040 } 00041 00042 if (this->owner_) { 00043 delete this; 00044 } 00045 }