LCOV - code coverage report
Current view: top level - DCPS/transport/framework - BuildChainVisitor.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 12 0.0 %
Date: 2023-04-30 01:32:43 Functions: 0 3 0.0 %

          Line data    Source code
       1             : /*
       2             :  *
       3             :  *
       4             :  * Distributed under the OpenDDS License.
       5             :  * See: http://www.opendds.org/license.html
       6             :  */
       7             : 
       8             : #include "DCPS/DdsDcps_pch.h" //Only the _pch include should start with DCPS/
       9             : #include "BuildChainVisitor.h"
      10             : #include "TransportQueueElement.h"
      11             : 
      12             : #if !defined (__ACE_INLINE__)
      13             : #include "BuildChainVisitor.inl"
      14             : #endif /* __ACE_INLINE__ */
      15             : 
      16           0 : OpenDDS::DCPS::BuildChainVisitor::~BuildChainVisitor()
      17             : {
      18             :   DBG_ENTRY_LVL("BuildChainVisitor", "~BuildChainVisitor", 6);
      19           0 : }
      20             : 
      21             : int
      22           0 : OpenDDS::DCPS::BuildChainVisitor::visit_element(TransportQueueElement* element)
      23             : {
      24             :   DBG_ENTRY_LVL("BuildChainVisitor", "visit_element", 6);
      25             : 
      26           0 :   if (head_ == 0) {
      27             :     // This is the first element that we have visited.
      28           0 :     head_ = element->msg()->duplicate();
      29           0 :     tail_ = head_;
      30             : 
      31           0 :     while (tail_->cont() != 0) {
      32           0 :       tail_ = tail_->cont();
      33             :     }
      34             : 
      35             :   } else {
      36             :     // This is not the first element that we have visited.
      37           0 :     tail_->cont(element->msg()->duplicate());
      38             : 
      39           0 :     while (tail_->cont() != 0) {
      40           0 :       tail_ = tail_->cont();
      41             :     }
      42             :   }
      43             : 
      44             :   // Visit entire queue.
      45           0 :   return 1;
      46             : }

Generated by: LCOV version 1.16