0031642: Visualization - crash in Graphic3d_Structure::SetVisual() on redisplaying...
[occt.git] / src / StdLDrivers / StdLDrivers_DocumentRetrievalDriver.hxx
index 4661fdd..b5f86e7 100644 (file)
@@ -18,6 +18,7 @@
 #include <Storage_Error.hxx>
 
 class StdObjMgt_MapOfInstantiators;
+class StdObjMgt_Persistent;
 
 //! retrieval driver of a Part document
 class StdLDrivers_DocumentRetrievalDriver : public PCDM_RetrievalDriver
@@ -31,14 +32,26 @@ public:
                                      const Handle(CDM_Document)&       theNewDocument,
                                      const Handle(CDM_Application)&    theApplication) Standard_OVERRIDE;
 
+  //! Override pure virtual method (raises exception Standard_NotImplemented) 
+  Standard_EXPORT virtual void Read (Standard_IStream&              theIStream,
+                                     const Handle(Storage_Data)&    theStorageData,
+                                     const Handle(CDM_Document)&    theDoc,
+                                     const Handle(CDM_Application)& theApplication) Standard_OVERRIDE;
+
   DEFINE_STANDARD_RTTIEXT (StdLDrivers_DocumentRetrievalDriver, PCDM_RetrievalDriver)
 
+protected:
+  //! Register types.
+  Standard_EXPORT virtual void bindTypes (StdObjMgt_MapOfInstantiators& theMap);
+
 private:
-  //! Update the reader status and raise an exception appropriate for the given storage error.
-  Standard_EXPORT Standard_Boolean RaiseOnStorageError (Storage_Error theError);
+  //! Read persistent document from a file.
+  Handle(StdObjMgt_Persistent) read (
+    const TCollection_ExtendedString& theFileName,
+    Storage_HeaderData&               theHeaderData);
 
-  //! Register types.
-  Standard_EXPORT virtual void BindTypes (StdObjMgt_MapOfInstantiators& theMap);
+  //! Update the reader status and raise an exception appropriate for the given storage error.
+  Standard_EXPORT void raiseOnStorageError (Storage_Error theError);
 };
 
 #endif // _StdLDrivers_DocumentRetrievalDriver_HeaderFile