OpenDDS  Snapshot(2023/04/28-20:55)
QueueRemoveVisitor.h
Go to the documentation of this file.
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_QUEUEREMOVEVISITOR_H
9 #define OPENDDS_DCPS_TRANSPORT_FRAMEWORK_QUEUEREMOVEVISITOR_H
10 
11 #include "dds/DCPS/dcps_export.h"
12 #include "dds/DCPS/GuidUtils.h"
13 #include "BasicQueueVisitor_T.h"
14 #include "TransportDefs.h"
15 #include "TransportQueueElement.h"
16 
17 #include "ace/Message_Block.h"
18 
20 
21 namespace OpenDDS {
22 namespace DCPS {
23 
24 class TransportQueueElement;
25 
27  : public BasicQueueVisitor<TransportQueueElement> {
28 public:
29 
30  explicit QueueRemoveVisitor(const TransportQueueElement::MatchCriteria& mc, bool remove_all = false);
31 
32  virtual ~QueueRemoveVisitor();
33 
34  /// The BasicQueue<T>::accept_remove_visitor() method will call
35  /// this visit_element_remove() method for each element in the queue.
36  virtual int visit_element_remove(TransportQueueElement* element,
37  int& remove);
38 
39  /// Accessor for the status. Called after this visitor object has
40  /// been passed to BasicQueue<T>::accept_remove_visitor().
41  RemoveResult status() const;
42 
43  int removed_bytes() const;
44 
45 private:
46 
47  /// Criteria object describing the Queue Element that needs to be removed.
49 
50  /// Holds the status of our visit.
52 
54 
56 };
57 
58 } // namespace DCPS
59 } // namespace OpenDDS
60 
62 
63 #if defined (__ACE_INLINE__)
64 #include "QueueRemoveVisitor.inl"
65 #endif /* __ACE_INLINE__ */
66 
67 #endif /* OPENDDS_DCPS_QUEUEREMOVEVISITOR_H */
#define OpenDDS_Dcps_Export
Definition: dcps_export.h:24
RemoveResult
used by DataLink::remove_sample(), TransportSendStrategy, *RemoveVisitor
RemoveResult status_
Holds the status of our visit.
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
const TransportQueueElement::MatchCriteria & mc_
Criteria object describing the Queue Element that needs to be removed.
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28
Base wrapper class around a data/control sample to be sent.