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

DEV_Addr.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //==========================================================================
00004 /**
00005  *  @file    DEV_Addr.h
00006  *
00007  *  $Id: DEV_Addr.h,v 1.1.1.4 2003/02/21 18:36:32 chad Exp $
00008  *
00009  *  @author Gerhard Lenzer and Douglas C. Schmidt
00010  */
00011 //==========================================================================
00012 
00013 
00014 #ifndef ACE_DEV_ADDR_H
00015 #define ACE_DEV_ADDR_H
00016 
00017 #include "ace/pre.h"
00018 
00019 #include "ace/Addr.h"
00020 
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif /* ACE_LACKS_PRAGMA_ONCE */
00024 
00025 #include "ace/OS.h"
00026 
00027 /**
00028  * @class ACE_DEV_Addr
00029  *
00030  * @brief Defines device address family address format.
00031  */
00032 class ACE_Export ACE_DEV_Addr : public ACE_Addr
00033 {
00034 public:
00035   // = Initialization methods.
00036   /// Default constructor.
00037   ACE_DEV_Addr (void);
00038 
00039   /// Copy constructor.
00040   ACE_DEV_Addr (const ACE_DEV_Addr &sa);
00041 
00042   /// Acts like a copy constructor.
00043   int set (const ACE_DEV_Addr &sa);
00044 
00045   /// Create a ACE_DEV_Addr from a device name.
00046   ACE_EXPLICIT ACE_DEV_Addr (const ACE_TCHAR *devname);
00047 
00048   /// Create a ACE_Addr from a ACE_DEV pathname.
00049   void set (const ACE_TCHAR *devname);
00050 
00051   /// Assignment operator.
00052   ACE_DEV_Addr &operator= (const ACE_DEV_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_DEV_Addr &SAP) const;
00062 
00063   /// Compare two addresses for inequality.
00064   int operator != (const ACE_DEV_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 device.
00077   ACE_TCHAR devname_[MAXNAMLEN + 1];
00078 };
00079 
00080 #if defined (__ACE_INLINE__)
00081 #include "ace/DEV_Addr.i"
00082 #endif /* __ACE_INLINE__ */
00083 
00084 #include "ace/post.h"
00085 
00086 #endif /* ACE_DEV_ADDR_H */

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