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

DEV_Addr.i

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 // $Id: DEV_Addr.i,v 1.1.1.4 2003/02/21 18:36:32 chad Exp $
00003 
00004 #include "ace/SString.h"
00005 
00006 ACE_INLINE void
00007 ACE_DEV_Addr::set (const ACE_TCHAR *devname)
00008 {
00009   ACE_TRACE ("ACE_DEV_Addr::set");
00010 
00011   this->ACE_Addr::base_set
00012     (AF_DEV, ACE_static_cast (int, ACE_OS::strlen (devname)));
00013   ACE_OS::strsncpy (this->devname_, devname, MAXNAMLEN);
00014 }
00015 
00016 // Transform the current address into string format.
00017 
00018 ACE_INLINE int
00019 ACE_DEV_Addr::addr_to_string (ACE_TCHAR *s, size_t len) const
00020 {
00021   ACE_TRACE ("ACE_DEV_Addr::addr_to_string");
00022 
00023   ACE_OS::strsncpy (s, this->devname_, len);
00024   return 0;
00025 }
00026 
00027 // Return a pointer to the address.
00028 
00029 ACE_INLINE void *
00030 ACE_DEV_Addr::get_addr (void) const
00031 {
00032   ACE_TRACE ("ACE_DEV_Addr::get_addr");
00033 
00034   return (void *) &this->devname_;
00035 }
00036 
00037 // Compare two addresses for equality.
00038 
00039 ACE_INLINE int
00040 ACE_DEV_Addr::operator == (const ACE_DEV_Addr &sap) const
00041 {
00042   ACE_TRACE ("ACE_DEV_Addr::operator ==");
00043 
00044   return ACE_OS::strcmp (this->devname_, sap.devname_) == 0;
00045 }
00046 
00047 // Compare two addresses for inequality.
00048 
00049 ACE_INLINE int
00050 ACE_DEV_Addr::operator != (const ACE_DEV_Addr &sap) const
00051 {
00052   ACE_TRACE ("ACE_DEV_Addr::operator !=");
00053 
00054   return !((*this) == sap);     // This is lazy, of course... ;-).
00055 }
00056 
00057 // Return the path name used for the rendezvous point.
00058 
00059 ACE_INLINE const ACE_TCHAR *
00060 ACE_DEV_Addr::get_path_name (void) const
00061 {
00062   ACE_TRACE ("ACE_DEV_Addr::get_path_name");
00063 
00064   return this->devname_;
00065 }

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