Asynch_Pseudo_Task.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Asynch_Pseudo_Task.h
00006  *
00007  *  $Id: Asynch_Pseudo_Task.h 80826 2008-03-04 14:51:23Z wotte $
00008  *
00009  *  @author Alexander Libman <alibman@ihug.com.au>
00010  */
00011 //=============================================================================
00012 
00013 #ifndef ACE_ASYNCH_PSEUDO_TASK_H
00014 #define ACE_ASYNCH_PSEUDO_TASK_H
00015 
00016 #include /**/ "ace/pre.h"
00017 
00018 #include /**/ "ace/config-all.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 #pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #include "ace/Reactor.h"
00025 #include "ace/Select_Reactor.h"
00026 #include "ace/Task.h"
00027 
00028 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00029 
00030 /*
00031  * Specialization hook to replace the Reactor with the
00032  * concrete Reactor implementation, e.g., select_st,
00033  * select_mt etc.
00034  */
00035 //@@ REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK
00036 
00037 /**
00038  * @class ACE_Asynch_Pseudo_Task
00039  *
00040  */
00041 class ACE_Export ACE_Asynch_Pseudo_Task : public ACE_Task<ACE_NULL_SYNCH>
00042 {
00043 public:
00044   ACE_Asynch_Pseudo_Task();
00045   virtual ~ACE_Asynch_Pseudo_Task();
00046 
00047   int start (void);
00048   int stop (void);
00049 
00050   int register_io_handler (ACE_HANDLE handle,
00051                            ACE_Event_Handler *handler,
00052                            ACE_Reactor_Mask mask,
00053                            int flg_suspend);
00054 
00055   int remove_io_handler (ACE_HANDLE handle);
00056   int remove_io_handler (ACE_Handle_Set &set);
00057   int resume_io_handler (ACE_HANDLE handle);
00058   int suspend_io_handler (ACE_HANDLE handle);
00059 
00060 protected:
00061   virtual int svc (void);
00062 
00063   /// Should be initialized before reactor_
00064   ACE_Select_Reactor select_reactor_;
00065 
00066   ACE_Reactor reactor_;
00067 };
00068 
00069 ACE_END_VERSIONED_NAMESPACE_DECL
00070 
00071 #include /**/ "ace/post.h"
00072 
00073 #endif /* ACE_ASYNCH_PSEUDO_TASK_H */

Generated on Tue Feb 2 17:18:38 2010 for ACE by  doxygen 1.4.7