]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Porting on OCCT7.0.1: persistence
authorskv <skv@opencascade.com>
Fri, 29 Jul 2016 08:30:51 +0000 (11:30 +0300)
committerskv <skv@opencascade.com>
Fri, 29 Jul 2016 08:30:51 +0000 (11:30 +0300)
src/GEOM/CMakeLists.txt
src/GEOM/GEOM_Application.cxx
src/GEOM/GEOM_Application.hxx
src/GEOM/GEOM_Engine.cxx

index e9d57c263e60a512785d302cdc6f5ed983a90295..2c0c7605c012cc481f8bf35f98b5686250af88d2 100755 (executable)
@@ -44,6 +44,10 @@ SET(_link_LIBRARIES
   GEOMSketcher
   )
 
+IF(CAS_VERSION_STR VERSION_GREATER "7.0.0")
+  LIST(APPEND _link_LIBRARIES ${CAS_TKStd} ${CAS_TKBin})
+ENDIF()
+
 # --- headers ---
 
 SET(GEOM_HEADERS
index cdda8af45e132dcfbb78e6411e4ab70e2b4957b6..f9e1f941c4aea5bf78615dd276861997dfa0e884 100644 (file)
@@ -42,6 +42,7 @@ GEOM_Application::~GEOM_Application()
 {
 }
 
+#if OCC_VERSION_LARGE <= 0x07000000
 //=======================================================================
 //function : Formats
 //purpose  : 
@@ -54,6 +55,7 @@ void GEOM_Application::Formats(TColStd_SequenceOfExtendedString& Formats)
   Formats.Append(TCollection_ExtendedString ("BinOcaf"));
 #endif
 }
+#endif
 
 
 //=======================================================================
index 639765548e5098b0c1dccbf759c1fa852f61698c..3cf3085e8ce30d762c8cd908b54ddc28a5d7e64e 100644 (file)
@@ -36,7 +36,9 @@ public:
   Standard_EXPORT GEOM_Application();
   Standard_EXPORT ~GEOM_Application();
 
+#if OCC_VERSION_LARGE <= 0x07000000
   Standard_EXPORT virtual void Formats(TColStd_SequenceOfExtendedString& Formats);
+#endif
   Standard_EXPORT Standard_CString ResourcesName();
 
 public:
index ac1216f5a27922600c4eb93f3c2011d5867b53cb..bfd101415e33725f9e753dd1529a03109d54747a 100644 (file)
 
 #include <Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString.hxx>
 
+#if OCC_VERSION_LARGE > 0x07000000
+#include <BinDrivers.hxx>
+#include <StdDrivers_DocumentRetrievalDriver.hxx>
+#include <PCDM_StorageDriver.hxx>
+#endif
+
 #include <set>
 
 #include <Standard_Failure.hxx>
@@ -225,6 +231,11 @@ GEOM_Engine::GEOM_Engine()
   TFunction_DriverTable::Get()->AddDriver(GEOM_Object::GetSubShapeID(), new GEOM_SubShapeDriver());
   
   _OCAFApp = new GEOM_Application();
+#if OCC_VERSION_LARGE > 0x07000000
+  _OCAFApp->DefineFormat("SALOME_GEOM", "GEOM Document Version 1.0", "sgd",
+                         new StdDrivers_DocumentRetrievalDriver, 0);
+  BinDrivers::DefineFormat(_OCAFApp);
+#endif
   _UndoLimit = 0;
 }