From 6d10d84e8705a46afe3d6448b271afac6b48de1c Mon Sep 17 00:00:00 2001 From: mpa Date: Wed, 24 Feb 2016 17:02:59 +0300 Subject: [PATCH] OCCT 7.0.0 porting --- src/XTPlugin_IOperations_i.cc | 2 +- src/XTPlugin_ImportDriver.cxx | 20 +++++++------------- src/XTPlugin_ImportDriver.hxx | 13 ++++--------- 3 files changed, 12 insertions(+), 23 deletions(-) diff --git a/src/XTPlugin_IOperations_i.cc b/src/XTPlugin_IOperations_i.cc index 964e2e7..ea8b824 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(GEOM_Object)::DownCast( aHSeq->Value(i) ) ); + aSeq[i-1] = GetObject( HANDLE_NAMESPACE(GEOM_Object)::DownCast( aHSeq->Value(i) ) ); return aSeq._retn(); } diff --git a/src/XTPlugin_ImportDriver.cxx b/src/XTPlugin_ImportDriver.cxx index 4ff57d4..2f2c87a 100644 --- a/src/XTPlugin_ImportDriver.cxx +++ b/src/XTPlugin_ImportDriver.cxx @@ -87,7 +87,7 @@ XTPlugin_ImportDriver::XTPlugin_ImportDriver() //function : Execute //purpose : //======================================================================= -Standard_Integer XTPlugin_ImportDriver::Execute( TFunction_Logbook& log ) const +Standard_Integer XTPlugin_ImportDriver::Execute( LOGBOOK& log ) const { if( Label().IsNull() ) return 0; Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() ); @@ -220,20 +220,15 @@ Standard_Integer XTPlugin_ImportDriver::Execute( TFunction_Logbook& log ) const aFunction->SetValue( aResShape ); - log.SetTouched( Label() ); +#if OCC_VERSION_MAJOR < 7 + log.SetTouched(Label()); +#else + log->SetTouched(Label()); +#endif return 1; } -//======================================================================= -//function : MustExecute -//purpose : -//======================================================================= -Standard_Boolean XTPlugin_ImportDriver::MustExecute( const TFunction_Logbook& ) const -{ - return Standard_True; -} - //================================================================================ /*! * \brief Returns a name of creation operation and names and values of creation parameters @@ -262,5 +257,4 @@ GetCreationInformation( std::string& theOperationName, return true; } -IMPLEMENT_STANDARD_HANDLE( XTPlugin_ImportDriver, GEOM_BaseDriver ); -IMPLEMENT_STANDARD_RTTIEXT( XTPlugin_ImportDriver, GEOM_BaseDriver ); +OCCT_IMPLEMENT_STANDARD_RTTIEXT( XTPlugin_ImportDriver, GEOM_BaseDriver ); diff --git a/src/XTPlugin_ImportDriver.hxx b/src/XTPlugin_ImportDriver.hxx index 82873f7..f137de0 100644 --- a/src/XTPlugin_ImportDriver.hxx +++ b/src/XTPlugin_ImportDriver.hxx @@ -23,11 +23,6 @@ // GEOM includes #include -// OCCT includes -#ifndef _TFunction_Logbook_HeaderFile -#include -#endif - DEFINE_STANDARD_HANDLE( XTPlugin_ImportDriver, GEOM_BaseDriver ); class XTPlugin_ImportDriver : public GEOM_BaseDriver @@ -37,14 +32,14 @@ public: ~XTPlugin_ImportDriver() {}; static const Standard_GUID& GetID(); - virtual Standard_Integer Execute( TFunction_Logbook& log ) const; - Standard_Boolean MustExecute( const TFunction_Logbook& ) const; - virtual void Validate( TFunction_Logbook& ) const {} + virtual Standard_Integer Execute( LOGBOOK& log ) const; + Standard_Boolean MustExecute( const LOGBOOK& ) const { return Standard_True; } + virtual void Validate( LOGBOOK& ) const {} virtual bool GetCreationInformation( std::string& theOperationName, std::vector& params ); -DEFINE_STANDARD_RTTI( XTPlugin_ImportDriver ) +OCCT_DEFINE_STANDARD_RTTIEXT( XTPlugin_ImportDriver, GEOM_BaseDriver ) }; #endif // _XTPlugin_ImportDriver_HXX -- 2.39.2