TAO_PG_Location_Hash Class Reference

Hash function object for generating a hash for a Location. More...

#include <PG_Location_Hash.h>

List of all members.

Public Member Functions

CORBA::ULong operator() (const PortableGroup::Location &) const
 Creates a hash based on all of elements of the given Location.


Detailed Description

Hash function object for generating a hash for a Location.

Definition at line 36 of file PG_Location_Hash.h.


Member Function Documentation

TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE CORBA::ULong TAO_PG_Location_Hash::operator() ( const PortableGroup::Location  )  const

Creates a hash based on all of elements of the given Location.

Definition at line 8 of file PG_Location_Hash.inl.

References ACE::hash_pjw().

00010 {
00011   // @todo Interim implementation until we figure out what to do when a
00012   //       location has multiple components.
00013 
00014   CORBA::ULong len = location.length ();
00015   CORBA::ULong hash = 0;
00016 
00017   for (CORBA::ULong i = 0; i < len; ++i)
00018     hash +=
00019       ACE::hash_pjw (location[i].id.in ()) +
00020       ACE::hash_pjw (location[i].kind.in ());
00021 
00022   return hash;
00023 }


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:50:01 2010 for TAO_PortableGroup by  doxygen 1.4.7