Open CASCADE Technology 6.6.0
Public Member Functions | Protected Attributes
NCollection_Comparator< TheItemType > Class Template Reference

#include <NCollection_Comparator.hxx>

Public Member Functions

 NCollection_Comparator (const Standard_Real theTolerance=Precision::Confusion())
virtual ~NCollection_Comparator ()
virtual Standard_Boolean IsGreater (const TheItemType &theLeft, const TheItemType &theRight) const
 Comparison functions which should be overridden if standard operators are not defined for user type.
virtual Standard_Boolean IsEqual (const TheItemType &theLeft, const TheItemType &theRight) const
 Should return true if values are equal.
virtual Standard_Boolean IsLower (const TheItemType &theLeft, const TheItemType &theRight) const
 Comparison functions which may be overridden for performance reasons.
virtual Standard_Boolean IsLowerEqual (const TheItemType &theLeft, const TheItemType &theRight) const
virtual Standard_Boolean IsGreaterEqual (const TheItemType &theLeft, const TheItemType &theRight) const

Protected Attributes

Standard_Real myTolerance

Detailed Description

template<class TheItemType>
class NCollection_Comparator< TheItemType >

Class to define basic compare operations. Basic implementation use redirection to standard C++ operators. You can use standard C++ templates mechanisms to redefine these methods or to inherit basic implementation to create multiple comparators for same type with different rules.


Constructor & Destructor Documentation

template<class TheItemType >
NCollection_Comparator< TheItemType >::NCollection_Comparator ( const Standard_Real  theTolerance = Precision::Confusion()) [inline]
template<class TheItemType >
virtual NCollection_Comparator< TheItemType >::~NCollection_Comparator ( ) [inline, virtual]

Member Function Documentation

template<class TheItemType >
virtual Standard_Boolean NCollection_Comparator< TheItemType >::IsEqual ( const TheItemType &  theLeft,
const TheItemType &  theRight 
) const [inline, virtual]
template<class TheItemType >
virtual Standard_Boolean NCollection_Comparator< TheItemType >::IsGreater ( const TheItemType &  theLeft,
const TheItemType &  theRight 
) const [inline, virtual]

Should return true if Left value is greater than Right

template<class TheItemType >
virtual Standard_Boolean NCollection_Comparator< TheItemType >::IsGreaterEqual ( const TheItemType &  theLeft,
const TheItemType &  theRight 
) const [inline, virtual]
template<class TheItemType >
virtual Standard_Boolean NCollection_Comparator< TheItemType >::IsLower ( const TheItemType &  theLeft,
const TheItemType &  theRight 
) const [inline, virtual]

Should return true if Left value is lower than Right

template<class TheItemType >
virtual Standard_Boolean NCollection_Comparator< TheItemType >::IsLowerEqual ( const TheItemType &  theLeft,
const TheItemType &  theRight 
) const [inline, virtual]

Field Documentation

template<class TheItemType >
Standard_Real NCollection_Comparator< TheItemType >::myTolerance [protected]

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines