Quick Links:

bal | bbl | bdl | bsl

Public Types | Public Member Functions

bslh::SeededHash< SEED_GENERATOR, HASH_ALGORITHM > Struct Template Reference

#include <bslh_seededhash.h>

List of all members.

Public Types

typedef size_t result_type

Public Member Functions

 SeededHash ()
 SeededHash (SEED_GENERATOR &seedGenerator)
 SeededHash (const SeededHash &original)
 ~SeededHash ()
SeededHashoperator= (const SeededHash &rhs)
template<class TYPE >
result_type operator() (const TYPE &type) const

Detailed Description

template<class SEED_GENERATOR, class HASH_ALGORITHM = bslh::DefaultSeededHashAlgorithm>
struct bslh::SeededHash< SEED_GENERATOR, HASH_ALGORITHM >

This class wraps the (template parameter) HASH_ALGORITHM, which requires a seed, in an interface that satisfies the hash requirements of the C++11 standard. The (template parameter) type SEED_GENERATOR will be used to generate the seed required by HASH_ALGORITHM.

See Component bslh_seededhash


Member Typedef Documentation

template<class SEED_GENERATOR , class HASH_ALGORITHM = bslh::DefaultSeededHashAlgorithm>
typedef size_t bslh::SeededHash< SEED_GENERATOR, HASH_ALGORITHM >::result_type

Constructor & Destructor Documentation

template<class SEED_GENERATOR , class HASH_ALGORITHM = bslh::DefaultSeededHashAlgorithm>
bslh::SeededHash< SEED_GENERATOR, HASH_ALGORITHM >::SeededHash (  ) 

Create a bslh::SeededHash which will default construct the (template parameter) type SEED_GENERATOR to initialize the seed that will be passed to the (template parameter) type HASH_ALGORITHM when it is used. SEED_GENERATOR must be default constructible to use this constructor.

template<class SEED_GENERATOR , class HASH_ALGORITHM = bslh::DefaultSeededHashAlgorithm>
bslh::SeededHash< SEED_GENERATOR, HASH_ALGORITHM >::SeededHash ( SEED_GENERATOR &  seedGenerator  )  [explicit]

Create a bslh::SeededHash which will use the specified seedGenerator to initialize the seed that will be passed to the (template parameter) type HASH_ALGORITHM when it is used. SEED_GENERATOR must be copy-constructible to use this constructor.

template<class SEED_GENERATOR , class HASH_ALGORITHM = bslh::DefaultSeededHashAlgorithm>
bslh::SeededHash< SEED_GENERATOR, HASH_ALGORITHM >::SeededHash ( const SeededHash< SEED_GENERATOR, HASH_ALGORITHM > &  original  ) 

Create a bslh::SeededHash object having the same internal state as the specified original.

template<class SEED_GENERATOR , class HASH_ALGORITHM = bslh::DefaultSeededHashAlgorithm>
bslh::SeededHash< SEED_GENERATOR, HASH_ALGORITHM >::~SeededHash (  ) 

Destroy this object.


Member Function Documentation

template<class SEED_GENERATOR , class HASH_ALGORITHM = bslh::DefaultSeededHashAlgorithm>
SeededHash& bslh::SeededHash< SEED_GENERATOR, HASH_ALGORITHM >::operator= ( const SeededHash< SEED_GENERATOR, HASH_ALGORITHM > &  rhs  ) 

Assign to this object the value of the specified rhs object, and return a reference providing modifiable access to this object.

template<class SEED_GENERATOR , class HASH_ALGORITHM = bslh::DefaultSeededHashAlgorithm>
template<class TYPE >
result_type bslh::SeededHash< SEED_GENERATOR, HASH_ALGORITHM >::operator() ( const TYPE &  type  )  const

Returns a hash 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: