Jpp  15.0.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
JTOOLS::JHashEvaluator Struct Reference

Auxiliary class for default hash key evaluation. More...

#include <JHashEvaluator.hh>

Inheritance diagram for JTOOLS::JHashEvaluator:
JTOOLS::JHashMapEvaluator< JHashEvaluator >

Public Member Functions

template<class JKey_t >
int operator() (const JKey_t &key) const
 Get hash value. More...
 
int operator() (const char key) const
 Get hash value. More...
 
int operator() (const unsigned char key) const
 Get hash value. More...
 
int operator() (const short key) const
 Get hash value. More...
 
int operator() (const unsigned short key) const
 Get hash value. More...
 
int operator() (const int key) const
 Get hash value. More...
 
int operator() (const unsigned int key) const
 Get hash value. More...
 
int operator() (const long int key) const
 Get hash value. More...
 
int operator() (const unsigned long int key) const
 Get hash value. More...
 
int operator() (const long long int key) const
 Get hash value. More...
 
int operator() (const unsigned long long int key) const
 Get hash value. More...
 

Detailed Description

Auxiliary class for default hash key evaluation.

For a composite hash key, the following policy member method should be provided.

   int getKey() const;

For integral primitive data types, the hash value is obtained by a simple cast to an int value.

Definition at line 24 of file JHashEvaluator.hh.

Member Function Documentation

template<class JKey_t >
int JTOOLS::JHashEvaluator::operator() ( const JKey_t &  key) const
inline

Get hash value.

Parameters
keykey
Returns
hash value

Definition at line 32 of file JHashEvaluator.hh.

33  {
34  return key.getKey();
35  }
int JTOOLS::JHashEvaluator::operator() ( const char  key) const
inline

Get hash value.

Definition at line 37 of file JHashEvaluator.hh.

int JTOOLS::JHashEvaluator::operator() ( const unsigned char  key) const
inline

Get hash value.

Definition at line 38 of file JHashEvaluator.hh.

int JTOOLS::JHashEvaluator::operator() ( const short  key) const
inline

Get hash value.

Definition at line 39 of file JHashEvaluator.hh.

int JTOOLS::JHashEvaluator::operator() ( const unsigned short  key) const
inline

Get hash value.

Definition at line 40 of file JHashEvaluator.hh.

int JTOOLS::JHashEvaluator::operator() ( const int  key) const
inline

Get hash value.

Definition at line 41 of file JHashEvaluator.hh.

int JTOOLS::JHashEvaluator::operator() ( const unsigned int  key) const
inline

Get hash value.

Definition at line 42 of file JHashEvaluator.hh.

int JTOOLS::JHashEvaluator::operator() ( const long int  key) const
inline

Get hash value.

Definition at line 43 of file JHashEvaluator.hh.

int JTOOLS::JHashEvaluator::operator() ( const unsigned long int  key) const
inline

Get hash value.

Definition at line 44 of file JHashEvaluator.hh.

int JTOOLS::JHashEvaluator::operator() ( const long long int  key) const
inline

Get hash value.

Definition at line 45 of file JHashEvaluator.hh.

int JTOOLS::JHashEvaluator::operator() ( const unsigned long long int  key) const
inline

Get hash value.

Definition at line 46 of file JHashEvaluator.hh.


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