LCOV - code coverage report
Current view: top level - DCPS/transport/framework - BasicQueueVisitor_T.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 4 10 40.0 %
Date: 2023-04-30 01:32:43 Functions: 2 12 16.7 %

          Line data    Source code
       1             : /*
       2             :  *
       3             :  *
       4             :  * Distributed under the OpenDDS License.
       5             :  * See: http://www.opendds.org/license.html
       6             :  */
       7             : 
       8             : #ifndef OPENDDS_DCPS_TRANSPORT_FRAMEWORK_BASICQUEUEVISITOR_T_H
       9             : #define OPENDDS_DCPS_TRANSPORT_FRAMEWORK_BASICQUEUEVISITOR_T_H
      10             : 
      11             : #include "ace/CORBA_macros.h"
      12             : 
      13             : OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
      14             : 
      15             : namespace OpenDDS {
      16             : namespace DCPS {
      17             : 
      18             : template <typename T>
      19             : class BasicQueueVisitor {
      20             : public:
      21             : 
      22           6 :   BasicQueueVisitor() {
      23           6 :   }
      24             : 
      25           6 :   virtual ~BasicQueueVisitor() {
      26           6 :   }
      27             : 
      28             :   /// This is the visit_element() method that will be called when the
      29             :   /// visitation method used is BasicQueue<T>::accept_visitor().
      30             :   ///
      31             :   /// Return 0 if visiting should stop, return 1 to continue visiting.
      32           0 :   virtual int visit_element(T* element) {
      33             :     ACE_UNUSED_ARG(element);
      34           0 :     return 0;
      35             :   }
      36             : 
      37             :   /// This is the visit_element_remove() method that will be called when the
      38             :   /// visitation method used is BasicQueue<T>::accept_remove_visitor().
      39             :   ///
      40             :   /// Return 0 if visiting should stop, return 1 to continue visiting.
      41             :   /// The remove is an "inout" argument that is always passed-in with
      42             :   /// a false (0) value, indicating that the link should not be
      43             :   /// removed from the queue as a result of this visit.  If the
      44             :   /// visit_remove() implementation decides that the link should be
      45             :   /// removed, then it must set the remove argument to true (1).
      46             :   /// By default, this method is implemented to just return 0 to
      47             :   /// stop the "remove visitation" immediately.  It doesn't modify
      48             :   /// the value of the remove argument.
      49           0 :   virtual int visit_element_remove(T* element, int& remove) {
      50             :     ACE_UNUSED_ARG(element);
      51             :     ACE_UNUSED_ARG(remove);
      52           0 :     return 0;
      53             :   }
      54             : 
      55             :   /// This is the visit_element_ref() method that will be called when the
      56             :   /// visitation method used is BasicQueue<T>::accept_replace_visitor().
      57             :   ///
      58             :   /// Return 0 if visiting should stop, return 1 to continue visiting.
      59           0 :   virtual int visit_element_ref(T*& element) {
      60             :     ACE_UNUSED_ARG(element);
      61           0 :     return 0;
      62             :   }
      63             : };
      64             : 
      65             : } // namespace DCPS
      66             : } // namespace OpenDDS
      67             : 
      68             : OPENDDS_END_VERSIONED_NAMESPACE_DECL
      69             : 
      70             : #endif  /* OPENDDS_DCPS_BASICQUEUEVISITOR_T_H */

Generated by: LCOV version 1.16