00001 /* -*- C++ -*- */ 00002 00003 //============================================================================= 00004 /** 00005 * @file IPC_SAP.h 00006 * 00007 * $Id: IPC_SAP.h,v 1.1.1.3 2001/12/04 14:33:02 chad Exp $ 00008 * 00009 * @author Douglas C. Schmidt <schmidt@cs.wustl.edu> 00010 */ 00011 //============================================================================= 00012 00013 #ifndef ACE_IPC_SAP_H 00014 #define ACE_IPC_SAP_H 00015 #include "ace/pre.h" 00016 00017 #include "ace/Flag_Manip.h" 00018 00019 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00020 # pragma once 00021 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00022 00023 /** 00024 * @class ACE_IPC_SAP 00025 * 00026 * @brief Defines the member functions for the base class of the 00027 * ACE_IPC_SAP abstraction. 00028 */ 00029 class ACE_Export ACE_IPC_SAP 00030 { 00031 public: 00032 /// Default dtor. 00033 ~ACE_IPC_SAP (void); 00034 00035 /// Interface for <ioctl>. 00036 int control (int cmd, void *) const; 00037 00038 // = Common I/O handle options related to sockets. 00039 00040 /** 00041 * Enable asynchronous I/O (ACE_SIGIO), urgent data (ACE_SIGURG), 00042 * non-blocking I/O (ACE_NONBLOCK), or close-on-exec (ACE_CLOEXEC), 00043 * which is passed as the <value>. 00044 */ 00045 int enable (int value) const; 00046 00047 /** 00048 * Disable 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 disable (int value) const; 00053 00054 /// Get the underlying handle. 00055 ACE_HANDLE get_handle (void) const; 00056 00057 /// Set the underlying handle. 00058 void set_handle (ACE_HANDLE handle); 00059 00060 /// Dump the state of an object. 00061 void dump (void) const; 00062 00063 /// Declare the dynamic allocation hooks. 00064 ACE_ALLOC_HOOK_DECLARE; 00065 00066 protected: 00067 // = Ensure that ACE_IPC_SAP is an abstract base class. 00068 /// Default constructor. 00069 ACE_IPC_SAP (void); 00070 00071 private: 00072 /// Underlying I/O handle. 00073 ACE_HANDLE handle_; 00074 00075 /// Cache the process ID. 00076 static pid_t pid_; 00077 }; 00078 00079 #if !defined (ACE_LACKS_INLINE_FUNCTIONS) 00080 #include "ace/IPC_SAP.i" 00081 #endif /* ACE_LACKS_INLINE_FUNCTIONS */ 00082 00083 #include "ace/post.h" 00084 #endif /* ACE_IPC_SAP_H */
1.2.14 written by Dimitri van Heesch,
© 1997-2002