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

IO_SAP.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    IO_SAP.h
00006  *
00007  *  $Id: IO_SAP.h,v 1.1.1.3 2001/12/04 14:33:02 chad Exp $
00008  *
00009  *  @author Doug Schmidt
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef ACE_IO_SAP_H
00015 #define ACE_IO_SAP_H
00016 #include "ace/pre.h"
00017 
00018 #include "ace/Flag_Manip.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 /**
00025  * @class ACE_IO_SAP
00026  *
00027  * @brief Defines the methods for the base class of the <ACE_IO_SAP>
00028  * abstraction, which includes <ACE_FILE> and <ACE_DEV>.
00029  */
00030 class ACE_Export ACE_IO_SAP
00031 {
00032 public:
00033   enum
00034   {
00035     /// Be consistent with Winsock
00036     INVALID_HANDLE = -1
00037   };
00038 
00039   /// Default dtor.
00040   ~ACE_IO_SAP (void);
00041 
00042   /// Interface for ioctl.
00043   int control (int cmd, void *) const;
00044 
00045   // = Common I/O handle options related to files.
00046 
00047   /**
00048    * Enable asynchronous I/O (ACE_SIGIO), urgent data (ACE_SIGURG),
00049    * non-blocking I/O (ACE_NONBLOCK), or close-on-exec (ACE_CLOEXEC),
00050    * which is passed as the <value>.
00051    */
00052   int enable (int value) const;
00053 
00054   /**
00055    * Disable asynchronous I/O (ACE_SIGIO), urgent data (ACE_SIGURG),
00056    * non-blocking I/O (ACE_NONBLOCK), or close-on-exec (ACE_CLOEXEC),
00057    * which is passed as the <value>.
00058    */
00059   int disable (int value) const;
00060 
00061   /// Get the underlying handle.
00062   ACE_HANDLE get_handle (void) const;
00063 
00064   /// Set the underlying handle.
00065   void set_handle (ACE_HANDLE handle);
00066 
00067   /// Dump the state of an object.
00068   void dump (void) const;
00069 
00070   /// Declare the dynamic allocation hooks.
00071   ACE_ALLOC_HOOK_DECLARE;
00072 
00073 protected:
00074   /// Ensure that ACE_IO_SAP is an abstract base class.
00075   ACE_IO_SAP (void);
00076 
00077 private:
00078   /// Underlying I/O handle.
00079   ACE_HANDLE handle_;
00080 
00081   /// Cache the process ID.
00082   static pid_t pid_;
00083 };
00084 
00085 #if !defined (ACE_LACKS_INLINE_FUNCTIONS)
00086 #include "ace/IO_SAP.i"
00087 #endif /* ACE_LACKS_INLINE_FUNCTIONS */
00088 
00089 #include "ace/post.h"
00090 #endif /* ACE_IO_SAP_H */

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