summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>1999-07-10 01:58:44 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>1999-07-10 01:58:44 +0000
commite5a491306b8c5c80887fe50821368991733fd1aa (patch)
treee08623ebc42c92ba6a7644afe57a21744c6414d4
parent67f9e6af1463d695b6e48014d12c16f6e8116bbb (diff)
downloadATCD-e5a491306b8c5c80887fe50821368991733fd1aa.tar.gz
Implemented a hash function for ACE_UNIX_Addr instead of relying
on the base class no-op hash function.
-rw-r--r--ace/UNIX_Addr.h3
-rw-r--r--ace/UNIX_Addr.i6
2 files changed, 9 insertions, 0 deletions
diff --git a/ace/UNIX_Addr.h b/ace/UNIX_Addr.h
index 1c8b9a8269e..12c7967ddfc 100644
--- a/ace/UNIX_Addr.h
+++ b/ace/UNIX_Addr.h
@@ -73,6 +73,9 @@ public:
const char *get_path_name (void) const;
// Return the path name of the underlying rendezvous point.
+ virtual u_long hash (void) const;
+ // Computes and returns hash value.
+
void dump (void) const;
// Dump the state of an object.
diff --git a/ace/UNIX_Addr.i b/ace/UNIX_Addr.i
index c07b43b493b..af6014b6489 100644
--- a/ace/UNIX_Addr.i
+++ b/ace/UNIX_Addr.i
@@ -58,4 +58,10 @@ ACE_UNIX_Addr::get_path_name (void) const
return this->unix_addr_.sun_path;
}
+ACE_INLINE u_long
+ACE_UNIX_Addr::hash (void) const
+{
+ return ACE::hash_pjw (this->unix_addr_.sun_path);
+}
+
#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */