#include <TransportRetainedElement.h>
Inheritance diagram for OpenDDS::DCPS::TransportRetainedElement:


| TransportQueueElement methods | |
| { | |
| virtual RepoId | publication_id () const | 
| Accessor for the publication id that sent the sample. | |
| virtual const ACE_Message_Block * | msg () const | 
| The marshalled sample (sample header + sample data). | |
| 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? | |
| virtual void | release_element (bool dropped_by_transport) | 
| Invoked when the counter reaches 0. | |
| ACE_Message_Block * | msg_ | 
| Sample data, if any. | |
| RepoId | publication_id_ | 
| Originating publication Id, if any. | |
| TransportRetainedElementAllocator * | allocator_ | 
| Reference to TransportRetainedElement allocator. | |
| MessageBlockAllocator * | mb_allocator_ | 
| Cached allocator for DataSampleHeader message block. | |
| DataBlockAllocator * | db_allocator_ | 
| Cached allocator for DataSampleHeader data block. | |
| Public Member Functions | |
| TransportRetainedElement (const ACE_Message_Block *message, const RepoId &pubId, TransportRetainedElementAllocator *allocator=0, MessageBlockAllocator *mb_allocator_=0, DataBlockAllocator *db_allocator_=0) | |
| Construct with message block chain and Id values. | |
| TransportRetainedElement (const TransportRetainedElement &source) | |
| Copy constructor. | |
| virtual | ~TransportRetainedElement () | 
Definition at line 24 of file TransportRetainedElement.h.
| ACE_INLINE OpenDDS::DCPS::TransportRetainedElement::TransportRetainedElement | ( | const ACE_Message_Block * | message, | |
| const RepoId & | pubId, | |||
| TransportRetainedElementAllocator * | allocator = 0, | |||
| MessageBlockAllocator * | mb_allocator_ = 0, | |||
| DataBlockAllocator * | db_allocator_ = 0 | |||
| ) | 
Construct with message block chain and Id values.
Definition at line 11 of file TransportRetainedElement.inl.
References OpenDDS::DCPS::TransportQueueElement::clone_mb(), and msg_.
00017 : TransportQueueElement(1), 00018 msg_(0), 00019 publication_id_( pubId), 00020 allocator_( allocator), 00021 mb_allocator_( mb_allocator), 00022 db_allocator_( db_allocator) 00023 { 00024 if (message != 0) { 00025 msg_ = TransportQueueElement::clone_mb(message, 00026 this->mb_allocator_, 00027 this->db_allocator_); 00028 } 00029 }
| ACE_INLINE OpenDDS::DCPS::TransportRetainedElement::TransportRetainedElement | ( | const TransportRetainedElement & | source | ) | 
Copy constructor.
Definition at line 32 of file TransportRetainedElement.inl.
References DBG_ENTRY_LVL.
00034 : TransportQueueElement(1), 00035 msg_( ACE_Message_Block::duplicate( source.msg())), 00036 publication_id_( source.publication_id()), 00037 allocator_( source.allocator_), 00038 mb_allocator_( source.mb_allocator_), 00039 db_allocator_( source.db_allocator_) 00040 { 00041 DBG_ENTRY_LVL("TransportRetainedElement","TransportRetainedElement",6); 00042 }
| OpenDDS::DCPS::TransportRetainedElement::~TransportRetainedElement | ( | ) |  [virtual] | 
Definition at line 15 of file TransportRetainedElement.cpp.
References DBG_ENTRY_LVL.
00016 { 00017 DBG_ENTRY_LVL("TransportRetainedElement","~TransportRetainedElement",6); 00018 }
| const ACE_Message_Block * OpenDDS::DCPS::TransportRetainedElement::msg | ( | ) | const  [virtual] | 
The marshalled sample (sample header + sample data).
Implements OpenDDS::DCPS::TransportQueueElement.
Definition at line 45 of file TransportRetainedElement.cpp.
References DBG_ENTRY_LVL, and msg_.
00046 { 00047 DBG_ENTRY_LVL("TransportRetainedElement","msg",6); 00048 return this->msg_; 00049 }
| const ACE_Message_Block * OpenDDS::DCPS::TransportRetainedElement::msg_payload | ( | ) | const  [virtual] | 
The marshalled payload only (sample data).
Implements OpenDDS::DCPS::TransportQueueElement.
Definition at line 52 of file TransportRetainedElement.cpp.
References DBG_ENTRY_LVL, and msg_.
00053 { 00054 DBG_ENTRY_LVL("TransportRetainedElement", "msg_payload", 6); 00055 return this->msg_->cont(); 00056 }
| ACE_INLINE bool OpenDDS::DCPS::TransportRetainedElement::owned_by_transport | ( | ) |  [virtual] | 
Is the sample created by the transport?
Implements OpenDDS::DCPS::TransportQueueElement.
Definition at line 47 of file TransportRetainedElement.inl.
| OpenDDS::DCPS::RepoId OpenDDS::DCPS::TransportRetainedElement::publication_id | ( | ) | const  [virtual] | 
Accessor for the publication id that sent the sample.
Implements OpenDDS::DCPS::TransportQueueElement.
Definition at line 38 of file TransportRetainedElement.cpp.
References DBG_ENTRY_LVL, and publication_id_.
00039 { 00040 DBG_ENTRY_LVL("TransportRetainedElement","publication_id",6); 00041 return this->publication_id_; 00042 }
| void OpenDDS::DCPS::TransportRetainedElement::release_element | ( | bool | dropped_by_transport | ) |  [protected, virtual] | 
Invoked when the counter reaches 0.
Implements OpenDDS::DCPS::TransportQueueElement.
Definition at line 21 of file TransportRetainedElement.cpp.
References allocator_, DBG_ENTRY_LVL, OpenDDS::DCPS::Cached_Allocator_With_Overflow< T, ACE_LOCK >::free(), and msg_.
00024 { 00025 DBG_ENTRY_LVL("TransportRetainedElement","release_element",6); 00026 00027 if (this->msg_ != 0) { 00028 this->msg_->release(); 00029 this->msg_ = 0; 00030 } 00031 00032 if (this->allocator_) { 00033 this->allocator_->free(this); 00034 } 00035 }
Reference to TransportRetainedElement allocator.
Definition at line 63 of file TransportRetainedElement.h.
Referenced by release_element(), and OpenDDS::DCPS::CopyChainVisitor::visit_element().
Cached allocator for DataSampleHeader data block.
Definition at line 67 of file TransportRetainedElement.h.
Cached allocator for DataSampleHeader message block.
Definition at line 65 of file TransportRetainedElement.h.
| ACE_Message_Block* OpenDDS::DCPS::TransportRetainedElement::msg_  [private] | 
Sample data, if any.
Definition at line 57 of file TransportRetainedElement.h.
Referenced by msg(), msg_payload(), release_element(), and TransportRetainedElement().
Originating publication Id, if any.
Definition at line 60 of file TransportRetainedElement.h.
Referenced by publication_id().
 1.4.7
 1.4.7