ThreadSynchWorker.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_THREADSYNCHWORKER_H
00009 #define OPENDDS_DCPS_THREADSYNCHWORKER_H
00010 
00011 #include "dds/DCPS/dcps_export.h"
00012 
00013 #include "ace/Event_Handler.h"
00014 
00015 namespace OpenDDS {
00016 namespace DCPS {
00017 
00018 class OpenDDS_Dcps_Export ThreadSynchWorker {
00019 public:
00020 
00021   virtual ~ThreadSynchWorker();
00022 
00023   enum WorkOutcome {
00024     WORK_OUTCOME_MORE_TO_DO,
00025     WORK_OUTCOME_NO_MORE_TO_DO,
00026     WORK_OUTCOME_CLOGGED_RESOURCE,
00027     WORK_OUTCOME_BROKEN_RESOURCE
00028   };
00029 
00030   virtual WorkOutcome perform_work() = 0;
00031 
00032   /// Indicate that queued data is available to be sent.
00033   virtual void schedule_output();
00034 
00035   /// DataLink reference value for diagnostics.
00036   std::size_t id() const;
00037 
00038 protected:
00039 
00040   ThreadSynchWorker( std::size_t id = 0);
00041 
00042 private:
00043   std::size_t id_;
00044 };
00045 
00046 } // namespace DCPS
00047 } // namespace OpenDDS
00048 
00049 #if defined (__ACE_INLINE__)
00050 #include "ThreadSynchWorker.inl"
00051 #endif /* __ACE_INLINE__ */
00052 
00053 #endif  /* OPENDDS_DCPS_THREADSYNCHWORKER_H */

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