From: skv Date: Fri, 29 Jul 2016 08:30:51 +0000 (+0300) Subject: Porting on OCCT7.0.1: persistence X-Git-Tag: V8_1_0b1~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=25ea73e3e3ae28a299d2c4562c3e4b09c85ddb39;p=modules%2Fgeom.git Porting on OCCT7.0.1: persistence --- diff --git a/src/GEOM/CMakeLists.txt b/src/GEOM/CMakeLists.txt index e9d57c263..2c0c7605c 100755 --- a/src/GEOM/CMakeLists.txt +++ b/src/GEOM/CMakeLists.txt @@ -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 diff --git a/src/GEOM/GEOM_Application.cxx b/src/GEOM/GEOM_Application.cxx index cdda8af45..f9e1f941c 100644 --- a/src/GEOM/GEOM_Application.cxx +++ b/src/GEOM/GEOM_Application.cxx @@ -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 //======================================================================= diff --git a/src/GEOM/GEOM_Application.hxx b/src/GEOM/GEOM_Application.hxx index 639765548..3cf3085e8 100644 --- a/src/GEOM/GEOM_Application.hxx +++ b/src/GEOM/GEOM_Application.hxx @@ -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: diff --git a/src/GEOM/GEOM_Engine.cxx b/src/GEOM/GEOM_Engine.cxx index ac1216f5a..bfd101415 100644 --- a/src/GEOM/GEOM_Engine.cxx +++ b/src/GEOM/GEOM_Engine.cxx @@ -66,6 +66,12 @@ #include +#if OCC_VERSION_LARGE > 0x07000000 +#include +#include +#include +#endif + #include #include @@ -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; }