OpenDDS  Snapshot(2023/04/28-20:55)
RemoveAllVisitor.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_REMOVEALLVISITOR_H
9 #define OPENDDS_DCPS_TRANSPORT_FRAMEWORK_REMOVEALLVISITOR_H
10 
11 #include "dds/DCPS/dcps_export.h"
12 #include "BasicQueueVisitor_T.h"
13 
15 
16 namespace OpenDDS {
17 namespace DCPS {
18 
19 class TransportQueueElement;
20 
21 class OpenDDS_Dcps_Export RemoveAllVisitor : public BasicQueueVisitor<TransportQueueElement> {
22 public:
23 
25 
26  virtual ~RemoveAllVisitor();
27 
28  /// The BasicQueue<T>::accept_remove_visitor() method will call
29  /// this visit_element_remove() method for each element in the queue.
30  virtual int visit_element_remove(TransportQueueElement* element,
31  int& remove);
32 
33  /// Accessor for the status. Called after this visitor object has
34  /// been passed to BasicQueue<T>::accept_remove_visitor().
35  int status() const;
36 
37  int removed_bytes() const;
38 
39 private:
40 
41  /// Holds the status of our visit.
42  int status_;
43 
45 };
46 
47 } // namespace DCPS
48 } // namespace OpenDDS
49 
51 
52 #if defined (__ACE_INLINE__)
53 #include "RemoveAllVisitor.inl"
54 #endif /* __ACE_INLINE__ */
55 
56 #endif /* OPENDDS_DCPS_REMOVEALLVISITOR_H */
#define OpenDDS_Dcps_Export
Definition: dcps_export.h:24
int status_
Holds the status of our visit.
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28
Base wrapper class around a data/control sample to be sent.