00001 // -*- C++ -*- 00002 // 00003 // UIPMC_Endpoint.i,v 1.3 2005/11/14 22:03:50 ossama Exp 00004 00005 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00006 00007 ACE_INLINE const ACE_INET_Addr & 00008 TAO_UIPMC_Endpoint::object_addr (void) const 00009 { 00010 return this->object_addr_; 00011 } 00012 00013 00014 ACE_INLINE CORBA::UShort 00015 TAO_UIPMC_Endpoint::port (void) const 00016 { 00017 return this->port_; 00018 } 00019 00020 ACE_INLINE CORBA::UShort 00021 TAO_UIPMC_Endpoint::port (CORBA::UShort p) 00022 { 00023 return this->port_ = p; 00024 } 00025 00026 00027 ACE_INLINE ACE_UINT32 00028 TAO_UIPMC_Endpoint::uint_ip_addr (void) const 00029 { 00030 return (((ACE_UINT32)this->class_d_address_[0] << 24) | 00031 ((ACE_UINT32)this->class_d_address_[1] << 16) | 00032 ((ACE_UINT32)this->class_d_address_[2] << 8) | 00033 ((ACE_UINT32)this->class_d_address_[3])); 00034 } 00035 00036 ACE_INLINE void 00037 TAO_UIPMC_Endpoint::uint_ip_addr (ACE_UINT32 ip_addr) 00038 { 00039 this->class_d_address_[0] = (CORBA::Char)(ip_addr >> 24); 00040 this->class_d_address_[1] = (CORBA::Char)((ip_addr >> 16) & 0xff); 00041 this->class_d_address_[2] = (CORBA::Char)((ip_addr >> 8) & 0xff); 00042 this->class_d_address_[3] = (CORBA::Char)(ip_addr & 0xff); 00043 } 00044 00045 ACE_INLINE void 00046 TAO_UIPMC_Endpoint::update_object_addr (void) 00047 { 00048 this->object_addr_.set (this->port_, 00049 this->uint_ip_addr ()); 00050 } 00051 00052 TAO_END_VERSIONED_NAMESPACE_DECL