CopyChainVisitor.cpp

Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  * Distributed under the OpenDDS License.
00005  * See: http://www.opendds.org/license.html
00006  */
00007 
00008 #include "DCPS/DdsDcps_pch.h" //Only the _pch include should start with DCPS/
00009 #include "CopyChainVisitor.h"
00010 #include "TransportQueueElement.h"
00011 
00012 #if !defined (__ACE_INLINE__)
00013 #include "CopyChainVisitor.inl"
00014 #endif /* __ACE_INLINE__ */
00015 
00016 OpenDDS::DCPS::CopyChainVisitor::~CopyChainVisitor()
00017 {
00018   DBG_ENTRY_LVL("CopyChainVisitor","~CopyChainVisitor",6);
00019 }
00020 
00021 int
00022 OpenDDS::DCPS::CopyChainVisitor::visit_element(TransportQueueElement* element)
00023 {
00024   DBG_ENTRY_LVL("CopyChainVisitor","visit_element",6);
00025 
00026   // Create a new copy of the current element.
00027   // fails.
00028   TransportRetainedElement* copiedElement = new
00029     TransportRetainedElement(
00030       element->msg(),
00031       element->publication_id(),
00032       this->mb_allocator_,
00033       this->db_allocator_
00034     );
00035 
00036 
00037   // Add the copy to the target.
00038   this->target_.put( copiedElement);
00039 
00040   // Visit entire queue.
00041   return 1;
00042 
00043 
00044 }
00045 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1