]> OCCT Git - occt-copy.git/commit
0031839: Application Framework - Add ability to partially load OCAF document
authormpv <mpv@opencascade.com>
Sat, 2 Jan 2021 10:59:40 +0000 (13:59 +0300)
committeragv <agv@opencascade.com>
Sun, 24 Jan 2021 15:19:46 +0000 (18:19 +0300)
commit47e489e84d388b09154602c8db0c2db060dce97b
tree512bbd96599b2248b1f7881377deaeddf22fa4dd
parent4c6d2607557d6f4d6464a3bfee72d7b3468dbe7d
0031839: Application Framework - Add ability to partially load OCAF document

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 (it is very hard to implement it in the current format without loading time loses)
- only TopoDS_Shapes are loaded in "postponed mode", because all other elements stored in the shapes section loaded in the same time anyway do they created or not: locations, curves, surfaces, triangulation, etc.

Added filter usage description into OCAF User Guide.

# Conflicts:
# src/BinTools/BinTools_ShapeSet.cxx
# src/BinTools/BinTools_ShapeSet.hxx
29 files changed:
dox/user_guides/ocaf/ocaf.md
src/BinDrivers/BinDrivers_DocumentRetrievalDriver.cxx
src/BinDrivers/BinDrivers_DocumentRetrievalDriver.hxx
src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx
src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.hxx
src/BinMNaming/BinMNaming_NamedShapeDriver.cxx
src/BinMNaming/BinMNaming_NamedShapeDriver.hxx
src/BinTools/BinTools.cxx
src/BinTools/BinTools_ShapeSet.cxx
src/BinTools/BinTools_ShapeSet.hxx
src/CDF/CDF_Application.cxx
src/CDF/CDF_Application.hxx
src/CDM/CDM_Application.hxx
src/DDocStd/DDocStd_ApplicationCommands.cxx
src/PCDM/FILES
src/PCDM/PCDM_Reader.hxx
src/PCDM/PCDM_ReaderFilter.cxx [new file with mode: 0644]
src/PCDM/PCDM_ReaderFilter.hxx [new file with mode: 0644]
src/StdLDrivers/StdLDrivers_DocumentRetrievalDriver.cxx
src/StdLDrivers/StdLDrivers_DocumentRetrievalDriver.hxx
src/TDocStd/TDocStd_Application.cxx
src/TDocStd/TDocStd_Application.hxx
src/TDocStd/TDocStd_Document.cxx
src/XDEDRAW/XDEDRAW.cxx
src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.cxx
src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.hxx
tests/bugs/caf/bug31839_1 [new file with mode: 0644]
tests/bugs/caf/bug31839_2 [new file with mode: 0644]
tests/caf/progress/B1