Salome HOME
OCCT 7.0.0 porting
authormpa <mpa@opencascade.com>
Wed, 24 Feb 2016 13:52:30 +0000 (16:52 +0300)
committermpa <mpa@opencascade.com>
Wed, 24 Feb 2016 13:52:30 +0000 (16:52 +0300)
src/DXFPlugin_ExportDriver.cxx
src/DXFPlugin_ExportDriver.hxx
src/DXFPlugin_IOperations_i.cc
src/DXFPlugin_ImportDriver.cxx
src/DXFPlugin_ImportDriver.hxx

index 5aea0ab8469b75b22da16f31825e5ec9269abd69..6b696f49663517d7417b52c9a2caa76f5433acdf 100644 (file)
@@ -64,7 +64,7 @@ DXFPlugin_ExportDriver::DXFPlugin_ExportDriver()
 //function : Execute
 //purpose  :
 //=======================================================================
-Standard_Integer DXFPlugin_ExportDriver::Execute( TFunction_Logbook& log ) const
+Standard_Integer DXFPlugin_ExportDriver::Execute( LOGBOOK& log ) const
 {
 #ifdef DXF_HASLICENSE
   try {
@@ -108,15 +108,6 @@ Standard_Integer DXFPlugin_ExportDriver::Execute( TFunction_Logbook& log ) const
     return 0;
 }
 
-//=======================================================================
-//function : MustExecute
-//purpose  :
-//=======================================================================
-Standard_Boolean DXFPlugin_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( DXFPlugin_ExportDriver,GEOM_BaseDriver );
-IMPLEMENT_STANDARD_RTTIEXT( DXFPlugin_ExportDriver,GEOM_BaseDriver );
+OCCT_IMPLEMENT_STANDARD_RTTIEXT( DXFPlugin_ExportDriver,GEOM_BaseDriver )
index 6f95e3ca16b0aaf3bd942ac9f30ed2b7bdce6667..2d23945eb9ca5eca59d080025b261a5346d1f98e 100644 (file)
 // GEOM includes
 #include <GEOM_BaseDriver.hxx>
 
-// OCCT includes
-#ifndef _TFunction_Logbook_HeaderFile
-#include <TFunction_Logbook.hxx>
-#endif
-
 DEFINE_STANDARD_HANDLE( DXFPlugin_ExportDriver, GEOM_BaseDriver );
 
 class DXFPlugin_ExportDriver : public GEOM_BaseDriver
@@ -37,14 +32,14 @@ public:
   ~DXFPlugin_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& theOperationName,
                                                       std::vector<GEOM_Param>& params );
 
-DEFINE_STANDARD_RTTI( DXFPlugin_ExportDriver )
+OCCT_DEFINE_STANDARD_RTTIEXT( DXFPlugin_ExportDriver, GEOM_BaseDriver )
 };
 
 #endif // _DXFPlugin_ExportDriver_HXX
index c04fb8c22d7b2bacc23619620c9e2d91d51f852d..400254c35821c2c5d226356188042b0a48539f5f 100644 (file)
@@ -66,7 +66,7 @@ void DXFPlugin_IOperations_i::ExportDXF( GEOM::GEOM_Object_ptr theOriginal,
   GetOperations()->SetNotDone();
 
   //Get the reference shape
-  Handle(GEOM_Object) anOriginal = GetObjectImpl( theOriginal );
+  HANDLE_NAMESPACE(GEOM_Object) anOriginal = GetObjectImpl( theOriginal );
   if (anOriginal.IsNull()) return;
 
   //Export the shape to the file
@@ -98,7 +98,7 @@ GEOM::ListOfGO* DXFPlugin_IOperations_i::ImportDXF( 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();
 }
index 0c2ee733387e2c94a9ebe3ab90b214d18a64fdf2..89d31ab2b88a8faacd70689baec1e5489d4f22ce 100644 (file)
@@ -81,7 +81,7 @@ DXFPlugin_ImportDriver::DXFPlugin_ImportDriver()
 //function : Execute
 //purpose  :
 //=======================================================================
-Standard_Integer DXFPlugin_ImportDriver::Execute( TFunction_Logbook& log ) const
+Standard_Integer DXFPlugin_ImportDriver::Execute( LOGBOOK& log ) const
 {
   if( Label().IsNull() ) return 0;
   Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction( Label() );
@@ -170,20 +170,15 @@ Standard_Integer DXFPlugin_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 DXFPlugin_ImportDriver::MustExecute( const TFunction_Logbook& ) const
-{
-  return Standard_True;
-}
-
 //================================================================================
 /*!
  * \brief Returns a name of creation operation and names and values of creation parameters
@@ -212,5 +207,4 @@ GetCreationInformation( std::string&             theOperationName,
   return true;
 }
 
-IMPLEMENT_STANDARD_HANDLE( DXFPlugin_ImportDriver, GEOM_BaseDriver );
-IMPLEMENT_STANDARD_RTTIEXT( DXFPlugin_ImportDriver, GEOM_BaseDriver );
+OCCT_IMPLEMENT_STANDARD_RTTIEXT( DXFPlugin_ImportDriver, GEOM_BaseDriver );
index 8d03716f2b43ce1b6a348a46dd4801c400972049..9eb8c9b2c3843cb8c2cfbcef8d2e75155b9dc1a4 100644 (file)
 // GEOM includes
 #include <GEOM_BaseDriver.hxx>
 
-// OCCT includes
-#ifndef _TFunction_Logbook_HeaderFile
-#include <TFunction_Logbook.hxx>
-#endif
-
 DEFINE_STANDARD_HANDLE( DXFPlugin_ImportDriver, GEOM_BaseDriver );
 
 class DXFPlugin_ImportDriver : public GEOM_BaseDriver
@@ -37,14 +32,14 @@ public:
   ~DXFPlugin_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<GEOM_Param>& params );
 
-DEFINE_STANDARD_RTTI( DXFPlugin_ImportDriver )
+OCCT_DEFINE_STANDARD_RTTIEXT( DXFPlugin_ImportDriver, GEOM_BaseDriver )
 };
 
 #endif // _DXFPlugin_ImportDriver_HXX