Hash function object for generating a hash for a Location. More...
#include <PG_Location_Hash.h>
Public Member Functions | |
CORBA::ULong | operator() (const PortableGroup::Location &) const |
Creates a hash based on all of elements of the given Location. |
Hash function object for generating a hash for a Location.
Definition at line 36 of file PG_Location_Hash.h.
CORBA::ULong TAO_PG_Location_Hash::operator() | ( | const PortableGroup::Location & | location | ) | const |
Creates a hash based on all of elements of the given Location.
Definition at line 8 of file PG_Location_Hash.inl.
{ // @todo Interim implementation until we figure out what to do when a // location has multiple components. CORBA::ULong len = location.length (); CORBA::ULong hash = 0; for (CORBA::ULong i = 0; i < len; ++i) hash += ACE::hash_pjw (location[i].id.in ()) + ACE::hash_pjw (location[i].kind.in ()); return hash; }