Porting on OCCT7.0.1: persistence

This commit is contained in:
skv 2016-07-29 11:30:51 +03:00
parent 8ee487fe3f
commit 25ea73e3e3
4 changed files with 19 additions and 0 deletions

View File

@ -44,6 +44,10 @@ SET(_link_LIBRARIES
GEOMSketcher GEOMSketcher
) )
IF(CAS_VERSION_STR VERSION_GREATER "7.0.0")
LIST(APPEND _link_LIBRARIES ${CAS_TKStd} ${CAS_TKBin})
ENDIF()
# --- headers --- # --- headers ---
SET(GEOM_HEADERS SET(GEOM_HEADERS

View File

@ -42,6 +42,7 @@ GEOM_Application::~GEOM_Application()
{ {
} }
#if OCC_VERSION_LARGE <= 0x07000000
//======================================================================= //=======================================================================
//function : Formats //function : Formats
//purpose : //purpose :
@ -54,6 +55,7 @@ void GEOM_Application::Formats(TColStd_SequenceOfExtendedString& Formats)
Formats.Append(TCollection_ExtendedString ("BinOcaf")); Formats.Append(TCollection_ExtendedString ("BinOcaf"));
#endif #endif
} }
#endif
//======================================================================= //=======================================================================

View File

@ -36,7 +36,9 @@ public:
Standard_EXPORT GEOM_Application(); Standard_EXPORT GEOM_Application();
Standard_EXPORT ~GEOM_Application(); Standard_EXPORT ~GEOM_Application();
#if OCC_VERSION_LARGE <= 0x07000000
Standard_EXPORT virtual void Formats(TColStd_SequenceOfExtendedString& Formats); Standard_EXPORT virtual void Formats(TColStd_SequenceOfExtendedString& Formats);
#endif
Standard_EXPORT Standard_CString ResourcesName(); Standard_EXPORT Standard_CString ResourcesName();
public: public:

View File

@ -66,6 +66,12 @@
#include <Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString.hxx> #include <Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString.hxx>
#if OCC_VERSION_LARGE > 0x07000000
#include <BinDrivers.hxx>
#include <StdDrivers_DocumentRetrievalDriver.hxx>
#include <PCDM_StorageDriver.hxx>
#endif
#include <set> #include <set>
#include <Standard_Failure.hxx> #include <Standard_Failure.hxx>
@ -225,6 +231,11 @@ GEOM_Engine::GEOM_Engine()
TFunction_DriverTable::Get()->AddDriver(GEOM_Object::GetSubShapeID(), new GEOM_SubShapeDriver()); TFunction_DriverTable::Get()->AddDriver(GEOM_Object::GetSubShapeID(), new GEOM_SubShapeDriver());
_OCAFApp = new GEOM_Application(); _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; _UndoLimit = 0;
} }