]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Set correct drivers for reading/writing '.shaperpart' files
authorazv <azv@opencascade.com>
Tue, 26 Nov 2019 13:15:46 +0000 (16:15 +0300)
committerazv <azv@opencascade.com>
Tue, 26 Nov 2019 13:16:14 +0000 (16:16 +0300)
src/Model/Model_Application.cpp

index 9dcb0bd55bf54245f19e73b059ba1ac7027a8dff..c2772757f8dd2bcc3f2c55e942c561c504ad7b83 100644 (file)
@@ -22,7 +22,8 @@
 
 #include <ModelAPI_Events.h>
 
-#include <PCDM_RetrievalDriver.hxx>
+#include <BinDrivers_DocumentRetrievalDriver.hxx>
+#include <BinDrivers_DocumentStorageDriver.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(Model_Application, TDocStd_Application)
 
@@ -173,9 +174,8 @@ Model_Application::Model_Application()
   // additional file format supported
   static TCollection_ExtendedString THE_DOC_FORMAT("BinShaperPart");
   static TCollection_ExtendedString THE_FILE_EXT("shaperpart");
-  Handle(PCDM_RetrievalDriver) aReader =
-      Handle(PCDM_RetrievalDriver)::DownCast(TheKeepHandle->ReaderFromFormat("BinOcaf"));
-  Handle(PCDM_StorageDriver) aWriter = TheKeepHandle->WriterFromFormat("BinOcaf");
+  Handle(PCDM_RetrievalDriver) aReader = new BinDrivers_DocumentRetrievalDriver;
+  Handle(PCDM_StorageDriver) aWriter = new BinDrivers_DocumentStorageDriver;
   TheKeepHandle->DefineFormat(THE_DOC_FORMAT, "Shaper Part document", THE_FILE_EXT,
                               aReader, aWriter);
 }