[7297] Fixed profession spells sorting in trainer spell list at client.
[getmangos.git] / dep / ACE_wrappers / ace / SPIPE.h
blob6654b82a6f3809df89a0e875e2c21740c8ec8a58
1 /* -*- C++ -*- */
3 //=============================================================================
4 /**
5 * @file SPIPE.h
7 * $Id: SPIPE.h 80826 2008-03-04 14:51:23Z wotte $
9 * @author Doug Schmidt
11 //=============================================================================
14 #ifndef ACE_SPIPE_H
15 #define ACE_SPIPE_H
16 #include /**/ "ace/pre.h"
18 #include "ace/IPC_SAP.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 # pragma once
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #include "ace/SPIPE_Addr.h"
26 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
28 /**
29 * @class ACE_SPIPE
31 * @brief Defines the member functions for the base class of the
32 * ACE_SPIPE abstraction.
34 * ACE_SPIPE was designed as a wrapper facade for STREAM pipes. On
35 * Windows, however, ACE_SPIPE is a wrapper for Named Pipes. Therefore,
36 * on Windows, it is better to use the ACE_Proactor or blocking operations
37 * in lieu of using the ACE_Reactor.
39 * @sa ACE_SPIPE_Acceptor for additional notes on use with ACE_Reactor
40 * on Windows.
42 * @warning Windows: Works only on Windows NT 4 and higher.
43 * @warning Works on non-Windows platforms only when @c ACE_HAS_STREAM_PIPES
44 * is defined.
46 class ACE_Export ACE_SPIPE : public ACE_IPC_SAP
48 public:
49 /// Close down the SPIPE without removing the rendezvous point.
50 /**
51 * Closes the underlying pipe handle and sets this object's handle value
52 * to @c ACE_INVALID_HANDLE.
53 * @return 0 for success; -1 for failure. If a failure occurs, further
54 * error information is available from ACE_OS::last_error().
56 int close (void);
58 /// Close down the SPIPE and remove the rendezvous point from
59 /// the file system.
60 /**
61 * @return 0 for success; -1 for failure. If a failure occurs, further
62 * error information is available from ACE_OS::last_error().
64 int remove (void);
66 /// Return the local address of this endpoint.
67 /**
68 * Returns the local address of the SPIPE's endpoint in @arg addr.
69 * @return 0 for success; -1 for failure. If a failure occurs, further
70 * error information is available from ACE_OS::last_error().
72 int get_local_addr (ACE_SPIPE_Addr &) const;
74 /**
75 * Disable signal @arg signum.
76 * @note This reimplements the inherited method from
77 * ACE_IPC_SAP. Since the signal actions do not make any sense on
78 * Windows, this method intercepts the call and NOPs it. On non-Windows,
79 * it is passed through to ACE_IPC_SAP::disable().
81 int disable (int signum) const ;
83 /// Dump the state of an object.
84 void dump (void) const;
86 #if defined (ACE_HAS_STREAM_PIPES)
87 /// Temporary store of duplex pipe handle.
88 void set_duplex_handle (ACE_HANDLE handle);
89 #endif /* ACE_HAS_STREAM_PIPES */
91 /// Declare the dynamic allocation hooks.
92 ACE_ALLOC_HOOK_DECLARE;
94 private:
95 #if defined (ACE_HAS_STREAM_PIPES)
96 /// Duplex to the pipe I/O handle.
97 /// Stored here for latter cleaning.
98 ACE_HANDLE duplex_pipe_handle_;
99 #endif /* ACE_HAS_STREAM_PIPES */
101 protected:
102 /// Ensure that this class is an abstract base class
103 ACE_SPIPE (void);
105 /// Our local address.
106 ACE_SPIPE_Addr local_addr_;
109 ACE_END_VERSIONED_NAMESPACE_DECL
111 #if defined (__ACE_INLINE__)
112 #include "ace/SPIPE.inl"
113 #endif /* __ACE_INLINE__ */
115 #include /**/ "ace/post.h"
116 #endif /* ACE_SPIPE_H */