#include <TransportReplacedElement.h>
Public Member Functions | |
TransportReplacedElement (TransportQueueElement *orig_elem, MessageBlockAllocator *mb_allocator=0, DataBlockAllocator *db_allocator=0) | |
virtual | ~TransportReplacedElement () |
virtual RepoId | publication_id () const |
Accessor for the publisher id. | |
virtual const ACE_Message_Block * | msg () const |
Accessor for the ACE_Message_Block. | |
virtual const ACE_Message_Block * | msg_payload () const |
The marshalled payload only (sample data). | |
virtual bool | owned_by_transport () |
Is the sample created by the transport? | |
Protected Member Functions | |
virtual void | release_element (bool dropped_by_transport) |
Invoked when the counter reaches 0. | |
Private Attributes | |
MessageBlockAllocator * | mb_allocator_ |
Cached allocator for DataSampleHeader message block. | |
DataBlockAllocator * | db_allocator_ |
Cached allocator for DataSampleHeader data block. | |
RepoId | publisher_id_ |
The publication_id() from the original TransportQueueElement. | |
Message_Block_Ptr | msg_ |
A deep-copy of the msg() from the original TransportQueueElement. |
Definition at line 21 of file TransportReplacedElement.h.
OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE OpenDDS::DCPS::TransportReplacedElement::TransportReplacedElement | ( | TransportQueueElement * | orig_elem, | |
MessageBlockAllocator * | mb_allocator = 0 , |
|||
DataBlockAllocator * | db_allocator = 0 | |||
) |
Definition at line 14 of file TransportReplacedElement.inl.
References DBG_ENTRY_LVL, OpenDDS::DCPS::TransportQueueElement::msg(), and OpenDDS::DCPS::TransportQueueElement::publication_id().
00017 : TransportQueueElement(1) 00018 , mb_allocator_ (mb_allocator) 00019 , db_allocator_ (db_allocator) 00020 { 00021 DBG_ENTRY_LVL("TransportReplacedElement","TransportReplacedElement",6); 00022 00023 // Obtain the publisher id. 00024 this->publisher_id_ = orig_elem->publication_id(); 00025 00026 this->msg_.reset(TransportQueueElement::clone_mb(orig_elem->msg(), 00027 this->mb_allocator_, 00028 this->db_allocator_)); 00029 }
OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL OpenDDS::DCPS::TransportReplacedElement::~TransportReplacedElement | ( | ) | [virtual] |
Definition at line 17 of file TransportReplacedElement.cpp.
References DBG_ENTRY_LVL.
00018 { 00019 DBG_ENTRY_LVL("TransportReplacedElement","~TransportReplacedElement",6); 00020 }
ACE_INLINE const ACE_Message_Block * OpenDDS::DCPS::TransportReplacedElement::msg | ( | void | ) | const [virtual] |
Accessor for the ACE_Message_Block.
Implements OpenDDS::DCPS::TransportQueueElement.
Definition at line 41 of file TransportReplacedElement.inl.
References DBG_ENTRY_LVL, OpenDDS::DCPS::unique_ptr< T, Deleter >::get(), and msg_.
00042 { 00043 DBG_ENTRY_LVL("TransportReplacedElement","msg",6); 00044 return this->msg_.get(); 00045 }
ACE_INLINE const ACE_Message_Block * OpenDDS::DCPS::TransportReplacedElement::msg_payload | ( | ) | const [virtual] |
The marshalled payload only (sample data).
Implements OpenDDS::DCPS::TransportQueueElement.
Definition at line 49 of file TransportReplacedElement.inl.
References DBG_ENTRY_LVL, and msg_.
00050 { 00051 DBG_ENTRY_LVL("TransportReplacedElement", "msg_payload", 6); 00052 return this->msg_->cont(); 00053 }
ACE_INLINE bool OpenDDS::DCPS::TransportReplacedElement::owned_by_transport | ( | ) | [virtual] |
Is the sample created by the transport?
Implements OpenDDS::DCPS::TransportQueueElement.
Definition at line 57 of file TransportReplacedElement.inl.
ACE_INLINE OpenDDS::DCPS::RepoId OpenDDS::DCPS::TransportReplacedElement::publication_id | ( | ) | const [virtual] |
Accessor for the publisher id.
Implements OpenDDS::DCPS::TransportQueueElement.
Definition at line 33 of file TransportReplacedElement.inl.
References DBG_ENTRY_LVL, and publisher_id_.
00034 { 00035 DBG_ENTRY_LVL("TransportReplacedElement","publication_id",6); 00036 return this->publisher_id_; 00037 }
void OpenDDS::DCPS::TransportReplacedElement::release_element | ( | bool | dropped_by_transport | ) | [protected, virtual] |
Invoked when the counter reaches 0.
Implements OpenDDS::DCPS::TransportQueueElement.
Definition at line 23 of file TransportReplacedElement.cpp.
References DBG_ENTRY_LVL.
00024 { 00025 ACE_UNUSED_ARG(dropped_by_transport); 00026 DBG_ENTRY_LVL("TransportReplacedElement","release_element",6); 00027 00028 00029 delete this; 00030 }
Cached allocator for DataSampleHeader data block.
Definition at line 48 of file TransportReplacedElement.h.
Cached allocator for DataSampleHeader message block.
Definition at line 46 of file TransportReplacedElement.h.
A deep-copy of the msg() from the original TransportQueueElement.
Definition at line 54 of file TransportReplacedElement.h.
Referenced by msg(), and msg_payload().
The publication_id() from the original TransportQueueElement.
Definition at line 51 of file TransportReplacedElement.h.
Referenced by publication_id().