View Issue Details

IDProjectCategoryView StatusLast Update
0029901CommunityOCCT:Application Frameworkpublic2020-12-19 15:23
ReporterVico Liang Assigned Tobugmaster  
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
Target Version7.6.0Fixed in Version7.6.0 
Summary0029901: Application Framework - Support save to and restore from Stream interface in TObj package
DescriptionStream interface is supported in OCAF framework, but TObj package doesn't support it yet. It's time to update TObj package.
Steps To ReproduceDear MPV, could you review the changes, please?
The result of compilation and testing: http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR29901-master-VRO/view/COMPARE/
TagsNo tags attached.
Test case numberbugs/caf/bug29901

Activities

git

2020-12-11 18:13

administrator   ~0097505

Branch CR29901 has been created by vro.

SHA-1: 349daec4f3fca692cca27ab278a557db7712bdd4


Detailed log of new commits:

Author: Vlad Romashko
Date: Fri Dec 11 18:13:25 2020 +0300

    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.

mpv

2020-12-14 15:32

developer   ~0097575

Reviewed
OCCT branch: CR29901
Products branch: NOTHING

kgv

2020-12-14 16:47

developer   ~0097580

+    catch (Standard_Failure const& anException) {
+#ifdef OCCT_DEBUG
+      ErrorMessage(Message_Msg("TObj_Appl_Exception") << anException.GetMessageString());
+#endif
+      (void) anException;

I see that this code is copied from another place, but is there any reason to hide from user the actual reason of loading/saving failure due to exception (e.g. what for OCCT_DEBUG check is here)?

bugmaster

2020-12-19 14:48

administrator   ~0097739

Combination -
OCCT branch : IR-2020-12-18
master SHA - 04114fd201c20efe9fbe85f00bec9a99ae3747ad
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2020-12-18 SHA - 290e5c74e8fef71947cadf90acb8e43c81ed10a1
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17709.570000000054 / 17744.450000000124 [-0.20%]
Products
Total CPU difference: 12258.480000000121 / 12330.210000000125 [-0.58%]
Windows-64-VC14:
OCCT
Total CPU difference: 19272.796875 / 19429.1875 [-0.80%]
Products
Total CPU difference: 13712.859375 / 13755.5 [-0.31%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2020-12-19 15:23

administrator   ~0097787

Branch CR29901 has been deleted by inv.

SHA-1: 349daec4f3fca692cca27ab278a557db7712bdd4

Related Changesets

occt: master a8d3a0b1

2020-12-11 15:13:25

vro


Committer: bugmaster Details Diff
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.
Affected Issues
0029901
mod - src/TObj/TObj_Application.cxx Diff File
mod - src/TObj/TObj_Application.hxx Diff File
mod - src/TObj/TObj_Model.cxx Diff File
mod - src/TObj/TObj_Model.hxx Diff File
mod - src/TObjDRAW/TObjDRAW.cxx Diff File
mod - tests/bugs/caf/bug28425 Diff File
add - tests/bugs/caf/bug29901 Diff File

Issue History

Date Modified Username Field Change
2018-06-27 12:50 Vico Liang New Issue
2018-06-27 12:50 Vico Liang Assigned To => mpv
2019-07-10 09:01 abv Target Version 7.4.0 => 7.5.0
2020-09-03 15:17 mpv Target Version 7.5.0 => 7.6.0
2020-12-11 18:13 git Note Added: 0097505
2020-12-11 22:12 kgv Severity minor => feature
2020-12-11 22:12 kgv Summary Support save to and restore from Stream interface in TObj package => Application Framework - Support save to and restore from Stream interface in TObj package
2020-12-14 08:39 vro Status new => resolved
2020-12-14 08:39 vro Steps to Reproduce Updated
2020-12-14 15:32 mpv Note Added: 0097575
2020-12-14 15:32 mpv Assigned To mpv => bugmaster
2020-12-14 15:32 mpv Status resolved => reviewed
2020-12-14 16:47 kgv Note Added: 0097580
2020-12-19 14:48 bugmaster Note Added: 0097739
2020-12-19 14:48 bugmaster Status reviewed => tested
2020-12-19 14:53 bugmaster Test case number => bugs/caf/bug29901
2020-12-19 15:06 bugmaster Changeset attached => occt master a8d3a0b1
2020-12-19 15:06 bugmaster Status tested => verified
2020-12-19 15:06 bugmaster Resolution open => fixed
2020-12-19 15:23 git Note Added: 0097787