]> OCCT Git - occt.git/commit
0029901: Support save to and restore from Stream interface in TObj package
authorvro <vro@opencascade.com>
Fri, 11 Dec 2020 15:13:25 +0000 (18:13 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 17 Dec 2020 18:05:03 +0000 (21:05 +0300)
commita8d3a0b1021e3b37d9161c6d69942ecec441befc
tree449970f8c53834377d31c083e29053bf95dd01ec
parentc6685c65fdc4f1012e8cbe15d87c0d7e58246b3f
0029901: Support save to and restore from Stream interface in TObj package

Storage and retrieval of a document by means of a stream is distributed to TObj model.
Modified files:
-TObj_Model.hxx, cxx - the virtual methods Load() and SaveAs() obtained a stream as an argument instead of a file name.
-TObj_Application.hxx, cxx - same extension: the virtual methods LoadDocument() and SaveDocument() use a stream to open and save a document.
-TObjDRAW.cxx - draw-commands TObjSave and TObjLoad are extended for -stream parameter, which allows usage of a file input or output stream instead of a file name.

A new test:
- bugs caf bug29901 - it creates a simple TObj-model, saves it on disk using a file stream, loads it by means of a file stream and checks the content.

Modified test:
- bugs caf bug28425 - just improved to proper manipulate a test-file on disk.
src/TObj/TObj_Application.cxx
src/TObj/TObj_Application.hxx
src/TObj/TObj_Model.cxx
src/TObj/TObj_Model.hxx
src/TObjDRAW/TObjDRAW.cxx
tests/bugs/caf/bug28425
tests/bugs/caf/bug29901 [new file with mode: 0644]