#include <Portable_Group_Map.h>
Public Member Functions | |
u_long | operator() (const PortableGroup::TagGroupTaggedComponent *id) const |
Returns hash value. |
Define the hash() method for Group Ids.
Definition at line 42 of file Portable_Group_Map.h.
u_long TAO_GroupId_Hash::operator() | ( | const PortableGroup::TagGroupTaggedComponent * | id | ) | const |
Returns hash value.
Definition at line 147 of file Portable_Group_Map.cpp.
References ACE::hash_pjw(), and ACE_OS::strlen().
00148 { 00149 u_long hash = 00150 ACE::hash_pjw ((const char *) id->group_domain_id, 00151 ACE_OS::strlen ((const char *) id->group_domain_id)); 00152 00153 // Truncate the object_group_id in half for the has. 00154 // Divide by one so that the ACE_U_LongLong representation 00155 // will automatically cast down to a u_long 00156 hash += (u_long) (id->object_group_id / 1); 00157 00158 hash += id->object_group_ref_version; 00159 00160 return hash; 00161 }