OpenDDS  Snapshot(2023/04/07-19:43)
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
OpenDDS::DCPS::TransportReplacedElement Class Reference

#include <TransportReplacedElement.h>

Inheritance diagram for OpenDDS::DCPS::TransportReplacedElement:
Inheritance graph
[legend]
Collaboration diagram for OpenDDS::DCPS::TransportReplacedElement:
Collaboration graph
[legend]

Public Member Functions

 TransportReplacedElement (TransportQueueElement *orig_elem, MessageBlockAllocator *mb_allocator=0, DataBlockAllocator *db_allocator=0)
 
virtual ~TransportReplacedElement ()
 
virtual GUID_t publication_id () const
 Accessor for the publisher id. More...
 
virtual ACE_Message_Blockduplicate_msg () const
 A reference-incremented duplicate of the marshalled sample (sample header + sample data) More...
 
virtual const ACE_Message_Blockmsg () const
 Accessor for the ACE_Message_Block. More...
 
virtual const ACE_Message_Blockmsg_payload () const
 The marshalled payload only (sample data) More...
 
virtual bool owned_by_transport ()
 Is the sample created by the transport? More...
 
virtual bool is_retained_replaced () const
 
- Public Member Functions inherited from OpenDDS::DCPS::TransportQueueElement
virtual ~TransportQueueElement ()
 
bool data_dropped (bool dropped_by_transport=false)
 
bool data_delivered ()
 
void increment_loan ()
 
virtual bool requires_exclusive_packet () const
 Does the sample require an exclusive transport packet? More...
 
virtual GUID_t subscription_id () const
 Accessor for the subscription id, if sent the sample is sent to 1 sub. More...
 
virtual SequenceNumber sequence () const
 
virtual bool is_control (GUID_t pub_id) const
 Is the element a "control" sample from the specified pub_id? More...
 
bool released () const
 Is the listener get called ? More...
 
void released (bool flag)
 
virtual TqePair fragment (size_t size)
 
virtual bool is_fragment () const
 Is this QueueElement the result of fragmentation? More...
 
virtual bool is_last_fragment () const
 Is this QueueElement the last result of fragmentation? More...
 
virtual bool is_request_ack () const
 

Protected Member Functions

virtual void release_element (bool dropped_by_transport)
 Invoked when the counter reaches 0. More...
 
- Protected Member Functions inherited from OpenDDS::DCPS::TransportQueueElement
 TransportQueueElement (unsigned long initial_count)
 
bool was_dropped () const
 

Private Attributes

MessageBlockAllocatormb_allocator_
 Cached allocator for DataSampleHeader message block. More...
 
DataBlockAllocatordb_allocator_
 Cached allocator for DataSampleHeader data block. More...
 
GUID_t publisher_id_
 The publication_id() from the original TransportQueueElement. More...
 
Message_Block_Ptr msg_
 A deep-copy of the msg() from the original TransportQueueElement. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from OpenDDS::DCPS::TransportQueueElement
static ACE_Message_Blockclone_mb (const ACE_Message_Block *msg, MessageBlockAllocator *mb_allocator, DataBlockAllocator *db_allocator)
 

Detailed Description

Definition at line 21 of file TransportReplacedElement.h.

Constructor & Destructor Documentation

◆ TransportReplacedElement()

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 ACE_INLINE, DBG_ENTRY_LVL, OpenDDS::DCPS::TransportQueueElement::msg(), and OpenDDS::DCPS::TransportQueueElement::publication_id().

18  , mb_allocator_ (mb_allocator)
19  , db_allocator_ (db_allocator)
20 {
21  DBG_ENTRY_LVL("TransportReplacedElement", "TransportReplacedElement", 6);
22 
23  // Obtain the publisher id.
24  publisher_id_ = orig_elem->publication_id();
25 
28  db_allocator_));
29 }
GUID_t publisher_id_
The publication_id() from the original TransportQueueElement.
MessageBlockAllocator * mb_allocator_
Cached allocator for DataSampleHeader message block.
Message_Block_Ptr msg_
A deep-copy of the msg() from the original TransportQueueElement.
TransportQueueElement(unsigned long initial_count)
DataBlockAllocator * db_allocator_
Cached allocator for DataSampleHeader data block.
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68
static ACE_Message_Block * clone_mb(const ACE_Message_Block *msg, MessageBlockAllocator *mb_allocator, DataBlockAllocator *db_allocator)

◆ ~TransportReplacedElement()

OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL OpenDDS::DCPS::TransportReplacedElement::~TransportReplacedElement ( )
virtual

Definition at line 17 of file TransportReplacedElement.cpp.

References DBG_ENTRY_LVL.

18 {
19  DBG_ENTRY_LVL("TransportReplacedElement", "~TransportReplacedElement", 6);
20 }
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68

