#include <DEV_Addr.h>
Inheritance diagram for ACE_DEV_Addr:
Public Member Functions | |
ACE_DEV_Addr (void) | |
Default constructor. | |
ACE_DEV_Addr (const ACE_DEV_Addr &sa) | |
Copy constructor. | |
int | set (const ACE_DEV_Addr &sa) |
Acts like a copy constructor. | |
ACE_DEV_Addr (const ACE_TCHAR *devname) | |
Create a ACE_DEV_Addr from a device name. | |
void | set (const ACE_TCHAR *devname) |
Create a ACE_Addr from a ACE_DEV pathname. | |
ACE_DEV_Addr & | operator= (const ACE_DEV_Addr &) |
Assignment operator. | |
virtual void * | get_addr (void) const |
Return a pointer to the address. | |
virtual int | addr_to_string (ACE_TCHAR *addr, size_t) const |
Transform the current address into string format. | |
bool | operator== (const ACE_DEV_Addr &SAP) const |
Compare two addresses for equality. | |
bool | operator!= (const ACE_DEV_Addr &SAP) const |
Compare two addresses for inequality. | |
const ACE_TCHAR * | get_path_name (void) const |
Return the path name used for the rendezvous point. | |
void | dump (void) const |
Dump the state of an object. | |
Public Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. | |
Private Types | |
DEVNAME_LENGTH = MAXPATHLEN + 1 | |
enum | { DEVNAME_LENGTH = MAXPATHLEN + 1 } |
Private Attributes | |
ACE_TCHAR | devname_ [DEVNAME_LENGTH] |
Name of the device. |
Definition at line 33 of file DEV_Addr.h.
anonymous enum [private] |
ACE_DEV_Addr::ACE_DEV_Addr | ( | void | ) |
Default constructor.
Definition at line 54 of file DEV_Addr.cpp.
References ACE_TRACE, and ACE_OS::memset().
00055 : ACE_Addr (AF_DEV, sizeof this->devname_) 00056 { 00057 ACE_TRACE ("ACE_DEV_Addr::ACE_DEV_Addr"); 00058 00059 (void) ACE_OS::memset ((void *) &this->devname_, 00060 0, sizeof this->devname_); 00061 }
ACE_DEV_Addr::ACE_DEV_Addr | ( | const ACE_DEV_Addr & | sa | ) |
ACE_DEV_Addr::ACE_DEV_Addr | ( | const ACE_TCHAR * | devname | ) | [explicit] |
Create a ACE_DEV_Addr from a device name.
Definition at line 89 of file DEV_Addr.cpp.
References ACE_TRACE, and set().
00090 : ACE_Addr (AF_DEV, sizeof this->devname_) 00091 { 00092 ACE_TRACE ("ACE_DEV_Addr::ACE_DEV_Addr"); 00093 00094 this->set (devname); 00095 }
ACE_BEGIN_VERSIONED_NAMESPACE_DECL int ACE_DEV_Addr::addr_to_string | ( | ACE_TCHAR * | addr, | |
size_t | ||||
) | const [virtual] |
Transform the current address into string format.
Definition at line 22 of file DEV_Addr.cpp.
References ACE_TRACE, and ACE_OS::strsncpy().
00023 { 00024 ACE_TRACE ("ACE_DEV_Addr::addr_to_string"); 00025 00026 ACE_OS::strsncpy (s, this->devname_, len); 00027 return 0; 00028 }
void ACE_DEV_Addr::dump | ( | void | ) | const |
Dump the state of an object.
Reimplemented from ACE_Addr.
Definition at line 41 of file DEV_Addr.cpp.
References ACE_BEGIN_DUMP, ACE_DEBUG, ACE_END_DUMP, ACE_TEXT, ACE_TRACE, and LM_DEBUG.
Referenced by ACE_DEV_IO::dump().
00042 { 00043 #if defined (ACE_HAS_DUMP) 00044 ACE_TRACE ("ACE_DEV_Addr::dump"); 00045 00046 ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); 00047 ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("devname_ = %s"), this->devname_)); 00048 ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP)); 00049 #endif /* ACE_HAS_DUMP */ 00050 }
void * ACE_DEV_Addr::get_addr | ( | void | ) | const [virtual] |
ACE_INLINE const ACE_TCHAR * ACE_DEV_Addr::get_path_name | ( | void | ) | const |
Return the path name used for the rendezvous point.
Definition at line 44 of file DEV_Addr.inl.
References ACE_TRACE, and devname_.
Referenced by ACE_DEV_Connector::ACE_DEV_Connector(), and ACE_DEV_Connector::connect().
ACE_INLINE bool ACE_DEV_Addr::operator!= | ( | const ACE_DEV_Addr & | SAP | ) | const |
Compare two addresses for inequality.
Definition at line 34 of file DEV_Addr.inl.
References ACE_TRACE.
00035 { 00036 ACE_TRACE ("ACE_DEV_Addr::operator !="); 00037 00038 return !((*this) == sap); // This is lazy, of course... ;-). 00039 }
ACE_DEV_Addr & ACE_DEV_Addr::operator= | ( | const ACE_DEV_Addr & | ) |
ACE_INLINE bool ACE_DEV_Addr::operator== | ( | const ACE_DEV_Addr & | SAP | ) | const |
Compare two addresses for equality.
Definition at line 24 of file DEV_Addr.inl.
References ACE_TRACE, devname_, and ACE_OS::strcmp().
00025 { 00026 ACE_TRACE ("ACE_DEV_Addr::operator =="); 00027 00028 return ACE_OS::strcmp (this->devname_, sap.devname_) == 0; 00029 }
ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE void ACE_DEV_Addr::set | ( | const ACE_TCHAR * | devname | ) |
Create a ACE_Addr from a ACE_DEV pathname.
Definition at line 12 of file DEV_Addr.inl.
References ACE_TRACE, AF_DEV, ACE_Addr::base_set(), DEVNAME_LENGTH, ACE_OS::strlen(), and ACE_OS::strsncpy().
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 }
int ACE_DEV_Addr::set | ( | const ACE_DEV_Addr & | sa | ) |
Acts like a copy constructor.
Definition at line 64 of file DEV_Addr.cpp.
References AF_ANY, ACE_Addr::base_set(), devname_, DEVNAME_LENGTH, ACE_Addr::get_size(), ACE_Addr::get_type(), ACE_OS::memset(), and ACE_OS::strsncpy().
Referenced by ACE_DEV_Addr(), and operator=().
00065 { 00066 this->base_set (sa.get_type (), sa.get_size ()); 00067 00068 if (sa.get_type () == AF_ANY) 00069 (void) ACE_OS::memset ((void *) &this->devname_, 00070 0, 00071 sizeof this->devname_); 00072 else 00073 (void) ACE_OS::strsncpy (this->devname_, 00074 sa.devname_, 00075 ACE_DEV_Addr::DEVNAME_LENGTH); 00076 return 0; 00077 }
Declare the dynamic allocation hooks.
Reimplemented from ACE_Addr.
Definition at line 74 of file DEV_Addr.h.
ACE_TCHAR ACE_DEV_Addr::devname_[DEVNAME_LENGTH] [private] |
Name of the device.
Definition at line 79 of file DEV_Addr.h.
Referenced by get_addr(), get_path_name(), operator==(), and set().