Archived issue #0023997
Getting rid of generic classes in DataExchange
Description
As one of steps related to WOK removal, it is necessary to revise generic CDL classes and turn them into non-CDL C++ classes.
As part of this step it is supposed to get rid of generic classes in DataExchange packages.
If a class is used only once, it should become a regular C++ class. If a class is re-used in several places, the option to make it a C++ template should be considered.
As part of this step it is supposed to get rid of generic classes in DataExchange packages.
If a class is used only once, it should become a regular C++ class. If a class is re-used in several places, the option to make it a C++ template should be considered.
Public activity
12 archived notes
Participants are labeled by their role within this record.
The git branch CR23997 is ready for reviewing.
All made changes description is in attached Attachment 1 (DOC) document.
Dear gka, please review.
All made changes description is in attached Attachment 1 (DOC) document.
Dear gka, please review.
Seems it will be better to make class LibCtl_Library not template class but base class in order to avoid code duplication of method SetGlobal() at all instantiations of this class.
The git branch CR23997 was updated:
1) The LibCtl_Library class stayed template one, but the variable that was responsible for global list of modules was wrapped with static method.
2) There were some style changes
Dear gka, please review.
1) The LibCtl_Library class stayed template one, but the variable that was responsible for global list of modules was wrapped with static method.
2) There were some style changes
Dear gka, please review.
Branch CR23997 is ready to be tested.
Errors during extraction:
Error : "/misc/dn61/LocalWOK/wok_entities/LOC/dev/CR23997-master-products/src/SatControl/SatControl_Reader.cdl", line 24: Class : XSControl_Reader must not be a normal class.
Error : "/misc/dn61/LocalWOK/wok_entities/LOC/dev/CR23997-master-products/src/SatControl/SatControl_ActorRead.cdl", line 27: Class : Transfer_ActorOfTransientProcess must not be a normal class.
Error : "/misc/dn61/LocalWOK/wok_entities/LOC/dev/CR23997-master-products/src/DxfControl/DxfControl_Reader.cdl", line 23: Class : XSControl_Reader must not be a normal class.
Error : "/misc/dn61/LocalWOK/wok_entities/LOC/dev/CR23997-master-products/src/DxfControl/DxfControl_ActorRead.cdl", line 27: Class : Transfer_ActorOfTransientProcess must not be a normal class.
Error : "/misc/dn61/LocalWOK/wok_entities/LOC/dev/CR23997-master-products/src/XtControl/XtControl_Reader.cdl", line 22: Class : XSControl_Reader must not be a normal class.
Error : "/misc/dn61/LocalWOK/wok_entities/LOC/dev/CR23997-master-products/src/XtControl/XtControl_ActorRead.cdl", line 20: Class : Transfer_ActorOfTransientProcess must not be a normal class.
Error : "/misc/dn61/LocalWOK/wok_entities/LOC/dev/CR23997-master-products/src/SatControl/SatControl_Reader.cdl", line 24: Class : XSControl_Reader must not be a normal class.
Error : "/misc/dn61/LocalWOK/wok_entities/LOC/dev/CR23997-master-products/src/SatControl/SatControl_ActorRead.cdl", line 27: Class : Transfer_ActorOfTransientProcess must not be a normal class.
Error : "/misc/dn61/LocalWOK/wok_entities/LOC/dev/CR23997-master-products/src/DxfControl/DxfControl_Reader.cdl", line 23: Class : XSControl_Reader must not be a normal class.
Error : "/misc/dn61/LocalWOK/wok_entities/LOC/dev/CR23997-master-products/src/DxfControl/DxfControl_ActorRead.cdl", line 27: Class : Transfer_ActorOfTransientProcess must not be a normal class.
Error : "/misc/dn61/LocalWOK/wok_entities/LOC/dev/CR23997-master-products/src/XtControl/XtControl_Reader.cdl", line 22: Class : XSControl_Reader must not be a normal class.
Error : "/misc/dn61/LocalWOK/wok_entities/LOC/dev/CR23997-master-products/src/XtControl/XtControl_ActorRead.cdl", line 20: Class : Transfer_ActorOfTransientProcess must not be a normal class.
The git branch CR23997 was created in the OCCT Products repository for changes in Products according to the patch for OCCT.
Classes from SatControl, SATCAFControl, XtControl, XTCAFControl, DxfControl, DXFCAFControl were made non-cdl ones.
Dear gka, please review.
Classes from SatControl, SATCAFControl, XtControl, XTCAFControl, DxfControl, DXFCAFControl were made non-cdl ones.
Dear gka, please review.
Branch CR23997 is ready to be tested
There are compilation errors:
http://jenkins-test-02.nnov.opencascade.com:8080/user/mnt/my-views/view/CR23997/job/mnt-CR23997-CR23997_build_occt_linux/1/parsed_console/?
../../../../inc/LibCtl_Library.hxx:34: error: declaration of ‘typedef struct LibCtl_GlobalNode<ModuleType, ProtocolType> LibCtl_Node<ModuleType, ProtocolType>::LibCtl_GlobalNode’
../../../../inc/LibCtl_Library.hxx:26: error: changes meaning of ‘LibCtl_GlobalNode’ from ‘struct LibCtl_GlobalNode<ModuleType, ProtocolType>’
../../../../inc/LibCtl_Library.hxx:186: error: declaration of ‘typedef class LibCtl_GlobalNode<ModuleType, ProtocolType> LibCtl_Library<ObjectType, ModuleType, ProtocolType>::LibCtl_GlobalNode’
../../../../inc/LibCtl_Library.hxx:98: error: changes meaning of ‘LibCtl_GlobalNode’ from ‘class LibCtl_GlobalNode<ModuleType, ProtocolType>’
../../../../inc/LibCtl_Library.hxx:187: error: declaration of ‘typedef class LibCtl_Node<ModuleType, ProtocolType> LibCtl_Library<ObjectType, ModuleType, ProtocolType>::LibCtl_Node’
../../../../inc/LibCtl_Library.hxx:32: error: changes meaning of ‘LibCtl_Node’ from ‘class LibCtl_Node<ModuleType, ProtocolType>’
../../../../inc/LibCtl_Library.hxx:328: error: extra qualification ‘LibCtl_Library<ObjectType, ModuleType, ProtocolType>::’ on member ‘Next’
../../../../inc/LibCtl_Library.hxx:328: error: explicit specialization of ‘void LibCtl_Library<ObjectType, ModuleType, ProtocolType>::Next()’ must be introduced by ‘template <>’
http://jenkins-test-02.nnov.opencascade.com:8080/user/mnt/my-views/view/CR23997/job/mnt-CR23997-CR23997_build_occt_linux/1/parsed_console/?
../../../../inc/LibCtl_Library.hxx:34: error: declaration of ‘typedef struct LibCtl_GlobalNode<ModuleType, ProtocolType> LibCtl_Node<ModuleType, ProtocolType>::LibCtl_GlobalNode’
../../../../inc/LibCtl_Library.hxx:26: error: changes meaning of ‘LibCtl_GlobalNode’ from ‘struct LibCtl_GlobalNode<ModuleType, ProtocolType>’
../../../../inc/LibCtl_Library.hxx:186: error: declaration of ‘typedef class LibCtl_GlobalNode<ModuleType, ProtocolType> LibCtl_Library<ObjectType, ModuleType, ProtocolType>::LibCtl_GlobalNode’
../../../../inc/LibCtl_Library.hxx:98: error: changes meaning of ‘LibCtl_GlobalNode’ from ‘class LibCtl_GlobalNode<ModuleType, ProtocolType>’
../../../../inc/LibCtl_Library.hxx:187: error: declaration of ‘typedef class LibCtl_Node<ModuleType, ProtocolType> LibCtl_Library<ObjectType, ModuleType, ProtocolType>::LibCtl_Node’
../../../../inc/LibCtl_Library.hxx:32: error: changes meaning of ‘LibCtl_Node’ from ‘class LibCtl_Node<ModuleType, ProtocolType>’
../../../../inc/LibCtl_Library.hxx:328: error: extra qualification ‘LibCtl_Library<ObjectType, ModuleType, ProtocolType>::’ on member ‘Next’
../../../../inc/LibCtl_Library.hxx:328: error: explicit specialization of ‘void LibCtl_Library<ObjectType, ModuleType, ProtocolType>::Next()’ must be introduced by ‘template <>’
Errors were corrected.
Dear gka, please review.
Dear gka, please review.
Branch CR23997 is ready to be tested
Dear Commenter 1,
Branch CR23997 and products from CR23997 was compiled on Linux and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component :
Linux: 918 (923 on master)
Windows: 853 (852 on master)
New warning on Windows: inc/Transfer_TransferProcess.hxx
Transfer_TransferProcess.hxx:2161, MSBuild, Priority: Normal
'toCompute' : unreferenced formal parameter
products component :
Linux: 188 (188 on master)
Windows: 287 (287 on master)
Regressions:
bugs iges buc60625 buc60646
http://occt-tests/CR23997-CR23997-occt/Debian60-64/summary.html
http://occt-tests/CR23997-CR23997-occt/Windows-32-VC9/summary.html
Improvements:
No improvements
Testing cases:
Not needed
Testing on Linux:
Total MEMORY difference: 366216612 / 365981272
Total CPU difference: 42598.27000000113 / 42530.400000000824
Testing on Windows:
Total MEMORY difference: 425817088 / 425949776
Total CPU difference: 43946.546875 / 30358.84375
There are not differences in images found by testdiff.
Branch CR23997 and products from CR23997 was compiled on Linux and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component :
Linux: 918 (923 on master)
Windows: 853 (852 on master)
New warning on Windows: inc/Transfer_TransferProcess.hxx
Transfer_TransferProcess.hxx:2161, MSBuild, Priority: Normal
'toCompute' : unreferenced formal parameter
products component :
Linux: 188 (188 on master)
Windows: 287 (287 on master)
Regressions:
bugs iges buc60625 buc60646
http://occt-tests/CR23997-CR23997-occt/Debian60-64/summary.html
http://occt-tests/CR23997-CR23997-occt/Windows-32-VC9/summary.html
Improvements:
No improvements
Testing cases:
Not needed
Testing on Linux:
Total MEMORY difference: 366216612 / 365981272
Total CPU difference: 42598.27000000113 / 42530.400000000824
Testing on Windows:
Total MEMORY difference: 425817088 / 425949776
Total CPU difference: 43946.546875 / 30358.84375
There are not differences in images found by testdiff.
Dear aba.
Please check current state.
Please check current state.
Related records