Quick Links:

bal | bbl | bdl | bsl

Public Types | Public Member Functions

bslh::Hash< HASH_ALGORITHM > Struct Template Reference

#include <bslh_hash.h>

List of all members.

Public Types

typedef size_t result_type
typedef HASH_ALGORITHM HashAlgorithm

Public Member Functions

 Hash ()
 Hash (const Hash &original)
 ~Hash ()
Hashoperator= (const Hash &rhs)
template<class TYPE >
result_type operator() (const TYPE &type) const

Detailed Description

template<class HASH_ALGORITHM = bslh::DefaultHashAlgorithm>
struct bslh::Hash< HASH_ALGORITHM >

This struct wraps the (template parameter) type HASH_ALGORITHM in an interface that satisfies the hash requirements of the C++11 standard.

See Component bslh_hash


Member Typedef Documentation

template<class HASH_ALGORITHM = bslh::DefaultHashAlgorithm>
typedef size_t bslh::Hash< HASH_ALGORITHM >::result_type
template<class HASH_ALGORITHM = bslh::DefaultHashAlgorithm>
typedef HASH_ALGORITHM bslh::Hash< HASH_ALGORITHM >::HashAlgorithm

Constructor & Destructor Documentation

template<class HASH_ALGORITHM = bslh::DefaultHashAlgorithm>
bslh::Hash< HASH_ALGORITHM >::Hash (  ) 

Create a bslh::Hash object.

template<class HASH_ALGORITHM = bslh::DefaultHashAlgorithm>
bslh::Hash< HASH_ALGORITHM >::Hash ( const Hash< HASH_ALGORITHM > &  original  ) 

Create a bslh::Hash object. Note that as bslh::Hash is an empty (stateless) type, this operation will have no observable effect.

template<class HASH_ALGORITHM = bslh::DefaultHashAlgorithm>
bslh::Hash< HASH_ALGORITHM >::~Hash (  ) 

Destroy this object.


Member Function Documentation

template<class HASH_ALGORITHM = bslh::DefaultHashAlgorithm>
Hash& bslh::Hash< HASH_ALGORITHM >::operator= ( const Hash< HASH_ALGORITHM > &  rhs  ) 

Assign to this object the value of the specified rhs object, and return a reference providing modifiable access to this object. Note that as bslh::Hash is an empty (stateless) type, this operation will have no observable effect.

template<class HASH_ALGORITHM = bslh::DefaultHashAlgorithm>
template<class TYPE >
result_type bslh::Hash< HASH_ALGORITHM >::operator() ( const TYPE &  type  )  const

Returns a hash value generated by the (template parameter) type HASH_ALGORITHM for the specified type. The value returned by the HASH_ALGORITHM is cast to size_t before returning.


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