From a2fd5924c8a94cd0c0bbdeb2bc4204a828f4f302 Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 25 Sep 2017 17:30:58 +0300 Subject: [PATCH] Clean-up deprecated OCCT-related code --- src/XTPlugin_IOperations_i.cc | 2 +- src/XTPlugin_ImportDriver.cxx | 10 +++------- src/XTPlugin_ImportDriver.hxx | 8 ++++---- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/XTPlugin_IOperations_i.cc b/src/XTPlugin_IOperations_i.cc index b3c651a..b925538 100644 --- a/src/XTPlugin_IOperations_i.cc +++ b/src/XTPlugin_IOperations_i.cc @@ -73,7 +73,7 @@ GEOM::ListOfGO* XTPlugin_IOperations_i::ImportXT( 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/XTPlugin_ImportDriver.cxx b/src/XTPlugin_ImportDriver.cxx index 33a8c36..09d2148 100644 --- a/src/XTPlugin_ImportDriver.cxx +++ b/src/XTPlugin_ImportDriver.cxx @@ -30,7 +30,7 @@ #include #include -// OOCT includes +// OCCT includes #include #include #include @@ -87,7 +87,7 @@ XTPlugin_ImportDriver::XTPlugin_ImportDriver() //function : Execute //purpose : //======================================================================= -Standard_Integer XTPlugin_ImportDriver::Execute( LOGBOOK& log ) const +Standard_Integer XTPlugin_ImportDriver::Execute( Handle(TFunction_Logbook)& log ) const { if( Label().IsNull() ) return 0; Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() ); @@ -220,11 +220,7 @@ Standard_Integer XTPlugin_ImportDriver::Execute( LOGBOOK& log ) const aFunction->SetValue( aResShape ); -#if OCC_VERSION_MAJOR < 7 - log.SetTouched(Label()); -#else log->SetTouched(Label()); -#endif return 1; } @@ -257,4 +253,4 @@ GetCreationInformation( std::string& theOperationName, return true; } -OCCT_IMPLEMENT_STANDARD_RTTIEXT( XTPlugin_ImportDriver, GEOM_BaseDriver ); +IMPLEMENT_STANDARD_RTTIEXT( XTPlugin_ImportDriver, GEOM_BaseDriver ); diff --git a/src/XTPlugin_ImportDriver.hxx b/src/XTPlugin_ImportDriver.hxx index 57c9a96..ead5d09 100644 --- a/src/XTPlugin_ImportDriver.hxx +++ b/src/XTPlugin_ImportDriver.hxx @@ -32,14 +32,14 @@ public: ~XTPlugin_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( XTPlugin_ImportDriver, GEOM_BaseDriver ) +DEFINE_STANDARD_RTTIEXT( XTPlugin_ImportDriver, GEOM_BaseDriver ) }; #endif // _XTPlugin_ImportDriver_HXX -- 2.39.2