From aaae1710e7c541ff8c6651f4db5f2d6c858dabd8 Mon Sep 17 00:00:00 2001 From: mpa Date: Wed, 24 Feb 2016 16:48:10 +0300 Subject: [PATCH] OCCT 7.0.0 porting --- src/ACISPlugin_ExportDriver.cxx | 14 ++------------ src/ACISPlugin_ExportDriver.hxx | 13 +++++-------- src/ACISPlugin_IOperations_i.cc | 2 +- src/ACISPlugin_ImportDriver.cxx | 20 +++++++------------- src/ACISPlugin_ImportDriver.hxx | 13 ++++--------- 5 files changed, 19 insertions(+), 43 deletions(-) diff --git a/src/ACISPlugin_ExportDriver.cxx b/src/ACISPlugin_ExportDriver.cxx index 5ce2420..4bfc181 100644 --- a/src/ACISPlugin_ExportDriver.cxx +++ b/src/ACISPlugin_ExportDriver.cxx @@ -64,7 +64,7 @@ ACISPlugin_ExportDriver::ACISPlugin_ExportDriver() //function : Execute //purpose : //======================================================================= -Standard_Integer ACISPlugin_ExportDriver::Execute( TFunction_Logbook& log ) const +Standard_Integer ACISPlugin_ExportDriver::Execute( LOGBOOK& log ) const { #ifdef ACIS_HASLICENSE try { @@ -108,15 +108,6 @@ Standard_Integer ACISPlugin_ExportDriver::Execute( TFunction_Logbook& log ) cons return 0; } -//======================================================================= -//function : MustExecute -//purpose : -//======================================================================= -Standard_Boolean ACISPlugin_ExportDriver::MustExecute( const TFunction_Logbook& ) const -{ - return Standard_True; -} - //================================================================================ /*! * \brief Returns a name of creation operation and names and values of creation parameters @@ -129,5 +120,4 @@ GetCreationInformation( std::string& theOperationName, return false; } -IMPLEMENT_STANDARD_HANDLE( ACISPlugin_ExportDriver,GEOM_BaseDriver ); -IMPLEMENT_STANDARD_RTTIEXT( ACISPlugin_ExportDriver,GEOM_BaseDriver ); +OCCT_IMPLEMENT_STANDARD_RTTIEXT( ACISPlugin_ExportDriver,GEOM_BaseDriver ); diff --git a/src/ACISPlugin_ExportDriver.hxx b/src/ACISPlugin_ExportDriver.hxx index 7f10279..ae4415d 100644 --- a/src/ACISPlugin_ExportDriver.hxx +++ b/src/ACISPlugin_ExportDriver.hxx @@ -23,9 +23,6 @@ // GEOM includes #include -// OCCT includes -#include - DEFINE_STANDARD_HANDLE( ACISPlugin_ExportDriver, GEOM_BaseDriver ); class ACISPlugin_ExportDriver : public GEOM_BaseDriver @@ -35,14 +32,14 @@ public: ~ACISPlugin_ExportDriver() {}; 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& heOperationName, + virtual bool GetCreationInformation( std::string& theOperationName, std::vector& params ); -DEFINE_STANDARD_RTTI( ACISPlugin_ExportDriver ) +OCCT_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 6af817c..d454c3d 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(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/ACISPlugin_ImportDriver.cxx b/src/ACISPlugin_ImportDriver.cxx index 6f8af8a..969a3e9 100644 --- a/src/ACISPlugin_ImportDriver.cxx +++ b/src/ACISPlugin_ImportDriver.cxx @@ -78,7 +78,7 @@ ACISPlugin_ImportDriver::ACISPlugin_ImportDriver() //function : Execute //purpose : //======================================================================= -Standard_Integer ACISPlugin_ImportDriver::Execute( TFunction_Logbook& log ) const +Standard_Integer ACISPlugin_ImportDriver::Execute( LOGBOOK& log ) const { if( Label().IsNull() ) return 0; Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() ); @@ -161,20 +161,15 @@ Standard_Integer ACISPlugin_ImportDriver::Execute( TFunction_Logbook& log ) cons 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 ACISPlugin_ImportDriver::MustExecute( const TFunction_Logbook& ) const -{ - return Standard_True; -} - //================================================================================ /*! * \brief Returns a name of creation operation and names and values of creation parameters @@ -203,5 +198,4 @@ GetCreationInformation( std::string& theOperationName, return true; } -IMPLEMENT_STANDARD_HANDLE( ACISPlugin_ImportDriver, GEOM_BaseDriver ); -IMPLEMENT_STANDARD_RTTIEXT( ACISPlugin_ImportDriver, GEOM_BaseDriver ); +OCCT_IMPLEMENT_STANDARD_RTTIEXT( ACISPlugin_ImportDriver, GEOM_BaseDriver ); diff --git a/src/ACISPlugin_ImportDriver.hxx b/src/ACISPlugin_ImportDriver.hxx index e0e0aef..43ff287 100644 --- a/src/ACISPlugin_ImportDriver.hxx +++ b/src/ACISPlugin_ImportDriver.hxx @@ -23,11 +23,6 @@ // GEOM includes #include -// OCCT includes -#ifndef _TFunction_Logbook_HeaderFile -#include -#endif - DEFINE_STANDARD_HANDLE( ACISPlugin_ImportDriver, GEOM_BaseDriver ); class ACISPlugin_ImportDriver : public GEOM_BaseDriver @@ -37,14 +32,14 @@ public: ~ACISPlugin_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( ACISPlugin_ImportDriver ) +OCCT_DEFINE_STANDARD_RTTIEXT( ACISPlugin_ImportDriver, GEOM_BaseDriver ) }; #endif // _ACISPlugin_ImportDriver_HXX -- 2.39.2