Open CASCADE Technology
Static Public Member Functions

NCollection_DefaultHasher< TheKeyType > Class Template Reference

#include <NCollection_DefaultHasher.hxx>

Static Public Member Functions

static Standard_Integer HashCode (const TheKeyType &theKey, const Standard_Integer theUpperBound)
 Returns hash code for the given key, in the range [1, theUpperBound]. More...
static Standard_Boolean IsEqual (const TheKeyType &theKey1, const TheKeyType &theKey2)

Detailed Description

template<class TheKeyType>
class NCollection_DefaultHasher< TheKeyType >

Purpose: The DefaultHasher is a Hasher that is used by default in NCollection maps. To compute the hash code of the key is used the global function HashCode. To compare two keys is used the global function IsEqual.

Member Function Documentation

◆ HashCode()

template<class TheKeyType >
static Standard_Integer NCollection_DefaultHasher< TheKeyType >::HashCode ( const TheKeyType &  theKey,
const Standard_Integer  theUpperBound 

Returns hash code for the given key, in the range [1, theUpperBound].

theKeythe key which hash code is to be computed
theUpperBoundthe upper bound of the range a computing hash code must be within
a computed hash code, in the range [1, theUpperBound]

◆ IsEqual()

template<class TheKeyType >
static Standard_Boolean NCollection_DefaultHasher< TheKeyType >::IsEqual ( const TheKeyType &  theKey1,
const TheKeyType &  theKey2 

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