Open CASCADE Technology  7.7.0.dev
Static Public Member Functions

MoniTool_ElemHasher Class Reference

ElemHasher defines HashCode for Element, which is : ask a Element its HashCode ! Because this is the Element itself which brings the HashCode for its Key. More...

#include <MoniTool_ElemHasher.hxx>

Static Public Member Functions

static Standard_Integer HashCode (const Handle< MoniTool_Element > &theElement, Standard_Integer theUpperBound)
 Returns hash code for the given element, in the range [1, theUpperBound]. Asks theElement its HashCode, then transforms it to be in the required range. More...
 
static Standard_Boolean IsEqual (const Handle< MoniTool_Element > &K1, const Handle< MoniTool_Element > &K2)
 Returns True if two keys are the same. The test does not work on the Elements themselves but by calling their methods Equates. More...
 

Detailed Description

ElemHasher defines HashCode for Element, which is : ask a Element its HashCode ! Because this is the Element itself which brings the HashCode for its Key.

This class complies to the template given in TCollection by MapHasher itself

Member Function Documentation

◆ HashCode()

static Standard_Integer MoniTool_ElemHasher::HashCode ( const Handle< MoniTool_Element > &  theElement,
Standard_Integer  theUpperBound 
)
static

Returns hash code for the given element, in the range [1, theUpperBound]. Asks theElement its HashCode, then transforms it to be in the required range.

Parameters
theElementthe element 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()

static Standard_Boolean MoniTool_ElemHasher::IsEqual ( const Handle< MoniTool_Element > &  K1,
const Handle< MoniTool_Element > &  K2 
)
static

Returns True if two keys are the same. The test does not work on the Elements themselves but by calling their methods Equates.


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