0029822: Make TDocStd_Document extensible
authorvro <vladislav.romashko@opencascade.com>
Thu, 17 Dec 2020 11:34:47 +0000 (14:34 +0300)
committerbugmaster <bugmaster@opencascade.com>
Sun, 20 Dec 2020 08:41:33 +0000 (11:41 +0300)
commit5fd0b800276cc6a28c679ed8cdb2afaf51732bdd
tree1055e099a71e010a676be1884bd645ab765343ea
parent04114fd201c20efe9fbe85f00bec9a99ae3747ad
0029822: Make TDocStd_Document extensible

Two virtual methods NewDocument() and InitDocument() are moved from TDocStd_Application to its parent class CDF_Application. In TDocStd_Application these methods remain redefined. These little changes allow creation of a new document only in one virtual method NewDocument(). The methods CreateDocument() in all retrieval drivers are deleted.

Modified files:
- CDF_Application.hxx and cxx: two virtual methods NewDocument() and InitDocument() are moved from TDocStd_Application. The input parameter TDocStd_Document is changed to parent class CDM_Document.
- TDocStd_Application.hxx and cxx: redefines new virtual methods NewDocument() and InitDocument() of the parent class CDF_Application.
- BinLDrivers_DocumentRetrievalDriver.hxx and cxx, StdLDrivers_DocumentRetrievalDriver.hxx and cxx, XmlLDrivers_DocumentRetrievalDriver.hxx and cxx, PCDM_Reader.hxx: a virtual method CreateDocument() is deleted.
- TObj_Application.cxx, XCAFApp_Application.hxx and cxx: down-casting to a descendant class TDocStd_Document is applied.

Documentation:
- upgrade.md is modified.
14 files changed:
dox/upgrade/upgrade.md
src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx
src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.hxx
src/CDF/CDF_Application.cxx
src/CDF/CDF_Application.hxx
src/PCDM/PCDM_Reader.hxx
src/StdLDrivers/StdLDrivers_DocumentRetrievalDriver.cxx
src/StdLDrivers/StdLDrivers_DocumentRetrievalDriver.hxx
src/TDocStd/TDocStd_Application.cxx
src/TDocStd/TDocStd_Application.hxx
src/XCAFApp/XCAFApp_Application.cxx
src/XCAFApp/XCAFApp_Application.hxx
src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.cxx
src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.hxx