BPHash
General object hashing library for C++
Public Member Functions | List of all members
bphash::Hasher Class Reference

Class that is used to hash objects. More...

#include <Hasher.hpp>

Public Member Functions

 Hasher (HashType type)
 Constructor. More...
 
 Hasher (const Hasher &)=delete
 
Hasheroperator= (const Hasher &)=delete
 
 Hasher (Hasher &&)=default
 
Hasheroperator= (Hasher &&)=default
 
void operator() (void)
 Add an object to the hash. More...
 
template<typename T , typename... Targs>
void operator() (const T &obj, const Targs &...objs)
 Add an object to the hash. More...
 
HashValue finalize (void)
 Perform any remaining steps and return the hash. More...
 

Detailed Description

Class that is used to hash objects.

Data is added via operator().

Definition at line 78 of file Hasher.hpp.

Constructor & Destructor Documentation

bphash::Hasher::Hasher ( HashType  type)

Constructor.

Parameters
[in]typeType of hasher to use

Definition at line 20 of file Hasher.cpp.

bphash::Hasher::Hasher ( const Hasher )
delete
bphash::Hasher::Hasher ( Hasher &&  )
default

Member Function Documentation

HashValue bphash::Hasher::finalize ( void  )
inline

Perform any remaining steps and return the hash.

Definition at line 131 of file Hasher.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void bphash::Hasher::operator() ( void  )
inline

Add an object to the hash.

Objects are progressively hashed until finalize() is called

This overload is used to terminate the variadic template

Definition at line 100 of file Hasher.hpp.

template<typename T , typename... Targs>
void bphash::Hasher::operator() ( const T &  obj,
const Targs &...  objs 
)
inline

Add an object to the hash.

Objects are progressively hashed until finalize() is called

Definition at line 108 of file Hasher.hpp.

Hasher& bphash::Hasher::operator= ( const Hasher )
delete
Hasher& bphash::Hasher::operator= ( Hasher &&  )
default

The documentation for this class was generated from the following files: