Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

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,v 1.1.1.1 2003/02/21 18:36:32 chad 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 #include "ace/pre.h"
00016 
00017 #include "ace/OS.h"
00018 
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 #pragma once
00021 #endif /* ACE_LACKS_PRAGMA_ONCE */
00022 
00023 #include "ace/Reactor.h"
00024 #include "ace/Select_Reactor.h"
00025 #include "ace/Task.h"
00026 
00027 
00028 /**
00029  * @class ACE_Asynch_Pseudo_Task
00030  *
00031  */
00032 class ACE_Export ACE_Asynch_Pseudo_Task : public ACE_Task<ACE_SYNCH>
00033 {
00034   friend class ACE_POSIX_Asynch_Accept;
00035   friend class ACE_POSIX_Asynch_Connect;
00036   friend class ACE_WIN32_Asynch_Connect;
00037 
00038 public:
00039 
00040   ACE_Asynch_Pseudo_Task();
00041   virtual ~ACE_Asynch_Pseudo_Task();
00042 
00043   int start (void);
00044   int stop (void);
00045 
00046   virtual int svc (void);
00047 
00048   int is_active (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 
00062   int lock_finish (void);
00063   int unlock_finish (void);
00064 
00065   int flg_active_;
00066 
00067   ACE_Select_Reactor select_reactor_;  
00068   // should be initialized before reactor_
00069 
00070   ACE_Reactor reactor_;
00071 
00072   ACE_Lock &token_;
00073 
00074   int              finish_count_;
00075   ACE_Manual_Event finish_event_;
00076 };
00077 
00078 #include "ace/post.h"
00079 #endif /* ACE_ASYNCH_PSEUDO_TASK_H */

Generated on Mon Jun 16 11:19:07 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002