Line data Source code
1 : /* 2 : * 3 : * 4 : * Distributed under the OpenDDS License. 5 : * See: http://www.opendds.org/license.html 6 : */ 7 : 8 : #include "EntryExit.h" 9 : 10 : OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 11 : 12 : ACE_INLINE 13 0 : OpenDDS::DCPS::TransportReplacedElement::TransportReplacedElement 14 : (TransportQueueElement* orig_elem, 15 : MessageBlockAllocator* mb_allocator, 16 0 : DataBlockAllocator* db_allocator) 17 : : TransportQueueElement(1) 18 0 : , mb_allocator_ (mb_allocator) 19 0 : , db_allocator_ (db_allocator) 20 : { 21 : DBG_ENTRY_LVL("TransportReplacedElement", "TransportReplacedElement", 6); 22 : 23 : // Obtain the publisher id. 24 0 : publisher_id_ = orig_elem->publication_id(); 25 : 26 0 : msg_.reset(TransportQueueElement::clone_mb(orig_elem->msg(), 27 : mb_allocator_, 28 : db_allocator_)); 29 0 : } 30 : 31 : ACE_INLINE 32 : OpenDDS::DCPS::GUID_t 33 0 : OpenDDS::DCPS::TransportReplacedElement::publication_id() const 34 : { 35 : DBG_ENTRY_LVL("TransportReplacedElement", "publication_id", 6); 36 0 : return publisher_id_; 37 : } 38 : 39 : ACE_INLINE 40 : ACE_Message_Block* 41 0 : OpenDDS::DCPS::TransportReplacedElement::duplicate_msg() const 42 : { 43 : DBG_ENTRY_LVL("TransportReplacedElement", "duplicate_msg", 6); 44 0 : return msg_->duplicate(); 45 : } 46 : 47 : ACE_INLINE 48 : const ACE_Message_Block* 49 0 : OpenDDS::DCPS::TransportReplacedElement::msg() const 50 : { 51 : DBG_ENTRY_LVL("TransportReplacedElement", "msg", 6); 52 0 : return msg_.get(); 53 : } 54 : 55 : ACE_INLINE 56 : const ACE_Message_Block* 57 0 : OpenDDS::DCPS::TransportReplacedElement::msg_payload() const 58 : { 59 : DBG_ENTRY_LVL("TransportReplacedElement", "msg_payload", 6); 60 0 : return msg_->cont(); 61 : } 62 : 63 : ACE_INLINE 64 : bool 65 0 : OpenDDS::DCPS::TransportReplacedElement::owned_by_transport () 66 : { 67 0 : return true; 68 : } 69 : 70 : ACE_INLINE 71 : bool 72 0 : OpenDDS::DCPS::TransportReplacedElement::is_retained_replaced() const 73 : { 74 0 : return true; 75 : } 76 : 77 : OPENDDS_END_VERSIONED_NAMESPACE_DECL