RemoveAllVisitor.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_REMOVEALLVISITOR_H
00009 #define OPENDDS_DCPS_REMOVEALLVISITOR_H
00010 
00011 #include "dds/DCPS/dcps_export.h"
00012 #include "BasicQueueVisitor_T.h"
00013 
00014 namespace OpenDDS {
00015 namespace DCPS {
00016 
00017 class TransportQueueElement;
00018 
00019 class OpenDDS_Dcps_Export RemoveAllVisitor : public BasicQueueVisitor<TransportQueueElement> {
00020 public:
00021 
00022   RemoveAllVisitor();
00023 
00024   virtual ~RemoveAllVisitor();
00025 
00026   /// The BasicQueue<T>::accept_remove_visitor() method will call
00027   /// this visit_element_remove() method for each element in the queue.
00028   virtual int visit_element_remove(TransportQueueElement* element,
00029                                    int&                   remove);
00030 
00031   /// Accessor for the status.  Called after this visitor object has
00032   /// been passed to BasicQueue<T>::accept_remove_visitor().
00033   int status() const;
00034 
00035   int removed_bytes() const;
00036 
00037 private:
00038 
00039   /// Holds the status of our visit.
00040   int status_;
00041 
00042   size_t removed_bytes_;
00043 };
00044 
00045 } // namespace DCPS
00046 } // namespace OpenDDS
00047 
00048 #if defined (__ACE_INLINE__)
00049 #include "RemoveAllVisitor.inl"
00050 #endif /* __ACE_INLINE__ */
00051 
00052 #endif  /* OPENDDS_DCPS_REMOVEALLVISITOR_H */

Generated on Fri Feb 12 20:05:25 2016 for OpenDDS by  doxygen 1.4.7