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

MEM_Addr.i

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 // $Id: MEM_Addr.i,v 1.1.1.3 2001/12/04 14:33:02 chad Exp $
00003 
00004 // MEM_Addr.i
00005 
00006 // Default dtor.
00007 ACE_INLINE
00008 ACE_MEM_Addr::~ACE_MEM_Addr (void)
00009 {
00010 }
00011 
00012 // Set the port number.
00013 
00014 ACE_INLINE void
00015 ACE_MEM_Addr::set_port_number (u_short port_number,
00016                                 int encode)
00017 {
00018   ACE_TRACE ("ACE_MEM_Addr::set_port_number");
00019 
00020   this->external_.set_port_number (port_number, encode);
00021   this->internal_.set_port_number (port_number, encode);
00022 }
00023 
00024 ACE_INLINE int
00025 ACE_MEM_Addr::set (u_short port_number, int encode)
00026 {
00027   ACE_TRACE ("ACE_MEM_Addr::set");
00028   this->set_port_number (port_number, encode);
00029   return 0;
00030 }
00031 
00032 ACE_INLINE int
00033 ACE_MEM_Addr::set (const ACE_TCHAR port_number[])
00034 {
00035   ACE_TRACE ("ACE_MEM_Addr::set");
00036   return this->string_to_addr (port_number);
00037 }
00038 
00039 // Return the port number.
00040 
00041 ACE_INLINE u_short
00042 ACE_MEM_Addr::get_port_number (void) const
00043 {
00044   ACE_TRACE ("ACE_MEM_Addr::get_port_number");
00045   return this->internal_.get_port_number ();
00046 }
00047 
00048 // Return the dotted Internet address.
00049 
00050 ACE_INLINE const char *
00051 ACE_MEM_Addr::get_host_addr (void) const
00052 {
00053   ACE_TRACE ("ACE_MEM_Addr::get_host_addr");
00054   return this->internal_.get_host_addr ();
00055 }
00056 
00057 // Return the 4-byte IP address, converting it into host byte order.
00058 
00059 ACE_INLINE ACE_UINT32
00060 ACE_MEM_Addr::get_ip_address (void) const
00061 {
00062   ACE_TRACE ("ACE_MEM_Addr::get_ip_address");
00063   return this->external_.get_ip_address ();
00064 }
00065 
00066 ACE_INLINE const ACE_INET_Addr &
00067 ACE_MEM_Addr::get_local_addr (void) const
00068 {
00069   return this->internal_;
00070 }
00071 
00072 ACE_INLINE const ACE_INET_Addr &
00073 ACE_MEM_Addr::get_remote_addr (void) const
00074 {
00075   return this->external_;
00076 }
00077 
00078 // Compare two addresses for equality.
00079 
00080 ACE_INLINE int
00081 ACE_MEM_Addr::operator == (const ACE_MEM_Addr &sap) const
00082 {
00083   ACE_TRACE ("ACE_MEM_Addr::operator ==");
00084 
00085   return this->external_ == sap.external_ &&
00086     this->internal_ == sap.internal_;
00087 }
00088 
00089 ACE_INLINE int
00090 ACE_MEM_Addr::operator == (const ACE_INET_Addr &sap) const
00091 {
00092   ACE_TRACE ("ACE_MEM_Addr::operator ==");
00093 
00094   return this->external_ == sap;
00095 }
00096 
00097 // Compare two addresses for inequality.
00098 
00099 ACE_INLINE int
00100 ACE_MEM_Addr::operator != (const ACE_MEM_Addr &sap) const
00101 {
00102   ACE_TRACE ("ACE_MEM_Addr::operator !=");
00103   return !((*this) == sap);
00104 }
00105 
00106 ACE_INLINE int
00107 ACE_MEM_Addr::operator != (const ACE_INET_Addr &sap) const
00108 {
00109   ACE_TRACE ("ACE_MEM_Addr::operator !=");
00110   return !((*this) == sap);
00111 }
00112 
00113 ACE_INLINE u_long
00114 ACE_MEM_Addr::hash (void) const
00115 {
00116   return this->external_.hash ();
00117 }

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