DEV_Addr.inl

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // $Id: DEV_Addr.inl 80826 2008-03-04 14:51:23Z wotte $
00004 
00005 #include "ace/OS_NS_string.h"
00006 #include "ace/Global_Macros.h"
00007 #include "ace/os_include/sys/os_socket.h"
00008 
00009 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00010 
00011 ACE_INLINE void
00012 ACE_DEV_Addr::set (const ACE_TCHAR *devname)
00013 {
00014   ACE_TRACE ("ACE_DEV_Addr::set");
00015 
00016   this->ACE_Addr::base_set
00017     (AF_DEV, static_cast<int> (ACE_OS::strlen (devname)));
00018   ACE_OS::strsncpy (this->devname_, devname, ACE_DEV_Addr::DEVNAME_LENGTH);
00019 }
00020 
00021 // Compare two addresses for equality.
00022 
00023 ACE_INLINE bool
00024 ACE_DEV_Addr::operator == (const ACE_DEV_Addr &sap) const
00025 {
00026   ACE_TRACE ("ACE_DEV_Addr::operator ==");
00027 
00028   return ACE_OS::strcmp (this->devname_, sap.devname_) == 0;
00029 }
00030 
00031 // Compare two addresses for inequality.
00032 
00033 ACE_INLINE bool
00034 ACE_DEV_Addr::operator != (const ACE_DEV_Addr &sap) const
00035 {
00036   ACE_TRACE ("ACE_DEV_Addr::operator !=");
00037 
00038   return !((*this) == sap);     // This is lazy, of course... ;-).
00039 }
00040 
00041 // Return the path name used for the rendezvous point.
00042 
00043 ACE_INLINE const ACE_TCHAR *
00044 ACE_DEV_Addr::get_path_name (void) const
00045 {
00046   ACE_TRACE ("ACE_DEV_Addr::get_path_name");
00047 
00048   return this->devname_;
00049 }
00050 
00051 ACE_END_VERSIONED_NAMESPACE_DECL

Generated on Tue Feb 2 17:18:39 2010 for ACE by  doxygen 1.4.7