FILE_Addr.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    FILE_Addr.h
00006  *
00007  *  FILE_Addr.h,v 4.27 2005/10/28 16:14:52 ossama 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 #include "ace/os_include/os_dirent.h"
00026 
00027 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00028 
00029 /**
00030  * @class ACE_FILE_Addr
00031  *
00032  * @brief Defines the FILE address family address format.
00033  */
00034 class ACE_Export ACE_FILE_Addr : public ACE_Addr
00035 {
00036 public:
00037   // = Initialization methods.
00038   /// Default constructor.
00039   ACE_FILE_Addr (void);
00040 
00041   /// Copy constructor.
00042   ACE_FILE_Addr (const ACE_FILE_Addr &sa);
00043 
00044   /// Acts like a copy constructor.  If <sa> == ACE_Addr::sap_any then
00045   /// create a temporary filename using <ACE_OS::mktemp>.
00046   int set (const ACE_FILE_Addr &sa);
00047 
00048   /// Create a ACE_FILE_Addr from a pathname.
00049   explicit ACE_FILE_Addr (const ACE_TCHAR *filename);
00050 
00051   /// Create a ACE_FILE_Addr from a pathname.
00052   int set (const ACE_TCHAR *filename);
00053 
00054   /// Assignment operator.
00055   ACE_FILE_Addr &operator= (const ACE_FILE_Addr &);
00056 
00057   /// Return a pointer to the address.
00058   virtual void *get_addr (void) const;
00059 
00060   /// Transform the current address into string format.
00061   virtual int addr_to_string (ACE_TCHAR *addr, size_t) const;
00062 
00063   /// Compare two addresses for equality.
00064   bool operator == (const ACE_FILE_Addr &SAP) const;
00065 
00066   /// Compare two addresses for inequality.
00067   bool operator != (const ACE_FILE_Addr &SAP) const;
00068 
00069   /// Return the path name used for the rendezvous point.
00070   const ACE_TCHAR *get_path_name (void) const;
00071 
00072   /// Dump the state of an object.
00073   void dump (void) const;
00074 
00075   /// Declare the dynamic allocation hooks.
00076   ACE_ALLOC_HOOK_DECLARE;
00077 
00078 private:
00079   /// Name of the file.
00080   ACE_TCHAR filename_[MAXPATHLEN + 1];
00081 };
00082 
00083 ACE_END_VERSIONED_NAMESPACE_DECL
00084 
00085 #if defined (__ACE_INLINE__)
00086 #include "ace/FILE_Addr.inl"
00087 #endif /* __ACE_INLINE__ */
00088 
00089 #include /**/ "ace/post.h"
00090 #endif /* ACE_FILE_ADDR_H */

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