File indexing completed on 2026-09-12 09:16:29
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _BinLDrivers_DocumentRetrievalDriver_HeaderFile
0017 #define _BinLDrivers_DocumentRetrievalDriver_HeaderFile
0018
0019 #include <Standard.hxx>
0020
0021 #include <BinObjMgt_Persistent.hxx>
0022 #include <BinObjMgt_RRelocationTable.hxx>
0023 #include <Standard_Integer.hxx>
0024 #include <NCollection_Map.hxx>
0025 #include <NCollection_DynamicArray.hxx>
0026 #include <BinLDrivers_DocumentSection.hxx>
0027 #include <PCDM_RetrievalDriver.hxx>
0028 #include <Standard_IStream.hxx>
0029 #include <Storage_Position.hxx>
0030 #include <Storage_Data.hxx>
0031
0032 class BinMDF_ADriverTable;
0033 class Message_Messenger;
0034 class TCollection_ExtendedString;
0035 class CDM_Document;
0036 class CDM_Application;
0037 class TDF_Label;
0038 class BinLDrivers_DocumentSection;
0039
0040 class BinLDrivers_DocumentRetrievalDriver : public PCDM_RetrievalDriver
0041 {
0042
0043 public:
0044
0045 Standard_EXPORT BinLDrivers_DocumentRetrievalDriver();
0046
0047
0048 Standard_EXPORT void Read(
0049 const TCollection_ExtendedString& theFileName,
0050 const occ::handle<CDM_Document>& theNewDocument,
0051 const occ::handle<CDM_Application>& theApplication,
0052 const occ::handle<PCDM_ReaderFilter>& theFilter = occ::handle<PCDM_ReaderFilter>(),
0053 const Message_ProgressRange& theProgress = Message_ProgressRange()) override;
0054
0055 Standard_EXPORT void Read(
0056 Standard_IStream& theIStream,
0057 const occ::handle<Storage_Data>& theStorageData,
0058 const occ::handle<CDM_Document>& theDoc,
0059 const occ::handle<CDM_Application>& theApplication,
0060 const occ::handle<PCDM_ReaderFilter>& theFilter = occ::handle<PCDM_ReaderFilter>(),
0061 const Message_ProgressRange& theProgress = Message_ProgressRange()) override;
0062
0063 Standard_EXPORT virtual occ::handle<BinMDF_ADriverTable> AttributeDrivers(
0064 const occ::handle<Message_Messenger>& theMsgDriver);
0065
0066 DEFINE_STANDARD_RTTIEXT(BinLDrivers_DocumentRetrievalDriver, PCDM_RetrievalDriver)
0067
0068 protected:
0069
0070 Standard_EXPORT virtual int ReadSubTree(
0071 Standard_IStream& theIS,
0072 const TDF_Label& theData,
0073 const occ::handle<PCDM_ReaderFilter>& theFilter,
0074 const bool& theQuickPart,
0075 const bool theReadMissing,
0076 const Message_ProgressRange& theRanges = Message_ProgressRange());
0077
0078
0079 Standard_EXPORT virtual void ReadSection(BinLDrivers_DocumentSection& theSection,
0080 const occ::handle<CDM_Document>& theDoc,
0081 Standard_IStream& theIS);
0082
0083
0084 Standard_EXPORT virtual void ReadShapeSection(
0085 BinLDrivers_DocumentSection& theSection,
0086 Standard_IStream& theIS,
0087 const bool isMess = false,
0088 const Message_ProgressRange& theRange = Message_ProgressRange());
0089
0090
0091 Standard_EXPORT virtual void CheckShapeSection(const Storage_Position& thePos,
0092 Standard_IStream& theIS);
0093
0094
0095 Standard_EXPORT virtual void Clear();
0096
0097
0098
0099
0100
0101
0102 Standard_EXPORT virtual bool CheckDocumentVersion(const int theFileVersion,
0103 const int theCurVersion);
0104
0105
0106 static bool IsQuickPart(const int theFileVer);
0107
0108
0109 Standard_EXPORT virtual void EnableQuickPartReading(
0110 const occ::handle<Message_Messenger>& ,
0111 bool )
0112 {
0113 }
0114
0115 occ::handle<BinMDF_ADriverTable> myDrivers;
0116 BinObjMgt_RRelocationTable myRelocTable;
0117 occ::handle<Message_Messenger> myMsgDriver;
0118
0119 private:
0120 BinObjMgt_Persistent myPAtt;
0121 NCollection_Map<int> myMapUnsupported;
0122 NCollection_DynamicArray<BinLDrivers_DocumentSection> mySections;
0123 NCollection_Map<int> myUnresolvedLinks;
0124 };
0125
0126 #endif