From ab64994fbf346c38f997b8dc859097b27c3912b8 Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 25 Sep 2017 17:00:33 +0300 Subject: [PATCH] Clean-up deprecated OCCT-related code --- src/ACISPlugin_ExportDriver.cxx | 6 +++--- src/ACISPlugin_ExportDriver.hxx | 8 ++++---- src/ACISPlugin_IOperations_i.cc | 2 +- src/ACISPlugin_ImportDriver.cxx | 10 +++------- src/ACISPlugin_ImportDriver.hxx | 8 ++++---- 5 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/ACISPlugin_ExportDriver.cxx b/src/ACISPlugin_ExportDriver.cxx index 7259200..d20d8d6 100644 --- a/src/ACISPlugin_ExportDriver.cxx +++ b/src/ACISPlugin_ExportDriver.cxx @@ -28,7 +28,7 @@ // GEOM includes #include -// OOCT includes +// OCCT includes #include #include #include @@ -64,7 +64,7 @@ ACISPlugin_ExportDriver::ACISPlugin_ExportDriver() //function : Execute //purpose : //======================================================================= -Standard_Integer ACISPlugin_ExportDriver::Execute( LOGBOOK& log ) const +Standard_Integer ACISPlugin_ExportDriver::Execute( Handle(TFunction_Logbook)& log ) const { #ifdef ACIS_HASLICENSE try { @@ -120,4 +120,4 @@ GetCreationInformation( std::string& theOperationName, return false; } -OCCT_IMPLEMENT_STANDARD_RTTIEXT( ACISPlugin_ExportDriver,GEOM_BaseDriver ); +IMPLEMENT_STANDARD_RTTIEXT( ACISPlugin_ExportDriver,GEOM_BaseDriver ); diff --git a/src/ACISPlugin_ExportDriver.hxx b/src/ACISPlugin_ExportDriver.hxx index b26445a..879c049 100644 --- a/src/ACISPlugin_ExportDriver.hxx +++ b/src/ACISPlugin_ExportDriver.hxx @@ -32,14 +32,14 @@ public: ~ACISPlugin_ExportDriver() {}; static const Standard_GUID& GetID(); - virtual Standard_Integer Execute( LOGBOOK& log ) const; - Standard_Boolean MustExecute( const LOGBOOK& ) const { return Standard_True; } - virtual void Validate( LOGBOOK& ) const {} + virtual Standard_Integer Execute( Handle(TFunction_Logbook)& log ) const; + Standard_Boolean MustExecute( const Handle(TFunction_Logbook)& ) const { return Standard_True; } + virtual void Validate( Handle(TFunction_Logbook)& ) const {} virtual bool GetCreationInformation( std::string& theOperationName, std::vector& params ); -OCCT_DEFINE_STANDARD_RTTIEXT( ACISPlugin_ExportDriver, GEOM_BaseDriver ) + DEFINE_STANDARD_RTTIEXT( ACISPlugin_ExportDriver, GEOM_BaseDriver ) }; #endif // _ACISPlugin_ExportDriver_HXX diff --git a/src/ACISPlugin_IOperations_i.cc b/src/ACISPlugin_IOperations_i.cc index f2b1606..193afa2 100644 --- a/src/ACISPlugin_IOperations_i.cc +++ b/src/ACISPlugin_IOperations_i.cc @@ -97,7 +97,7 @@ GEOM::ListOfGO* ACISPlugin_IOperations_i::ImportACIS( const char* theFileName ) Standard_Integer aLength = aHSeq->Length(); aSeq->length( aLength ); for( Standard_Integer i = 1; i <= aLength; i++ ) - aSeq[i-1] = GetObject( HANDLE_NAMESPACE(GEOM_Object)::DownCast( aHSeq->Value(i) ) ); + aSeq[i-1] = GetObject( Handle(::GEOM_Object)::DownCast( aHSeq->Value(i) ) ); return aSeq._retn(); } diff --git a/src/ACISPlugin_ImportDriver.cxx b/src/ACISPlugin_ImportDriver.cxx index 21262fc..c45431c 100644 --- a/src/ACISPlugin_ImportDriver.cxx +++ b/src/ACISPlugin_ImportDriver.cxx @@ -29,7 +29,7 @@ #include #include -// OOCT includes +// OCCT includes #include #include #include @@ -78,7 +78,7 @@ ACISPlugin_ImportDriver::ACISPlugin_ImportDriver() //function : Execute //purpose : //======================================================================= -Standard_Integer ACISPlugin_ImportDriver::Execute( LOGBOOK& log ) const +Standard_Integer ACISPlugin_ImportDriver::Execute( Handle(TFunction_Logbook)& log ) const { if( Label().IsNull() ) return 0; Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() ); @@ -161,11 +161,7 @@ Standard_Integer ACISPlugin_ImportDriver::Execute( LOGBOOK& log ) const aFunction->SetValue( aResShape ); -#if OCC_VERSION_MAJOR < 7 - log.SetTouched(Label()); -#else log->SetTouched(Label()); -#endif return 1; } @@ -198,4 +194,4 @@ GetCreationInformation( std::string& theOperationName, return true; } -OCCT_IMPLEMENT_STANDARD_RTTIEXT( ACISPlugin_ImportDriver, GEOM_BaseDriver ); +IMPLEMENT_STANDARD_RTTIEXT( ACISPlugin_ImportDriver, GEOM_BaseDriver ); diff --git a/src/ACISPlugin_ImportDriver.hxx b/src/ACISPlugin_ImportDriver.hxx index e5d5f7f..2219f50 100644 --- a/src/ACISPlugin_ImportDriver.hxx +++ b/src/ACISPlugin_ImportDriver.hxx @@ -32,14 +32,14 @@ public: ~ACISPlugin_ImportDriver() {}; static const Standard_GUID& GetID(); - virtual Standard_Integer Execute( LOGBOOK& log ) const; - Standard_Boolean MustExecute( const LOGBOOK& ) const { return Standard_True; } - virtual void Validate( LOGBOOK& ) const {} + virtual Standard_Integer Execute( Handle(TFunction_Logbook)& log ) const; + Standard_Boolean MustExecute( const Handle(TFunction_Logbook)& ) const { return Standard_True; } + virtual void Validate( Handle(TFunction_Logbook)& ) const {} virtual bool GetCreationInformation( std::string& theOperationName, std::vector& params ); -OCCT_DEFINE_STANDARD_RTTIEXT( ACISPlugin_ImportDriver, GEOM_BaseDriver ) + DEFINE_STANDARD_RTTIEXT( ACISPlugin_ImportDriver, GEOM_BaseDriver ) }; #endif // _ACISPlugin_ImportDriver_HXX -- 2.39.2