QueueRemoveVisitor.h

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 #ifndef OPENDDS_DCPS_QUEUEREMOVEVISITOR_H
00009 #define OPENDDS_DCPS_QUEUEREMOVEVISITOR_H
00010 
00011 #include "dds/DCPS/dcps_export.h"
00012 #include "dds/DCPS/GuidUtils.h"
00013 #include "BasicQueueVisitor_T.h"
00014 #include "TransportDefs.h"
00015 #include "TransportQueueElement.h"
00016 
00017 #include "ace/Message_Block.h"
00018 
00019 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
00020 
00021 namespace OpenDDS {
00022 namespace DCPS {
00023 
00024 class TransportQueueElement;
00025 
00026 class OpenDDS_Dcps_Export QueueRemoveVisitor
00027   : public BasicQueueVisitor<TransportQueueElement> {
00028 public:
00029 
00030   explicit QueueRemoveVisitor(const TransportQueueElement::MatchCriteria& mc);
00031 
00032   virtual ~QueueRemoveVisitor();
00033 
00034   /// The BasicQueue<T>::accept_remove_visitor() method will call
00035   /// this visit_element_remove() method for each element in the queue.
00036   virtual int visit_element_remove(TransportQueueElement* element,
00037                                    int&                   remove);
00038 
00039   /// Accessor for the status.  Called after this visitor object has
00040   /// been passed to BasicQueue<T>::accept_remove_visitor().
00041   RemoveResult status() const;
00042 
00043   int removed_bytes() const;
00044 
00045 private:
00046 
00047   /// Criteria object describing the Queue Element that needs to be removed.
00048   const TransportQueueElement::MatchCriteria& mc_;
00049 
00050   /// Holds the status of our visit.
00051   RemoveResult status_;
00052 
00053   size_t removed_bytes_;
00054 };
00055 
00056 } // namespace DCPS
00057 } // namespace OpenDDS
00058 
00059 OPENDDS_END_VERSIONED_NAMESPACE_DECL
00060 
00061 #if defined (__ACE_INLINE__)
00062 #include "QueueRemoveVisitor.inl"
00063 #endif /* __ACE_INLINE__ */
00064 
00065 #endif  /* OPENDDS_DCPS_QUEUEREMOVEVISITOR_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1