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

FIFO.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 
00003 //==========================================================================
00004 /**
00005  *  @file    FIFO.h
00006  *
00007  *  $Id: FIFO.h,v 1.1.1.4 2003/02/21 18:36:32 chad 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/IPC_SAP.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 /**
00025  * @class ACE_FIFO
00026  *
00027  * @brief Abstract base class for UNIX FIFOs
00028  *
00029  * UNIX FIFOs are also known Named Pipes, which are totally
00030  * unrelated to Win32 Named Pipes.  If you want to use a local
00031  * IPC mechanism that will be portable to both UNIX and Win32,
00032  * take a look at the <ACE_SPIPE_*> classes.
00033  */
00034 class ACE_Export ACE_FIFO : public ACE_IPC_SAP
00035 {
00036 public:
00037   /// Open up the named pipe on the <rendezvous> in accordance with the
00038   /// flags.
00039   int open (const ACE_TCHAR *rendezvous, int flags, int perms,
00040             LPSECURITY_ATTRIBUTES sa = 0);
00041 
00042   /// Close down the ACE_FIFO without removing the rendezvous point.
00043   int close (void);
00044 
00045   /// Close down the ACE_FIFO and remove the rendezvous point from the
00046   /// file system.
00047   int remove (void);
00048 
00049   /// Return the local address of this endpoint.
00050   int get_local_addr (const ACE_TCHAR *&rendezvous) const;
00051 
00052   /// Dump the state of an object.
00053   void dump (void) const;
00054 
00055   /// Declare the dynamic allocation hooks.
00056   ACE_ALLOC_HOOK_DECLARE;
00057 
00058 protected:
00059   // = Make these protected to ensure that the class is "abstract."
00060   /// Default constructor.
00061   ACE_FIFO (void);
00062 
00063   /// Open up the named pipe on the <rendezvous> in accordance with the
00064   /// flags.
00065   ACE_FIFO (const ACE_TCHAR *rendezvous, int flags, int perms,
00066             LPSECURITY_ATTRIBUTES sa = 0);
00067 
00068 private:
00069   /// Rendezvous point in the file system.
00070   ACE_TCHAR rendezvous_[MAXPATHLEN + 1];
00071 };
00072 
00073 #if defined (__ACE_INLINE__)
00074 #include "ace/FIFO.i"
00075 #endif /* __ACE_INLINE__ */
00076 
00077 #include "ace/post.h"
00078 #endif /* ACE_FIFO_H */

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