summaryrefslogtreecommitdiff
path: root/TAO/tao/SHMIOP_Endpoint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/SHMIOP_Endpoint.cpp')
-rw-r--r--TAO/tao/SHMIOP_Endpoint.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/TAO/tao/SHMIOP_Endpoint.cpp b/TAO/tao/SHMIOP_Endpoint.cpp
index 25c40601948..a43a7c9e3c5 100644
--- a/TAO/tao/SHMIOP_Endpoint.cpp
+++ b/TAO/tao/SHMIOP_Endpoint.cpp
@@ -142,4 +142,39 @@ TAO_SHMIOP_Endpoint::next (void)
return this->next_;
}
+TAO_Endpoint *
+TAO_SHMIOP_Endpoint::duplicate (void)
+{
+ TAO_SHMIOP_Endpoint *endpoint = 0;
+ ACE_NEW_RETURN (endpoint,
+ TAO_SHMIOP_Endpoint (this->host_,
+ this->port_,
+ this->object_addr_),
+ 0);
+
+ return endpoint;
+}
+
+
+CORBA::Boolean
+TAO_SHMIOP_Endpoint::is_equivalent (const TAO_Endpoint *other_endpoint)
+{
+ TAO_SHMIOP_Endpoint *endpoint = ACE_dynamic_cast (TAO_SHMIOP_Endpoint *,
+ other_endpoint);
+ if (endpoint == 0)
+ return 0;
+
+ return
+ this->port_ == endpoint->port_
+ && ACE_OS::strcmp (this->host_.in (), endpoint->host_.in ()) == 0;
+}
+
+CORBA::ULong
+TAO_SHMIOP_Endpoint::hash (void)
+{
+ return
+ ACE::hash_pjw (this->host_.in ())
+ + this->port_;
+}
+
#endif /* TAO_HAS_SHMIOP && TAO_HAS_SHMIOP != 0 */