Open CASCADE Technology  7.7.0
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 
)
inlinestatic

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

Parameters
theKeythe key which hash code is to be computed
theUpperBoundthe upper bound of the range a computing hash code must be within
Returns
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 
)
inlinestatic

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