Member Function Documentation

◆ duplicate_msg()

ACE_INLINE ACE_Message_Block * OpenDDS::DCPS::TransportReplacedElement::duplicate_msg ( ) const
virtual

A reference-incremented duplicate of the marshalled sample (sample header + sample data)

Implements OpenDDS::DCPS::TransportQueueElement.

Definition at line 41 of file TransportReplacedElement.inl.

References ACE_INLINE, DBG_ENTRY_LVL, ACE_Message_Block::duplicate(), and msg_.

42 {
43  DBG_ENTRY_LVL("TransportReplacedElement", "duplicate_msg", 6);
44  return msg_->duplicate();
45 }
Message_Block_Ptr msg_
A deep-copy of the msg() from the original TransportQueueElement.
virtual ACE_Message_Block * duplicate(void) const
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68

◆ is_retained_replaced()

ACE_INLINE bool OpenDDS::DCPS::TransportReplacedElement::is_retained_replaced ( ) const
virtual

Reimplemented from OpenDDS::DCPS::TransportQueueElement.

Definition at line 72 of file TransportReplacedElement.inl.

References OPENDDS_END_VERSIONED_NAMESPACE_DECL.

73 {
74  return true;
75 }

◆ msg()

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 49 of file TransportReplacedElement.inl.

References ACE_INLINE, DBG_ENTRY_LVL, OpenDDS::DCPS::unique_ptr< T, Deleter >::get(), and msg_.

50 {
51  DBG_ENTRY_LVL("TransportReplacedElement", "msg", 6);
52  return msg_.get();
53 }
Message_Block_Ptr msg_
A deep-copy of the msg() from the original TransportQueueElement.
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68

◆ msg_payload()

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 57 of file TransportReplacedElement.inl.

References ACE_INLINE, ACE_Message_Block::cont(), DBG_ENTRY_LVL, and msg_.

58 {
59  DBG_ENTRY_LVL("TransportReplacedElement", "msg_payload", 6);
60  return msg_->cont();
61 }
Message_Block_Ptr msg_
A deep-copy of the msg() from the original TransportQueueElement.
ACE_Message_Block * cont(void) const
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68

◆ owned_by_transport()

ACE_INLINE bool OpenDDS::DCPS::TransportReplacedElement::owned_by_transport ( )
virtual

Is the sample created by the transport?

Implements OpenDDS::DCPS::TransportQueueElement.

Definition at line 65 of file TransportReplacedElement.inl.

References ACE_INLINE.

66 {
67  return true;
68 }

◆ publication_id()

ACE_INLINE OpenDDS::DCPS::GUID_t 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 ACE_INLINE, DBG_ENTRY_LVL, and publisher_id_.

34 {
35  DBG_ENTRY_LVL("TransportReplacedElement", "publication_id", 6);
36  return publisher_id_;
37 }
GUID_t publisher_id_
The publication_id() from the original TransportQueueElement.
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68

◆ release_element()

void OpenDDS::DCPS::TransportReplacedElement::release_element ( bool  dropped_by_transport)
protectedvirtual

Invoked when the counter reaches 0.

Implements OpenDDS::DCPS::TransportQueueElement.

Definition at line 23 of file TransportReplacedElement.cpp.

References DBG_ENTRY_LVL, and OPENDDS_END_VERSIONED_NAMESPACE_DECL.

24 {
25  ACE_UNUSED_ARG(dropped_by_transport);
26  DBG_ENTRY_LVL("TransportReplacedElement", "release_element", 6);
27 
28 
29  delete this;
30 }
#define DBG_ENTRY_LVL(CNAME, MNAME, DBG_LVL)
Definition: EntryExit.h:68

Member Data Documentation

◆ db_allocator_

DataBlockAllocator* OpenDDS::DCPS::TransportReplacedElement::db_allocator_
private

Cached allocator for DataSampleHeader data block.

Definition at line 52 of file TransportReplacedElement.h.

◆ mb_allocator_

MessageBlockAllocator* OpenDDS::DCPS::TransportReplacedElement::mb_allocator_
private

Cached allocator for DataSampleHeader message block.

Definition at line 50 of file TransportReplacedElement.h.

◆ msg_

Message_Block_Ptr OpenDDS::DCPS::TransportReplacedElement::msg_
private

A deep-copy of the msg() from the original TransportQueueElement.

Definition at line 58 of file TransportReplacedElement.h.

Referenced by duplicate_msg(), msg(), and msg_payload().

◆ publisher_id_

GUID_t OpenDDS::DCPS::TransportReplacedElement::publisher_id_
private

The publication_id() from the original TransportQueueElement.

Definition at line 55 of file TransportReplacedElement.h.

Referenced by publication_id().


The documentation for this class was generated from the following files: