Open CASCADE Technology  7.4.0
Functions

Standard_Integer.hxx File Reference

#include <Standard_Std.hxx>
#include <Standard_TypeDef.hxx>
#include <Standard_values.h>

Functions

Standard_Integer Abs (const Standard_Integer Value)
 
Standard_Boolean IsEven (const Standard_Integer Value)
 
Standard_Boolean IsOdd (const Standard_Integer Value)
 
Standard_Integer Max (const Standard_Integer Val1, const Standard_Integer Val2)
 
Standard_Integer Min (const Standard_Integer Val1, const Standard_Integer Val2)
 
Standard_Integer Modulus (const Standard_Integer Value, const Standard_Integer Divisor)
 
Standard_Integer Square (const Standard_Integer Value)
 
Standard_Integer IntegerFirst ()
 
Standard_Integer IntegerLast ()
 
Standard_Integer IntegerSize ()
 
template<typename TheInteger >
opencascade::std::enable_if< opencascade::is_integer< TheInteger >::value, Standard_Integer >::type IntegerHashCode (const TheInteger theValue, const typename opencascade::disable_deduction< TheInteger >::type theMask, const Standard_Integer theUpperBound)
 Computes a hash code for the given value of some integer type, in range [1, theUpperBound]. More...
 
Standard_Integer HashCode (const Standard_Integer theValue, const Standard_Integer theUpperBound)
 Computes a hash code for the given value of the Standard_Integer type, in range [1, theUpperBound]. More...
 
Standard_Boolean IsEqual (const Standard_Integer theOne, const Standard_Integer theTwo)
 
Standard_Integer HashCode (const unsigned int theValue, const Standard_Integer theUpperBound)
 Computes a hash value for the given unsigned integer, in range [1, theUpperBound]. More...
 
Standard_Integer HashCode (const long long int theValue, const Standard_Integer theUpperBound)
 Computes a hash code for the given value of the "long long int" type, in range [1, theUpperBound]. More...
 

Function Documentation

◆ Abs()

Standard_Integer Abs ( const Standard_Integer  Value)
inline

◆ HashCode() [1/3]

Standard_Integer HashCode ( const Standard_Integer  theValue,
const Standard_Integer  theUpperBound 
)
inline

Computes a hash code for the given value of the Standard_Integer type, in range [1, theUpperBound].

Parameters
theValuethe value of the Standard_Integer type 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 range [1, theUpperBound]

◆ HashCode() [2/3]

Standard_Integer HashCode ( const unsigned int  theValue,
const Standard_Integer  theUpperBound 
)
inline

Computes a hash value for the given unsigned integer, in range [1, theUpperBound].

Parameters
theValuethe unsigned integer which hash code is to be computed
theUpperBoundthe upper bound of the range a computing hash code must be within
Returns
a hash value computed for the given unsigned integer, in range [1, theUpperBound]

◆ HashCode() [3/3]

Standard_Integer HashCode ( const long long int  theValue,
const Standard_Integer  theUpperBound 
)
inline

Computes a hash code for the given value of the "long long int" type, in range [1, theUpperBound].

Parameters
theValuethe value of the "long long int" type 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 range [1, theUpperBound]

◆ IntegerFirst()

Standard_Integer IntegerFirst ( )
inline

◆ IntegerHashCode()

template<typename TheInteger >
opencascade::std::enable_if<opencascade::is_integer<TheInteger>::value, Standard_Integer>::type IntegerHashCode ( const TheInteger  theValue,
const typename opencascade::disable_deduction< TheInteger >::type  theMask,
const Standard_Integer  theUpperBound 
)

Computes a hash code for the given value of some integer type, in range [1, theUpperBound].

Template Parameters
TheIntegerthe type of the integer which hash code is to be computed
Parameters
theValuethe value of the TheInteger type which hash code is to be computed
theMaskthe mask for the last bits of the value that are used in the computation of a hash code
theUpperBoundthe upper bound of the range a computing hash code must be within
Returns
a computed hash code, in range [1, theUpperBound]

◆ IntegerLast()

Standard_Integer IntegerLast ( )
inline

◆ IntegerSize()

Standard_Integer IntegerSize ( )
inline

◆ IsEqual()

Standard_Boolean IsEqual ( const Standard_Integer  theOne,
const Standard_Integer  theTwo 
)
inline

◆ IsEven()

Standard_Boolean IsEven ( const Standard_Integer  Value)
inline

◆ IsOdd()

Standard_Boolean IsOdd ( const Standard_Integer  Value)
inline

◆ Max()

Standard_Integer Max ( const Standard_Integer  Val1,
const Standard_Integer  Val2 
)
inline

◆ Min()

Standard_Integer Min ( const Standard_Integer  Val1,
const Standard_Integer  Val2 
)
inline

◆ Modulus()

Standard_Integer Modulus ( const Standard_Integer  Value,
const Standard_Integer  Divisor 
)
inline

◆ Square()

Standard_Integer Square ( const Standard_Integer  Value)
inline