View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0031189 | Open CASCADE | OCCT:DRAW | public | 2019-11-24 15:01 | 2020-12-02 17:12 |
Reporter | kgv | Assigned To | bugmaster | ||
Priority | normal | Severity | feature | ||
Status | closed | Resolution | fixed | ||
Target Version | 7.5.0 | Fixed in Version | 7.5.0 | ||
Summary | 0031189: Draw Harness, ViewerTest - send messages to Message::DefaultMessenger() | ||||
Description | Currently ViewerTest package sends error messages to std::cout or std::cerr. It is proposed sending them to Message::DefaultMessenger(), which apart from unification will make them colorized. | ||||
Steps To Reproduce | pload MODELING VISUALIZATION box b 10 10 10 vdisplay a vdisplay b vclear | ||||
Tags | No tags attached. | ||||
Test case number | bugs/fclasses/bug31189 | ||||
|
Branch CR31189 has been created by kgv. SHA-1: dd62701926cfe7906e6dec9cc7e9e3abeac9a5f5 Detailed log of new commits: Author: kgv Date: Sun Nov 24 15:02:39 2019 +0300 0031189: Draw Harness, ViewerTest - send messages to Message::DefaultMessenger() Message::Send() - added short-cuts for sending message to default messenger. ViewerTest has been updated to send messages to Message::DefaultMessenger() instead of direct output to std::cout/std::cerr. |
|
Branch CR31189_1 has been created by kgv. SHA-1: 4340d5fb031703d657fe706b976b4c9dfaffe267 Detailed log of new commits: Author: kgv Date: Sun Nov 24 15:02:39 2019 +0300 0031189: Draw Harness, ViewerTest - send messages to Message::DefaultMessenger() Message::Send() - added short-cuts for sending message to default messenger. ViewerTest has been updated to send messages to Message::DefaultMessenger() instead of direct output to std::cout/std::cerr. |
|
Branch CR31189_2 has been created by kgv. SHA-1: 8d55b92963ccffc598a7bdf89ce2f4c665399eb5 Detailed log of new commits: Author: kgv Date: Sun Nov 24 15:02:39 2019 +0300 0031189: Draw Harness, ViewerTest - send messages to Message::DefaultMessenger() Message::Send() - added short-cuts for sending message to default messenger. ViewerTest has been updated to send messages to Message::DefaultMessenger() instead of direct output to std::cout/std::cerr. |
|
Branch CR31189_2 has been updated forcibly by kgv. SHA-1: 8c0a8876997f2a3ae45e1fc556ceb32e1f2d4c3f |
|
Branch CR31189_2 has been updated forcibly by kgv. SHA-1: bd6a0eb1209fcb85e7c37bf40a67fabb87e65353 |
|
Branch CR31189_2 has been updated forcibly by kgv. SHA-1: 6654f42adda2f8914a3f9690cfa8cca53afd7ca0 |
|
Branch CR31189_2 has been updated forcibly by kgv. SHA-1: fc63030cc707fb301d787eecff45bcd181872bbc |
|
Branch CR31189_2 has been updated forcibly by kgv. SHA-1: 99e8de453210c8da32eb566f50085a6866eb22fd |
|
draw_old.png (10,181 bytes) |
|
draw_new.png (10,331 bytes) |
|
Patch is ready for review in branches CR31189_2 of OCCT and OCC Products. http://jenkins-test-12.nnov.opencascade.com/view/CR31189_2-master-KGV/ |
|
Branch CR31189_3 has been created by abv. SHA-1: cac74814a86f31f718e788b1cecfe6bc19d1e39b Detailed log of new commits: Author: kgv Date: Sun Nov 24 15:02:39 2019 +0300 0031189: Draw Harness, ViewerTest - send messages to Message::DefaultMessenger() Added short-cuts methods in Message_Messenger for sending message with specified gravity, and stream buffer class for using stream-like interface for that. Similar short-cuts to DefaultMessenger() are added in Message package. ViewerTest has been updated to send messages to Message::DefaultMessenger() instead of direct output to std::cout/std::cerr. |
|
I believe the same API can be also useful for Message_Messenger class itself, not only for its global default instance. I have put modified implementation to CR32289_3, please have a look. I deem we do not need to expose this interface in C# wrapper, do you agree? I have not modified products branch yet, and did not run tests. Besides, can you explain why some uses of std::cout remained in ViewerTest package? Should not they be replaced as well? |
|
> I deem we do not need to expose this interface in C# wrapper, do you agree? The purpose of the patch in Products branch is silencing SWIG warnings - I have not found a simpler way to shut up SWIG. > can you explain why some uses of std::cout remained in ViewerTest package? As the first iteration, the patch is focused on replacing Error / Fail output messages. Few remaining cases are not failures, but user input requests or some information output with an uncertainly how to classify them (trace / info / Tcl / something else), so that they have been left for future iterations. + StreamBuffer (const StreamBuffer&& theOther) Your patch relies on Move constructor. Shouldn't StreamBuffer copy constructor be disabled? How patch can be applied for ancient C++ compilers, which we still have to support? + //! message via stream interface, and and putting result into its creator and and |
|
Branch CR31189_3 has been updated forcibly by abv. SHA-1: 1fbb8934b8d48e0fd7e0fd13316f26f286f8bbde |
|
SWIG warnings can be avoided by adding %ignore for methods that return non-wrapped class. Can you do that? (I do not have SWIG configured) As far as I understand, move semantic is supported by all compilers we support except VS 2008, which does not seem to be really important, so can be dropped I suppose (it is 13 years old!). VS 2010 builds fine. "and and" is corrected in updated version of the branch |
|
> SWIG warnings can be avoided by adding %ignore for methods that return non-wrapped class. You may try - I spent half a day with no luck. |
|
>CMake Error at adm/cmake/occt_toolkit.cmake:209 (add_library): > Cannot find source file: > /dn62/builds/CR31189_3-master-KGV/OCCT_SRC/src/Message/Message_StreamBuffer.hxx |
|
Branch CR31189_3 has been updated forcibly by kgv. SHA-1: 01818f15084b967a3c7339d66406abd77f741c5a |
|
http://vm-jenkins-test-12.nnov.opencascade.com:8080/job/CR31189_3-master-KGV-OCCT-Debian80-64-opt-compile/2/parsed_console//src/Message/Message_Messenger.hxx: In constructor ‘Message_Messenger::StreamBuffer::StreamBuffer(const Message_Messenger::StreamBuffer&&)’: /src/Message/Message_Messenger.hxx:81:70: error: use of deleted function ‘std::basic_stringstream<char>::basic_stringstream(const std::basic_stringstream<char>&)’ |
|
Branch CR31189_3 has been updated forcibly by abv. SHA-1: ba7126d64c87208365cce22e16122ed203cfdfe6 |
|
Branch CR31189_3 has been updated forcibly by abv. SHA-1: 0f7af398afb3f05d6d5553587038851be76d29a6 |
|
Branch CR31189_3 has been updated forcibly by abv. SHA-1: 0194f6b198a14ffc002e49ba6a66b9ab5c1681ab |
|
I have refactored implementation to avoid compiler warnings, please review. Jenkins job CR31189_3-master-KGV has mostly completed. Note that passing std::endl to StreamBuffer will send a message and reset to empty state, this shall allow using it in a more transparent and natural way (mostly like ostream). |
|
Please raise the patch in OCCT and OCC Products branches CR31189_3. |
|
Combination - OCCT branch : WEEK-18 master SHA - b40cdc2b5584fdf78f90594a3c7469213c7dc4a6 a206de37fbfa0bf71bd534ae47192bbec23b8522 Products branch : WEEK-18 SHA - f3160246a8ae8356b116065842ce354791652bb4 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: 17165.480000000167 / 17147.810000000212 [+0.10%] Products Total CPU difference: 11271.100000000095 / 11280.480000000087 [-0.08%] Windows-64-VC14: OCCT Total CPU difference: 18654.578125 / 18665.890625 [-0.06%] Products Total CPU difference: 13128.59375 / 13209.109375 [-0.61%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR31189_3 has been deleted by inv. SHA-1: 0194f6b198a14ffc002e49ba6a66b9ab5c1681ab |
|
Branch CR31189_2 has been deleted by inv. SHA-1: 99e8de453210c8da32eb566f50085a6866eb22fd |
|
Branch CR31189_1 has been deleted by inv. SHA-1: 4340d5fb031703d657fe706b976b4c9dfaffe267 |
|
Branch CR31189 has been deleted by inv. SHA-1: dd62701926cfe7906e6dec9cc7e9e3abeac9a5f5 |
occt: master 23fe70ec 2019-11-24 12:02:39 Committer: bugmaster Details Diff |
0031189: Draw Harness, ViewerTest - send messages to Message::DefaultMessenger() Added short-cuts methods in Message_Messenger for sending message with specified gravity, and stream buffer class for using stream-like interface for that. Similar short-cuts to DefaultMessenger() are added in Message package. ViewerTest has been updated to send messages to Message::DefaultMessenger() instead of direct output to std::cout/std::cerr. Off-topic: spelling error (duplicate "and") is corrected in two places Added test bugs fclasses bug31189 |
Affected Issues 0031189 |
|
mod - src/gce/gce_MakeCone.hxx | Diff File | ||
mod - src/Message/Message.hxx | Diff File | ||
mod - src/Message/Message_Messenger.hxx | Diff File | ||
mod - src/OSD/OSD_Parallel.cxx | Diff File | ||
mod - src/QABugs/QABugs_11.cxx | Diff File | ||
mod - src/ViewerTest/ViewerTest.cxx | Diff File | ||
mod - src/ViewerTest/ViewerTest_CmdParser.cxx | Diff File | ||
mod - src/ViewerTest/ViewerTest_ObjectCommands.cxx | Diff File | ||
mod - src/ViewerTest/ViewerTest_OpenGlCommands.cxx | Diff File | ||
mod - src/ViewerTest/ViewerTest_RelationCommands.cxx | Diff File | ||
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx | Diff File | ||
add - tests/bugs/fclasses/bug31189 | Diff File | ||
mod - tests/bugs/vis/bug26035_2 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-11-24 15:01 | kgv | New Issue | |
2019-11-24 15:01 | kgv | Assigned To | => kgv |
2019-11-24 15:04 | git | Note Added: 0089189 | |
2019-11-24 15:04 | kgv | Relationship added | related to 0031188 |
2020-04-15 15:38 | git | Note Added: 0091554 | |
2020-04-15 18:16 | git | Note Added: 0091561 | |
2020-04-15 18:57 | git | Note Added: 0091562 | |
2020-04-15 20:05 | git | Note Added: 0091565 | |
2020-04-15 20:09 | git | Note Added: 0091566 | |
2020-04-15 20:46 | git | Note Added: 0091570 | |
2020-04-15 20:55 | git | Note Added: 0091571 | |
2020-04-15 21:25 | kgv | File Added: draw_old.png | |
2020-04-15 21:25 | kgv | File Added: draw_new.png | |
2020-04-16 00:05 | kgv | Relationship added | related to 0031501 |
2020-04-16 14:31 | kgv | Note Added: 0091593 | |
2020-04-16 14:31 | kgv | Assigned To | kgv => abv |
2020-04-16 14:31 | kgv | Status | new => resolved |
2020-04-29 09:41 | git | Note Added: 0091835 | |
2020-04-29 09:41 |
|
Note Added: 0091836 | |
2020-04-29 09:41 |
|
Assigned To | abv => kgv |
2020-04-29 09:41 |
|
Status | resolved => assigned |
2020-04-29 09:41 |
|
Status | assigned => feedback |
2020-04-29 10:08 | kgv | Note Added: 0091837 | |
2020-04-29 10:09 | kgv | Assigned To | kgv => abv |
2020-04-29 11:21 | git | Note Added: 0091842 | |
2020-04-29 11:21 |
|
Note Added: 0091843 | |
2020-04-29 11:22 |
|
Assigned To | abv => kgv |
2020-04-29 11:22 |
|
Status | feedback => resolved |
2020-04-29 11:29 | kgv | Note Added: 0091845 | |
2020-04-29 13:20 | kgv | Note Added: 0091858 | |
2020-04-29 13:23 | git | Note Added: 0091859 | |
2020-04-29 13:31 | kgv | Note Added: 0091860 | |
2020-04-29 13:31 | kgv | Assigned To | kgv => abv |
2020-04-29 13:31 | kgv | Status | resolved => assigned |
2020-04-29 22:12 | git | Note Added: 0091879 | |
2020-04-30 07:50 |
|
Steps to Reproduce Updated | |
2020-04-30 07:55 | git | Note Added: 0091887 | |
2020-04-30 11:02 | git | Note Added: 0091888 | |
2020-04-30 14:09 |
|
Note Added: 0091898 | |
2020-04-30 14:09 |
|
Assigned To | abv => kgv |
2020-04-30 14:09 |
|
Status | assigned => resolved |
2020-04-30 14:34 | kgv | Note Added: 0091900 | |
2020-04-30 14:34 | kgv | Assigned To | kgv => bugmaster |
2020-04-30 14:34 | kgv | Status | resolved => reviewed |
2020-05-07 10:50 | bugmaster | Note Added: 0091979 | |
2020-05-07 10:50 | bugmaster | Status | reviewed => tested |
2020-05-07 10:55 | bugmaster | Test case number | => bugs/fclasses/bug31189 |
2020-05-10 14:01 | bugmaster | Changeset attached | => occt master 23fe70ec |
2020-05-10 14:01 | bugmaster | Status | tested => verified |
2020-05-10 14:01 | bugmaster | Resolution | open => fixed |
2020-05-10 14:16 | git | Note Added: 0092047 | |
2020-05-10 14:17 | git | Note Added: 0092055 | |
2020-05-10 14:17 | git | Note Added: 0092056 | |
2020-05-10 14:17 | git | Note Added: 0092057 | |
2020-12-02 16:41 |
|
Fixed in Version | => 7.5.0 |
2020-12-02 17:12 |
|
Status | verified => closed |