00001 //$Id: Base_Transport_Property.cpp 76572 2007-01-24 19:14:17Z johnnyw $ 00002 00003 #include "tao/Base_Transport_Property.h" 00004 #include "ace/OS_Memory.h" 00005 00006 #if !defined (__ACE_INLINE__) 00007 # include "tao/Base_Transport_Property.inl" 00008 #endif /* __ACE_INLINE__ */ 00009 00010 ACE_RCSID (tao, 00011 Base_Transport_Property, 00012 "$Id: Base_Transport_Property.cpp 76572 2007-01-24 19:14:17Z johnnyw $") 00013 00014 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00015 00016 TAO_Base_Transport_Property::~TAO_Base_Transport_Property (void) 00017 { 00018 } 00019 00020 TAO_Transport_Descriptor_Interface * 00021 TAO_Base_Transport_Property::duplicate (void) 00022 { 00023 // Get a copy of the underlying endpoint 00024 TAO_Endpoint *const endpt = this->endpoint_->duplicate (); 00025 if (endpt == 0) 00026 return 0; 00027 00028 // Construct a copy of our class 00029 TAO_Base_Transport_Property *prop = 0; 00030 ACE_NEW_RETURN (prop, TAO_Base_Transport_Property (endpt, true), 0); 00031 return prop; 00032 } 00033 00034 00035 CORBA::Boolean 00036 TAO_Base_Transport_Property::is_equivalent 00037 (const TAO_Transport_Descriptor_Interface *rhs) 00038 { 00039 const TAO_Base_Transport_Property *other_desc = 00040 dynamic_cast<const TAO_Base_Transport_Property *> (rhs); 00041 00042 if (other_desc == 0) 00043 return false; 00044 00045 return this->endpoint_->is_equivalent (other_desc->endpoint_); 00046 } 00047 00048 00049 u_long 00050 TAO_Base_Transport_Property::hash (void) const 00051 { 00052 return this->endpoint_->hash (); 00053 } 00054 00055 TAO_END_VERSIONED_NAMESPACE_DECL