IsEqual function for Handle(Standard_Transient) was added to global scope.
Getting rid of compilation errors (removed additional IsEqual functions)
#include <AIS_NListIteratorOfListTransient.hxx>
#include <NCollection_DefineDataMap.hxx>
-inline Standard_Boolean IsEqual (const Handle_Standard_Transient& theH1,
- const Handle_Standard_Transient& theH2)
-{
- return (theH1 == theH2);
-}
-
DEFINE_BASECOLLECTION(AIS_BaseCollItListTransient,
AIS_NListIteratorOfListTransient)
DEFINE_DATAMAP (AIS_NDataMapOfTransientIteratorOfListTransient,
void dump_texture( int id);
-class Font_DataMap:
- public NCollection_DataMap< Handle(TCollection_HAsciiString),
- Handle(TCollection_HAsciiString)>
-{
-public:
- inline Font_DataMap
- (const Standard_Integer NbBuckets = 1,
- const Handle(NCollection_BaseAllocator)& theAllocator = 0L)
- : NCollection_DataMap<Handle(TCollection_HAsciiString),
- Handle(TCollection_HAsciiString)> (NbBuckets, theAllocator)
- {}
-
- inline Font_DataMap (const Font_DataMap& theOther)
- : NCollection_DataMap<Handle(TCollection_HAsciiString),
- Handle(TCollection_HAsciiString)> (theOther)
- {}
- friend Standard_Boolean IsEqual( const Handle(TCollection_HAsciiString)& h1,
- const Handle(TCollection_HAsciiString)& h2 );
-};
-inline Standard_Boolean
-IsEqual( const Handle(TCollection_HAsciiString)& h1,
- const Handle(TCollection_HAsciiString)& h2 )
-{
- return (!h1->IsLess(h2) && !h1->IsGreater(h2));
-}
-
OpenGl_FontMgr::OpenGl_FontMgr()
: myCurrentFontId(-1),
myXCurrentScale(1.f),
Standard_Transient *entity;
};
+//! Function in global scope to check handles for equality.
+//! Will be used with standard OCCT collections like NCollection_DataMap within NCollection_DefaultHasher
+//! when there are no specialization defined for concrete type.
+//! Notice that this implementation compares only pointers to objects!
+inline Standard_Boolean IsEqual (const Handle(Standard_Transient)& theFirst,
+ const Handle(Standard_Transient)& theSecond)
+{
+ return theFirst == theSecond;
+}
+
#ifdef _WIN32
#pragma warning (pop)
#endif
#include <TCollection_HExtendedString.hxx>
#include <Standard_Failure.hxx>
-//! The function IsEqual explicitly defined for Handle(Standard_Transient)
-//! in order to avoid the problem with implicit using of IsEqual() defined
-//! for Standard_Address. The problem is that Handle(Standard_Transient)
-//! have only operator of type casting to (non-const) Standard_Transient*,
-//! hence this implicit way cannot be used for const Handle(Standard_Transient)
-inline Standard_Boolean IsEqual(const Handle(Standard_Transient)& One,
- const Handle(Standard_Transient)& Two)
-{
- return One == Two;
-}
-
//! Methods inline implimentation for HExtendedString
inline Standard_Integer HashCode (const Handle(TCollection_HExtendedString)& theStr,
//! This class is used to create and store mutexes associated with shapes.
class TopTools_MutexForShapeProvider
{
- friend Standard_Boolean IsEqual(const Handle_TopoDS_TShape & theFirstHandle,
- const Handle_TopoDS_TShape & theSecondHandle);
-
public:
//! Constructor
Standard_EXPORT TopTools_MutexForShapeProvider();
};
-inline Standard_Boolean IsEqual(const Handle_TopoDS_TShape & theFirstHandle,
- const Handle_TopoDS_TShape & theSecondHandle)
-{
- return (theFirstHandle == theSecondHandle);
-}
-
#endif
\ No newline at end of file