| The Gaudi Framework v27r1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
GaudiUtils::GenericHash< T > Struct Template Reference

Generic hash implementation (for easy migration to the new Hash class). More...

`#include <GaudiKernel/Hash.h>`

Inheritance diagram for GaudiUtils::GenericHash< T >:
[legend]
Collaboration diagram for GaudiUtils::GenericHash< T >:
[legend]

## Public Member Functions
std::size_t | operator() (const T &key) const
| the generic hash function More...

## Detailed Description

### template<class T>
struct GaudiUtils::GenericHash< T >

Generic hash implementation (for easy migration to the new Hash class).

Definition at line 28 of file Hash.h.

## Member Function Documentation

template<class T >

std::size_t GaudiUtils::GenericHash< T >::operator() | ( | const T & | key | ) | const
| inline

the generic hash function

Definition at line 32 of file Hash.h.

32 {
33 std::size_t res = 0 ;
34 std::size_t len = sizeof(T) ;
35 const char* p = reinterpret_cast<const char*>( &key );
36 while( len-- ) { res = ( res << 1 ) ^ *p; ++p; }
37 return res;
38 }
std::size_t

The documentation for this struct was generated from the following file:

- GaudiKernel/GaudiKernel/Hash.h