0031918: Application Framework - New binary format for fast reading part of OCAF...
[occt.git] / src / BinLDrivers / BinLDrivers_DocumentRetrievalDriver.hxx
index f613ff7..33818f8 100644 (file)
@@ -59,12 +59,14 @@ public:
   Standard_EXPORT virtual void Read (const TCollection_ExtendedString& theFileName,
                                      const Handle(CDM_Document)& theNewDocument, 
                                      const Handle(CDM_Application)& theApplication, 
+                                     const Handle(PCDM_ReaderFilter)& theFilter = Handle(PCDM_ReaderFilter)(),
                                      const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE;
 
   Standard_EXPORT virtual void Read (Standard_IStream&               theIStream,
                                      const Handle(Storage_Data)&     theStorageData,
                                      const Handle(CDM_Document)&     theDoc,
                                      const Handle(CDM_Application)&  theApplication,
+                                     const Handle(PCDM_ReaderFilter)& theFilter = Handle(PCDM_ReaderFilter)(),
                                      const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE;
   
   Standard_EXPORT virtual Handle(BinMDF_ADriverTable) AttributeDrivers (const Handle(Message_Messenger)& theMsgDriver);
@@ -81,7 +83,9 @@ protected:
   Standard_EXPORT virtual Standard_Integer ReadSubTree
     (Standard_IStream& theIS, 
      const TDF_Label& theData, 
-        const Message_ProgressRange& theRanges = Message_ProgressRange());
+     const Handle(PCDM_ReaderFilter)& theFilter,
+     const Standard_Boolean& theQuickPart,
+     const Message_ProgressRange& theRanges = Message_ProgressRange());
   
   
   //! define the procedure of reading a section to file.
@@ -92,10 +96,10 @@ protected:
   
   //! define the procedure of reading a shapes section to file.
   Standard_EXPORT virtual void ReadShapeSection
-    (BinLDrivers_DocumentSection& theSection, 
-     Standard_IStream& theIS, 
-     const Standard_Boolean isMess = Standard_False,
-        const Message_ProgressRange& theRange = Message_ProgressRange());
+   (BinLDrivers_DocumentSection& theSection,
+    Standard_IStream& theIS,
+    const Standard_Boolean isMess = Standard_False,
+    const Message_ProgressRange& theRange = Message_ProgressRange());
   
   //! checks the shapes section can be correctly retrieved.
   Standard_EXPORT virtual void CheckShapeSection (const Storage_Position& thePos, Standard_IStream& theIS);
@@ -110,6 +114,12 @@ protected:
   //! current or lesser than 2, then return false, else true
   Standard_EXPORT virtual Standard_Boolean CheckDocumentVersion (const Standard_Integer theFileVersion, const Standard_Integer theCurVersion);
 
+  //! Return true if retrieved document allows to read parts quickly.
+  static Standard_Boolean IsQuickPart (const Standard_Integer theFileVer);
+
+  //! Enables reading in the quick part access mode.
+  Standard_EXPORT virtual void EnableQuickPartReading (const Handle(Message_Messenger)& /*theMessageDriver*/, Standard_Boolean /*theValue*/) {}
+
   Handle(BinMDF_ADriverTable) myDrivers;
   BinObjMgt_RRelocationTable myRelocTable;
   Handle(Message_Messenger) myMsgDriver;