Asynch_Pseudo_Task.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Asynch_Pseudo_Task.h
00006  *
00007  *  Asynch_Pseudo_Task.h,v 1.8 2005/10/28 16:14:51 ossama Exp
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   ACE_Select_Reactor select_reactor_;
00064   // should be initialized before reactor_
00065   ACE_Reactor reactor_;
00066 };
00067 
00068 ACE_END_VERSIONED_NAMESPACE_DECL
00069 
00070 #include /**/ "ace/post.h"
00071 
00072 #endif /* ACE_ASYNCH_PSEUDO_TASK_H */

Generated on Thu Nov 9 09:41:46 2006 for ACE by doxygen 1.3.6