LCOV - code coverage report
Current view: top level - DCPS/transport/framework - TransportRetainedElement.inl (source / functions) Hit Total Coverage
Test: coverage.info Lines: 16 20 80.0 %
Date: 2023-04-30 01:32:43 Functions: 2 4 50.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 "EntryExit.h"
       9             : 
      10             : OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
      11             : 
      12             : ACE_INLINE
      13           1 : OpenDDS::DCPS::TransportRetainedElement::TransportRetainedElement(
      14             :     ACE_Message_Block*                 message,
      15             :     const GUID_t&                      pubId
      16           1 : ) : TransportQueueElement(1),
      17           1 :     msg_(message),
      18           1 :     publication_id_(pubId),
      19           1 :     mb_allocator_(0),
      20           1 :     db_allocator_(0),
      21           1 :     is_duplicate_(true)
      22             : {
      23           1 : }
      24             : 
      25             : ACE_INLINE
      26           1 : OpenDDS::DCPS::TransportRetainedElement::TransportRetainedElement(
      27             :     const ACE_Message_Block*           message,
      28             :     const GUID_t&                      pubId,
      29             :     MessageBlockAllocator*             mb_allocator,
      30             :     DataBlockAllocator*                db_allocator
      31           1 : ) : TransportQueueElement(1),
      32           1 :     msg_(message ? TransportQueueElement::clone_mb(message,
      33             :                                                    mb_allocator,
      34             :                                                    db_allocator) : 0),
      35           1 :     publication_id_(pubId),
      36           1 :     mb_allocator_(mb_allocator),
      37           1 :     db_allocator_(db_allocator),
      38           1 :     is_duplicate_(false)
      39             : {
      40           1 : }
      41             : 
      42             : ACE_INLINE
      43             : OpenDDS::DCPS::TransportRetainedElement::TransportRetainedElement(
      44             :   const TransportRetainedElement& source
      45             : ) : TransportQueueElement(1),
      46             :     msg_(source.duplicate_msg()),
      47             :     publication_id_(source.publication_id()),
      48             :     mb_allocator_(source.mb_allocator_),
      49             :     db_allocator_(source.db_allocator_),
      50             :     is_duplicate_(source.is_duplicate_)
      51             : {
      52             :   DBG_ENTRY_LVL("TransportRetainedElement", "TransportRetainedElement", 6);
      53             : }
      54             : 
      55             : 
      56             : ACE_INLINE
      57             : bool
      58           0 : OpenDDS::DCPS::TransportRetainedElement::owned_by_transport()
      59             : {
      60           0 :   return !is_duplicate_;
      61             : }
      62             : 
      63             : ACE_INLINE
      64             : bool
      65           0 : OpenDDS::DCPS::TransportRetainedElement::is_retained_replaced() const
      66             : {
      67           0 :   return !is_duplicate_;
      68             : }
      69             : 
      70             : OPENDDS_END_VERSIONED_NAMESPACE_DECL

Generated by: LCOV version 1.16