OpenDDS::DCPS::PacketRemoveVisitor Class Reference

#include <PacketRemoveVisitor.h>

Inheritance diagram for OpenDDS::DCPS::PacketRemoveVisitor:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PacketRemoveVisitor (TransportQueueElement &sample, ACE_Message_Block *&unsent_head_block, ACE_Message_Block *header_block, TransportReplacedElementAllocator &allocator, MessageBlockAllocator &mb_allocator, DataBlockAllocator &db_allocator)
virtual ~PacketRemoveVisitor ()
virtual int visit_element_ref (TransportQueueElement *&element)
int status () const

Private Attributes

TransportQueueElementsample_
 The sample that needs to be removed.
ACE_Message_Block *& head_
 The head block of the chain of unsent blocks in the packet.
ACE_Message_Block * header_block_
int status_
 Holds the status of our visit.
ACE_Message_Block * current_block_
ACE_Message_Block * previous_block_
TransportReplacedElementAllocatorreplaced_element_allocator_
 Cached allocator for TransportReplaceElement.
MessageBlockAllocatorreplaced_element_mb_allocator_
 Cached allocator for DataSampleHeader message block.
DataBlockAllocatorreplaced_element_db_allocator_
 Cached allocator for DataSampleHeader data block.

Constructor & Destructor Documentation

OpenDDS::DCPS::PacketRemoveVisitor::PacketRemoveVisitor ( TransportQueueElement sample,
ACE_Message_Block *&  unsent_head_block,
ACE_Message_Block *  header_block,
TransportReplacedElementAllocator allocator,
MessageBlockAllocator mb_allocator,
DataBlockAllocator db_allocator 
)

OpenDDS::DCPS::PacketRemoveVisitor::~PacketRemoveVisitor (  )  [virtual]


Member Function Documentation

ACE_INLINE int OpenDDS::DCPS::PacketRemoveVisitor::status (  )  const

Accessor for the status. Called after this visitor object has been passed to BasicQueue<T>::accept_remove_visitor(). status == 1 means the sample was found and removed. status == 0 means the sample was not found (thus not removed) status == -1 means a fatal error was encountered.

int OpenDDS::DCPS::PacketRemoveVisitor::visit_element_ref ( TransportQueueElement *&  element  )  [virtual]

The BasicQueue<T>::accept_remove_visitor() method will call this visit_element() method for each element in the queue.


Member Data Documentation

ACE_Message_Block* OpenDDS::DCPS::PacketRemoveVisitor::current_block_ [private]

This is the message block in the chain that corresponds to the current (non-head) element being visited.

ACE_Message_Block*& OpenDDS::DCPS::PacketRemoveVisitor::head_ [private]

The head block of the chain of unsent blocks in the packet.

ACE_Message_Block* OpenDDS::DCPS::PacketRemoveVisitor::header_block_ [private]

The packet header block that was duplicate()'d to form the first block in the packet.

ACE_Message_Block* OpenDDS::DCPS::PacketRemoveVisitor::previous_block_ [private]

This is the message block in the chain that has its cont() set to the current_block_.

TransportReplacedElementAllocator& OpenDDS::DCPS::PacketRemoveVisitor::replaced_element_allocator_ [private]

Cached allocator for TransportReplaceElement.

DataBlockAllocator& OpenDDS::DCPS::PacketRemoveVisitor::replaced_element_db_allocator_ [private]

Cached allocator for DataSampleHeader data block.

MessageBlockAllocator& OpenDDS::DCPS::PacketRemoveVisitor::replaced_element_mb_allocator_ [private]

Cached allocator for DataSampleHeader message block.

TransportQueueElement& OpenDDS::DCPS::PacketRemoveVisitor::sample_ [private]

The sample that needs to be removed.

int OpenDDS::DCPS::PacketRemoveVisitor::status_ [private]

Holds the status of our visit.


The documentation for this class was generated from the following files:
Generated on Wed Nov 16 15:29:01 2011 for OpenDDS by  doxygen 1.4.7