#include <DEV_Addr.h>
Inheritance diagram for ACE_DEV_Addr:


Public Methods | |
| ACE_DEV_Addr (void) | |
| Default constructor. More... | |
| ACE_DEV_Addr (const ACE_DEV_Addr &sa) | |
| Copy constructor. More... | |
| int | set (const ACE_DEV_Addr &sa) |
| Acts like a copy constructor. More... | |
| ACE_EXPLICIT | ACE_DEV_Addr (const ACE_TCHAR *devname) |
| Create a ACE_DEV_Addr from a device name. More... | |
| void | set (const ACE_TCHAR *devname) |
| Create a ACE_Addr from a ACE_DEV pathname. More... | |
| ACE_DEV_Addr & | operator= (const ACE_DEV_Addr &) |
| Assignment operator. More... | |
| virtual void * | get_addr (void) const |
| Return a pointer to the address. More... | |
| virtual int | addr_to_string (ACE_TCHAR *addr, size_t) const |
| Transform the current address into string format. More... | |
| int | operator== (const ACE_DEV_Addr &SAP) const |
| Compare two addresses for equality. More... | |
| int | operator!= (const ACE_DEV_Addr &SAP) const |
| Compare two addresses for inequality. More... | |
| const ACE_TCHAR * | get_path_name (void) const |
| Return the path name used for the rendezvous point. More... | |
| void | dump (void) const |
| Dump the state of an object. More... | |
Public Attributes | |
| ACE_ALLOC_HOOK_DECLARE | |
| Declare the dynamic allocation hooks. More... | |
Private Attributes | |
| ACE_TCHAR | devname_ [MAXNAMLEN+1] |
| Name of the device. More... | |
Definition at line 32 of file DEV_Addr.h.
|
|
Default constructor.
Definition at line 28 of file DEV_Addr.cpp. References ACE_TRACE, AF_DEV, and ACE_OS_String::memset.
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 } |
|
|
Copy constructor.
Definition at line 55 of file DEV_Addr.cpp. References ACE_TRACE, AF_DEV, and set.
|
|
|
Create a ACE_DEV_Addr from a device name.
Definition at line 63 of file DEV_Addr.cpp. References ACE_TCHAR, ACE_TRACE, AF_DEV, and set.
|
|
||||||||||||
|
Transform the current address into string format.
Definition at line 19 of file DEV_Addr.i. References ACE_TCHAR, ACE_TRACE, and ACE_OS_String::strsncpy.
00020 {
00021 ACE_TRACE ("ACE_DEV_Addr::addr_to_string");
00022
00023 ACE_OS::strsncpy (s, this->devname_, len);
00024 return 0;
00025 }
|
|
|
Dump the state of an object.
Reimplemented from ACE_Addr. Definition at line 17 of file DEV_Addr.cpp. References ACE_BEGIN_DUMP, ACE_DEBUG, ACE_END_DUMP, ACE_LIB_TEXT, ACE_TRACE, and LM_DEBUG. Referenced by ACE_DEV_IO::dump.
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 }
|
|
|
Return a pointer to the address.
Reimplemented from ACE_Addr. Definition at line 30 of file DEV_Addr.i. References ACE_TRACE, and devname_.
|
|
|
Return the path name used for the rendezvous point.
Definition at line 60 of file DEV_Addr.i. References ACE_TRACE, and devname_. Referenced by ACE_DEV_Connector::ACE_DEV_Connector, and ACE_DEV_Connector::connect.
|
|
|
Compare two addresses for inequality.
Definition at line 50 of file DEV_Addr.i. References ACE_TRACE.
00051 {
00052 ACE_TRACE ("ACE_DEV_Addr::operator !=");
00053
00054 return !((*this) == sap); // This is lazy, of course... ;-).
00055 }
|
|
|
Assignment operator.
Definition at line 72 of file DEV_Addr.cpp. References ACE_TRACE, devname_, ACE_Addr::get_size, and ACE_OS_String::memcpy.
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 }
|
|
|
Compare two addresses for equality.
Definition at line 40 of file DEV_Addr.i. References ACE_TRACE, devname_, and ACE_OS_String::strcmp.
00041 {
00042 ACE_TRACE ("ACE_DEV_Addr::operator ==");
00043
00044 return ACE_OS::strcmp (this->devname_, sap.devname_) == 0;
00045 }
|
|
|
Create a ACE_Addr from a ACE_DEV pathname.
Definition at line 7 of file DEV_Addr.i. References ACE_TCHAR, ACE_TRACE, AF_DEV, ACE_Addr::base_set, MAXNAMLEN, ACE_OS_String::strlen, and ACE_OS_String::strsncpy.
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 }
|
|
|
Acts like a copy constructor.
Definition at line 38 of file DEV_Addr.cpp. References AF_ANY, ACE_Addr::base_set, devname_, ACE_Addr::get_size, ACE_Addr::get_type, ACE_OS_String::memcpy, and ACE_OS_String::memset. Referenced by ACE_DEV_Addr.
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 }
|
|
|
Declare the dynamic allocation hooks.
Reimplemented from ACE_Addr. Definition at line 73 of file DEV_Addr.h. |
|
|
Name of the device.
Definition at line 77 of file DEV_Addr.h. Referenced by get_addr, get_path_name, operator=, operator==, and set. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002