Initial Patch of Auction House bot rev. 135
[auctionmangos.git] / dep / ACE_wrappers / ace / IPC_SAP.h
blob43a2125c57580fa54e4d04cf1d6ec417e24d8f4b
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file IPC_SAP.h
7 * $Id: IPC_SAP.h 80826 2008-03-04 14:51:23Z wotte $
9 * @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
11 //=============================================================================
13 #ifndef ACE_IPC_SAP_H
14 #define ACE_IPC_SAP_H
15 #include /**/ "ace/pre.h"
17 #include "ace/Flag_Manip.h"
18 #include "ace/os_include/sys/os_types.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 # pragma once
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
26 /**
27 * @class ACE_IPC_SAP
29 * @brief Defines the member functions for the base class of the
30 * ACE_IPC_SAP abstraction.
32 class ACE_Export ACE_IPC_SAP
34 public:
36 /// Interface for <ioctl>.
37 int control (int cmd, void *) const;
39 // = Common I/O handle options related to sockets.
41 /**
42 * Enable asynchronous I/O (ACE_SIGIO), urgent data (ACE_SIGURG),
43 * non-blocking I/O (ACE_NONBLOCK), or close-on-exec (ACE_CLOEXEC),
44 * which is passed as the @a value.
46 int enable (int value) const;
48 /**
49 * Disable asynchronous I/O (ACE_SIGIO), urgent data (ACE_SIGURG),
50 * non-blocking I/O (ACE_NONBLOCK), or close-on-exec (ACE_CLOEXEC),
51 * which is passed as the @a value.
53 int disable (int value) const;
55 /// Get the underlying handle.
56 ACE_HANDLE get_handle (void) const;
58 /// Set the underlying handle.
59 void set_handle (ACE_HANDLE handle);
61 /// Dump the state of an object.
62 void dump (void) const;
64 /// Declare the dynamic allocation hooks.
65 ACE_ALLOC_HOOK_DECLARE;
67 protected:
69 // = Ensure that ACE_IPC_SAP is an abstract base class.
70 /// Default constructor.
71 ACE_IPC_SAP (void);
73 /// Protected destructor.
74 /**
75 * Not a virtual destructor. Protected destructor to prevent
76 * operator delete() from being called through a base class
77 * ACE_IPC_SAP pointer/reference.
79 ~ACE_IPC_SAP (void);
81 private:
82 /// Underlying I/O handle.
83 ACE_HANDLE handle_;
85 /// Cache the process ID.
86 static pid_t pid_;
89 ACE_END_VERSIONED_NAMESPACE_DECL
91 #if defined (__ACE_INLINE__)
92 #include "ace/IPC_SAP.inl"
93 #endif /* __ACE_INLINE__ */
95 #include /**/ "ace/post.h"
96 #endif /* ACE_IPC_SAP_H */