occt: master d5c71e20

Author Committer Branch Timestamp Parent
mpv bugmaster master 2021-06-24 14:26:52 master 9e5e4c0c
Affected Issues  0031918: Application Framework - New binary format for fast reading part of OCAF document
Changeset 0031918: Application Framework - New binary format for fast reading part of OCAF document

Implementation of new format for quick reading and writing parts of the documents (sub-set of labels and sub-set of attributes). It consists in writing shapes and all their contents right in the TNaming_NamedShape attribute placement and skipping the shape section. New format 12 for Binary file types is assigned to this version.

Added PCDM_ReaderFilter class that could be used in Open methods of TDocStd_Application. If it is defined, it allows to read:
- into already opened document in append mode AppendMode_Protect (do not overwrite existing attributes) or AppendMode_Overwrite
- only specified sub-trees of the document using AddPath (const TCollection_AsciiString& theEntryToRead)
- only specified attributes using AddRead (const TCollection_AsciiString& theRead) where theRead could be "TDataStd_Name", for example
- to skip specified attributes read using AddSkipped (const TCollection_AsciiString& theSkipped) where theSkipped could be "TDF_Reference", for example

The current limitations:
- only in Bin format
- if shapes have in the document shared topology, loaded in "append" mode in different "load" operations, they will have no shared topology anymore

Modifications:
BinLDrivers and BinDrivers packages - modifications related to the quick part tree format flag usage, skipping shape section writing and adding labels sizes into the document to be able to pass labels during the reading quickly.
BinObjMgt_Persistent and BinObjMgt_Position - to add possibility to write directly into the stream some data just after the attribute. Before this record a data-size is recorded.
BinMXCAFDoc package modifications to write BinMXCAFDoc_LocationDriver location in the same way as shapes write location data right after the attribute (empty) data in this new format.
BinTools package: creation of ShapeReader and ShapeWriter classes with same root class ShapeSetBase with ShapeSet class. These classes allows to write/read shapes directly to the stream. If some object is already in the stream, write a reference - relative position of the duplicated object. The old format of documents is still supported by Bin_ToolsShapeSet class.
PCDM_ReaderFilter - Allows the user to create a reading filter. It contains algorithm to browse labels tree quickly, without usage of referencing by entry-strings.
TDocStd, CDF and some other packages are changed for supporting reading filters API and options.

