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

DEV_Addr.cpp

Go to the documentation of this file.
00001 #include "ace_pch.h"
00002 // DEV_Addr.cpp
00003 // $Id: DEV_Addr.cpp,v 1.1.1.3.40.1 2003/03/13 19:44:21 chad Exp $
00004 
00005 #include "ace/DEV_Addr.h"
00006 #include "ace/Log_Msg.h"
00007 
00008 #if !defined (__ACE_INLINE__)
00009 #include "ace/DEV_Addr.i"
00010 #endif /* __ACE_INLINE__ */
00011 
00012 ACE_RCSID(ace, DEV_Addr, "$Id: DEV_Addr.cpp,v 1.1.1.3.40.1 2003/03/13 19:44:21 chad Exp $")
00013 
00014 ACE_ALLOC_HOOK_DEFINE(ACE_DEV_Addr)
00015 
00016 void
00017 ACE_DEV_Addr::dump (void) const
00018 {
00019   ACE_TRACE ("ACE_DEV_Addr::dump");
00020 
00021   ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
00022   ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("devname_ = %s"), this->devname_));
00023   ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
00024 }
00025 
00026 // Do nothing constructor. 
00027 
00028 ACE_DEV_Addr::ACE_DEV_Addr (void)
00029   : ACE_Addr (AF_DEV, sizeof this->devname_)
00030 {
00031   ACE_TRACE ("ACE_DEV_Addr::ACE_DEV_Addr");
00032 
00033   (void) ACE_OS::memset ((void *) &this->devname_, 
00034                          0, sizeof this->devname_);
00035 }
00036 
00037 int
00038 ACE_DEV_Addr::set (const ACE_DEV_Addr &sa)
00039 {
00040   this->base_set (sa.get_type (), sa.get_size ());
00041 
00042   if (sa.get_type () == AF_ANY)
00043     (void) ACE_OS::memset ((void *) &this->devname_,
00044                            0,
00045                            sizeof this->devname_);
00046   else
00047     (void) ACE_OS::memcpy ((void *) &this->devname_, 
00048                            (void *) &sa.devname_, 
00049                            sa.get_size ());
00050   return 0;
00051 }
00052 
00053 // Copy constructor. 
00054 
00055 ACE_DEV_Addr::ACE_DEV_Addr (const ACE_DEV_Addr &sa)
00056   : ACE_Addr (AF_DEV, sizeof this->devname_)
00057 {
00058   ACE_TRACE ("ACE_DEV_Addr::ACE_DEV_Addr");
00059 
00060   this->set (sa);
00061 }
00062 
00063 ACE_DEV_Addr::ACE_DEV_Addr (const ACE_TCHAR *devname)
00064   : ACE_Addr (AF_DEV, sizeof this->devname_)
00065 {
00066   ACE_TRACE ("ACE_DEV_Addr::ACE_DEV_Addr");
00067 
00068   this->set (devname);
00069 }
00070 
00071 ACE_DEV_Addr &
00072 ACE_DEV_Addr::operator= (const ACE_DEV_Addr &sa)
00073 {
00074   ACE_TRACE ("ACE_DEV_Addr::operator=");
00075 
00076   if (this != &sa)
00077     (void) ACE_OS::memcpy ((void *) &this->devname_, 
00078                            (void *) &sa.devname_, 
00079                            sa.get_size ());
00080   return *this;
00081 }
00082 

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