From: vsr Date: Mon, 25 Sep 2017 14:11:50 +0000 (+0300) Subject: Clean-up deprecated OCCT-related code X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ced68be919acc559f1f143910ffb96b0ab863908;p=plugins%2Fcanrecplugin.git Clean-up deprecated OCCT-related code --- diff --git a/src/CANRECPLUGINEngine/CANRECPluginEngine_IOperations_i.cc b/src/CANRECPLUGINEngine/CANRECPluginEngine_IOperations_i.cc index 23cf759..09f69d8 100644 --- a/src/CANRECPLUGINEngine/CANRECPluginEngine_IOperations_i.cc +++ b/src/CANRECPLUGINEngine/CANRECPluginEngine_IOperations_i.cc @@ -58,7 +58,7 @@ CANRECPluginEngine_IOperations_i::MakeCanonicalRecognition( GEOM::GEOM_Object_pt GetOperations()->SetNotDone(); // Get the reference points - HANDLE_NAMESPACE(GEOM_Object) anInitObject = GetObjectImpl( theObject ); + Handle(::GEOM_Object) anInitObject = GetObjectImpl( theObject ); if ( anInitObject.IsNull() ) { return GEOM::GEOM_Object::_nil(); @@ -66,7 +66,7 @@ CANRECPluginEngine_IOperations_i::MakeCanonicalRecognition( GEOM::GEOM_Object_pt // Make Canonical Recognition Handle(TColStd_HSequenceOfInteger) aStat = new TColStd_HSequenceOfInteger; - HANDLE_NAMESPACE(GEOM_Object) anObject = + Handle(::GEOM_Object) anObject = GetOperations()->MakeCanonicalRecognition(anInitObject, theMergeSurf, theMergeCurves, @@ -106,7 +106,7 @@ CORBA::Long CANRECPluginEngine_IOperations_i::GetNbCanonicalFaces GetOperations()->SetNotDone(); // Get the reference points - HANDLE_NAMESPACE(GEOM_Object) anInitObject = GetObjectImpl(theObject); + Handle(::GEOM_Object) anInitObject = GetObjectImpl(theObject); if (anInitObject.IsNull()) { return -1; diff --git a/src/CANRECPLUGINEngine/CANRECPluginImpl_Driver.cxx b/src/CANRECPLUGINEngine/CANRECPluginImpl_Driver.cxx index a0f400a..167acfa 100644 --- a/src/CANRECPLUGINEngine/CANRECPluginImpl_Driver.cxx +++ b/src/CANRECPLUGINEngine/CANRECPluginImpl_Driver.cxx @@ -103,16 +103,16 @@ CANRECPluginImpl_Driver::~CANRECPluginImpl_Driver() { } -Standard_Boolean CANRECPluginImpl_Driver::MustExecute( const LOGBOOK& ) const +Standard_Boolean CANRECPluginImpl_Driver::MustExecute( const Handle(TFunction_Logbook)& ) const { return Standard_True; } -void CANRECPluginImpl_Driver::Validate( LOGBOOK& ) const +void CANRECPluginImpl_Driver::Validate( Handle(TFunction_Logbook)& ) const { } -Standard_Integer CANRECPluginImpl_Driver::Execute( LOGBOOK& log ) const +Standard_Integer CANRECPluginImpl_Driver::Execute( Handle(TFunction_Logbook)& log ) const { if ( Label().IsNull() ) return 0; Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() ); @@ -189,11 +189,7 @@ Standard_Integer CANRECPluginImpl_Driver::Execute( LOGBOOK& log ) const aFunction->SetValue( aResultingShape ); -#if OCC_VERSION_MAJOR < 7 - log.SetTouched( Label() ); -#else log->SetTouched( Label() ); -#endif return 1; } @@ -216,4 +212,4 @@ GetCreationInformation( std::string& theOperationName, return true; } -OCCT_IMPLEMENT_STANDARD_RTTIEXT( CANRECPluginImpl_Driver,GEOM_BaseDriver ); +IMPLEMENT_STANDARD_RTTIEXT( CANRECPluginImpl_Driver,GEOM_BaseDriver ); diff --git a/src/CANRECPLUGINEngine/CANRECPluginImpl_Driver.hxx b/src/CANRECPLUGINEngine/CANRECPluginImpl_Driver.hxx index ee442d9..fad16aa 100644 --- a/src/CANRECPLUGINEngine/CANRECPluginImpl_Driver.hxx +++ b/src/CANRECPLUGINEngine/CANRECPluginImpl_Driver.hxx @@ -34,14 +34,14 @@ public: static const Standard_GUID& GetID(); static Standard_Integer GetNbCanonicalFaces(const TopoDS_Shape &theShape); - virtual Standard_Integer Execute( LOGBOOK& ) const; - Standard_Boolean MustExecute( const LOGBOOK& ) const; - virtual void Validate( LOGBOOK& ) const; + virtual Standard_Integer Execute( Handle(TFunction_Logbook)& ) const; + Standard_Boolean MustExecute( const Handle(TFunction_Logbook)& ) const; + virtual void Validate( Handle(TFunction_Logbook)& ) const; virtual bool GetCreationInformation( std::string&, std::vector& ); -OCCT_DEFINE_STANDARD_RTTIEXT( CANRECPluginImpl_Driver, GEOM_BaseDriver ) +DEFINE_STANDARD_RTTIEXT( CANRECPluginImpl_Driver, GEOM_BaseDriver ) }; #endif // __CANRECPLUGINIMPL_DRIVER_HXX