Tests, documentation and upgrade information are also added for both issues: 31839 and 31918 related to this commit.
mod - dox/upgrade/upgrade.md Diff File
mod - dox/user_guides/ocaf/ocaf.md Diff File
mod - src/BinDrivers/BinDrivers_DocumentRetrievalDriver.cxx Diff File
mod - src/BinDrivers/BinDrivers_DocumentRetrievalDriver.hxx Diff File
mod - src/BinDrivers/BinDrivers_DocumentStorageDriver.cxx Diff File
mod - src/BinDrivers/BinDrivers_DocumentStorageDriver.hxx Diff File
mod - src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx Diff File
mod - src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.hxx Diff File
mod - src/BinLDrivers/BinLDrivers_DocumentSection.cxx Diff File
mod - src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx Diff File
mod - src/BinLDrivers/BinLDrivers_DocumentStorageDriver.hxx Diff File
mod - src/BinMNaming/BinMNaming_NamedShapeDriver.cxx Diff File
mod - src/BinMNaming/BinMNaming_NamedShapeDriver.hxx Diff File
mod - src/BinMNaming/BinMNaming_NamedShapeDriver.lxx Diff File
mod - src/BinMXCAFDoc/BinMXCAFDoc.cxx Diff File
mod - src/BinMXCAFDoc/BinMXCAFDoc_LocationDriver.cxx Diff File
mod - src/BinMXCAFDoc/BinMXCAFDoc_LocationDriver.hxx Diff File
rm - src/BinMXCAFDoc/BinMXCAFDoc_LocationDriver.lxx Diff File
mod - src/BinMXCAFDoc/FILES Diff File
mod - src/BinObjMgt/BinObjMgt_Persistent.cxx Diff File
mod - src/BinObjMgt/BinObjMgt_Persistent.hxx Diff File
mod - src/BinObjMgt/BinObjMgt_Persistent.lxx Diff File
add - src/BinObjMgt/BinObjMgt_Position.cxx Diff File
add - src/BinObjMgt/BinObjMgt_Position.hxx Diff File
mod - src/BinObjMgt/FILES Diff File
mod - src/BinTools/BinTools.cxx Diff File
mod - src/BinTools/BinTools.hxx Diff File
mod - src/BinTools/BinTools_Curve2dSet.cxx Diff File
mod - src/BinTools/BinTools_Curve2dSet.hxx Diff File
mod - src/BinTools/BinTools_CurveSet.cxx Diff File
mod - src/BinTools/BinTools_CurveSet.hxx Diff File
add - src/BinTools/BinTools_IStream.cxx Diff File
add - src/BinTools/BinTools_IStream.hxx Diff File
mod - src/BinTools/BinTools_LocationSet.cxx Diff File
mod - src/BinTools/BinTools_LocationSet.hxx Diff File
add - src/BinTools/BinTools_ObjectType.hxx Diff File
add - src/BinTools/BinTools_OStream.cxx Diff File
add - src/BinTools/BinTools_OStream.hxx Diff File
add - src/BinTools/BinTools_ShapeReader.cxx Diff File
add - src/BinTools/BinTools_ShapeReader.hxx Diff File
mod - src/BinTools/BinTools_ShapeSet.cxx Diff File
mod - src/BinTools/BinTools_ShapeSet.hxx Diff File
add - src/BinTools/BinTools_ShapeSetBase.cxx Diff File
add - src/BinTools/BinTools_ShapeSetBase.hxx Diff File
add - src/BinTools/BinTools_ShapeWriter.cxx Diff File
add - src/BinTools/BinTools_ShapeWriter.hxx Diff File
mod - src/BinTools/BinTools_SurfaceSet.cxx Diff File
mod - src/BinTools/BinTools_SurfaceSet.hxx Diff File
mod - src/BinTools/FILES Diff File
mod - src/CDF/CDF_Application.cxx Diff File
mod - src/CDF/CDF_Application.hxx Diff File
mod - src/CDM/CDM_Application.hxx Diff File
mod - src/DDocStd/DDocStd_ApplicationCommands.cxx Diff File
mod - src/PCDM/FILES Diff File
mod - src/PCDM/PCDM_Reader.hxx Diff File
add - src/PCDM/PCDM_ReaderFilter.cxx Diff File
add - src/PCDM/PCDM_ReaderFilter.hxx Diff File
mod - src/PCDM/PCDM_ReadWriter.cxx Diff File
mod - src/StdLDrivers/StdLDrivers_DocumentRetrievalDriver.cxx Diff File
mod - src/StdLDrivers/StdLDrivers_DocumentRetrievalDriver.hxx Diff File
mod - src/TDocStd/TDocStd_Application.cxx Diff File
mod - src/TDocStd/TDocStd_Application.hxx Diff File
mod - src/TDocStd/TDocStd_Document.cxx Diff File
mod - src/TDocStd/TDocStd_FormatVersion.hxx Diff File
mod - src/XDEDRAW/XDEDRAW.cxx Diff File
mod - src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.cxx Diff File
mod - src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.hxx Diff File
add - tests/bugs/caf/bug31839_1 Diff File
add - tests/bugs/caf/bug31839_2 Diff File
add - tests/bugs/caf/bug31918_1 Diff File
add - tests/bugs/caf/bug31918_2 Diff File
mod - tests/caf/progress/A1 Diff File
mod - tests/caf/progress/B1 Diff File
mod - tests/caf/progress/C1 Diff File