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

FILE_Addr.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    FILE_Addr.h
00006  *
00007  *  $Id: FILE_Addr.h,v 1.1.1.3 2001/12/04 14:33:00 chad Exp $
00008  *
00009  *  @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef ACE_FILE_ADDR_H
00015 #define ACE_FILE_ADDR_H
00016 #include "ace/pre.h"
00017 
00018 #include "ace/Addr.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #include "ace/Flag_Manip.h"
00025 
00026 /**
00027  * @class ACE_FILE_Addr
00028  *
00029  * @brief Defines the FILE address family address format.
00030  */
00031 class ACE_Export ACE_FILE_Addr : public ACE_Addr
00032 {
00033 public:
00034   // = Initialization methods.
00035   /// Default constructor.
00036   ACE_FILE_Addr (void);
00037 
00038   /// Copy constructor.
00039   ACE_FILE_Addr (const ACE_FILE_Addr &sa);
00040 
00041   /// Acts like a copy constructor.  If <sa> == ACE_Addr::sap_any then
00042   /// create a temporary filename using <ACE_OS::mktemp>.
00043   int set (const ACE_FILE_Addr &sa);
00044 
00045   /// Create a ACE_FILE_Addr from a pathname.
00046   ACE_EXPLICIT ACE_FILE_Addr (const ACE_TCHAR *filename);
00047 
00048   /// Create a ACE_FILE_Addr from a pathname.
00049   int set (const ACE_TCHAR *filename);
00050 
00051   /// Assignment operator.
00052   ACE_FILE_Addr &operator= (const ACE_FILE_Addr &);
00053 
00054   /// Return a pointer to the address.
00055   virtual void *get_addr (void) const;
00056 
00057   /// Transform the current address into string format.
00058   virtual int addr_to_string (ACE_TCHAR *addr, size_t) const;
00059 
00060   /// Compare two addresses for equality.
00061   int operator == (const ACE_FILE_Addr &SAP) const;
00062 
00063   /// Compare two addresses for inequality.
00064   int operator != (const ACE_FILE_Addr &SAP) const;
00065 
00066   /// Return the path name used for the rendezvous point.
00067   const ACE_TCHAR *get_path_name (void) const;
00068 
00069   /// Dump the state of an object.
00070   void dump (void) const;
00071 
00072   /// Declare the dynamic allocation hooks.
00073   ACE_ALLOC_HOOK_DECLARE;
00074 
00075 private:
00076   /// Name of the file.
00077   ACE_TCHAR filename_[MAXNAMLEN + 1];
00078 };
00079 
00080 #if defined (__ACE_INLINE__)
00081 #include "ace/FILE_Addr.i"
00082 #endif /* __ACE_INLINE__ */
00083 
00084 #include "ace/post.h"
00085 #endif /* ACE_FILE_ADDR_H */

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