FIFO.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //==========================================================================
00004 /**
00005  *  @file    FIFO.h
00006  *
00007  *  FIFO.h,v 4.18 2006/03/14 21:15:49 sjiang Exp
00008  *
00009  *  @author Doug Schmidt
00010  */
00011 //==========================================================================
00012 
00013 
00014 #ifndef ACE_FIFO_H
00015 #define ACE_FIFO_H
00016 #include /**/ "ace/pre.h"
00017 
00018 #include "ace/ACE_export.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #include "ace/IPC_SAP.h"
00025 #include "ace/os_include/os_limits.h"
00026 
00027 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00028 
00029 /**
00030  * @class ACE_FIFO
00031  *
00032  * @brief Abstract base class for UNIX FIFOs
00033  *
00034  * UNIX FIFOs are also known Named Pipes, which are totally
00035  * unrelated to Win32 Named Pipes.  If you want to use a local
00036  * IPC mechanism that will be portable to both UNIX and Win32,
00037  * take a look at the <ACE_SPIPE_*> classes.
00038  */
00039 class ACE_Export ACE_FIFO : public ACE_IPC_SAP
00040 {
00041 public:
00042   /// Open up the named pipe on the <rendezvous> in accordance with the
00043   /// flags.
00044   int open (const ACE_TCHAR *rendezvous, int flags, mode_t perms,
00045             LPSECURITY_ATTRIBUTES sa = 0);
00046 
00047   /// Close down the ACE_FIFO without removing the rendezvous point.
00048   int close (void);
00049 
00050   /// Close down the ACE_FIFO and remove the rendezvous point from the
00051   /// file system.
00052   int remove (void);
00053 
00054   /// Return the local address of this endpoint.
00055   int get_local_addr (const ACE_TCHAR *&rendezvous) const;
00056 
00057   /// Dump the state of an object.
00058   void dump (void) const;
00059 
00060   /// Declare the dynamic allocation hooks.
00061   ACE_ALLOC_HOOK_DECLARE;
00062 
00063 protected:
00064   // = Make these protected to ensure that the class is "abstract."
00065   /// Default constructor.
00066   ACE_FIFO (void);
00067 
00068   /// Open up the named pipe on the <rendezvous> in accordance with the
00069   /// flags.
00070   ACE_FIFO (const ACE_TCHAR *rendezvous, int flags, mode_t perms,
00071             LPSECURITY_ATTRIBUTES sa = 0);
00072 
00073 private:
00074   /// Rendezvous point in the file system.
00075   ACE_TCHAR rendezvous_[MAXPATHLEN + 1];
00076 };
00077 
00078 ACE_END_VERSIONED_NAMESPACE_DECL
00079 
00080 #if defined (__ACE_INLINE__)
00081 #include "ace/FIFO.inl"
00082 #endif /* __ACE_INLINE__ */
00083 
00084 #include /**/ "ace/post.h"
00085 #endif /* ACE_FIFO_H */

Generated on Thu Nov 9 09:41:50 2006 for ACE by doxygen 1.3.6