MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0024487Open CASCADE[OCCT] OCCT:Codingpublic2013-12-20 13:152017-08-03 12:03
Reporterdln 
Assigned Toabv 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 6.7.0 
Target Version[OCCT] 7.0.0Fixed in Version[OCCT] 7.0.0 
Summary0024487: Getting rid of generic CDL classes
DescriptionIn context of planned elimination of WOK and CDL it is necessary to get rid of generic CDL classes in OCCT or at least to minimize their number as possible.

The problem is that generic classes are defined through CDL and instantiated to C++ via macro substitution. Each instantiation is represented by two automatically generated files (hxx and cxx) which define this substitution and #include original code. This will be difficult to track and maintain without WOK.

Other major problem with generic classes is that they are practically not usable in debugging: debugger does not recognize relation between source code and symbols in object code.

The steps to be done are:

1. Build a list of existing generic classes and check where each is used

2. Classes which are not used (and other unused stuff found in the process) to be removed

3. Generic classes used in single place should be converted to plan C++ classes

4. Instantiations of TCollection classes should be replaced by NCollection equivalents

5. Remaining classes should be converted to C++ templates or kept as-is (in any case GXX files should be removed from inc folder)
TagsNo tags attached.
Test case number
Attached Filestxt file icon gxx_used_by.txt (258,130 bytes) 2014-01-22 16:08

- Relationships
parent of 0024545closedbugmaster Open CASCADE Convertation of the generic classes to the non-generic (XmlObjMgt) 
parent of 0024547closedapn Open CASCADE Convertation of the generic classes to the non-generic (math) 
parent of 0024552closedbugmaster Open CASCADE Convertation of the generic classes to the non-generic (BndLib) 
parent of 0023959closedaba Open CASCADE Getting rid of generic classes in Visualization 
parent of 0023997feedbackabv Open CASCADE Getting rid of generic classes in DataExchange 
parent of 0024553closedbugmaster Open CASCADE Deleting obsolete/unused ".gxx" files from "GCPnts" 
parent of 0024742closedabv Open CASCADE Remove rarely used collection classes 
parent of 0024748closedapn Open CASCADE Remove unused instantiations of collection classes 
parent of 0024750closedabv Open CASCADE Replace instantiations of TCollection generic classes by NCollection templates 
parent of 0024778closedapn Open CASCADE Convertation of the generic classes to the non-generic. Part 9 
parent of 0024773closedapn Open CASCADE Convertation of the generic classes to the non-generic. Part 7 
parent of 0024761closedapn Open CASCADE Convertation of the generic classes to the non-generic. Part 5 
parent of 0024763closedapn Open CASCADE Convertation of the generic classes to the non-generic. Part 6 
parent of 0024774closedapn Open CASCADE Convertation of the generic classes to the non-generic. Part 8 
parent of 0024734closedapn Open CASCADE Convertation of the generic classes to the non-generic. Part 4 
parent of 0024683closedapn Open CASCADE Convertation of the generic classes to the non-generic. Part 1 
parent of 0024727closedbugmaster Open CASCADE Convertation of the generic classes to the non-generic. Part 3 
parent of 0024662closedabv Open CASCADE Removing unused "generic" classes. Part 3 
parent of 0024663closedabv Open CASCADE Removing unused "generic" classes. Part 4 
parent of 0024660closedapn Open CASCADE Removing unused "generic" classes. Part 1 
parent of 0024661closedabv Open CASCADE Removing unused "generic" classes. Part 2 
parent of 0024708closedabv Open CASCADE Convertation of the generic classes to the non-generic. Part 2 
parent of 0024859closedabv Open CASCADE Replace SortTools by STL equivalents 
parent of 0026850closedabv Open CASCADE Replace nested instantiations of TCollection generic classes by NCollection templates 
related to 0024866newkgv Open CASCADE Single definition of axis-aligned bounding box should be used across OCCT 
related to 0028966newkgv Community Coding Rules - remove Adaptor2d_HCurve2d, Adaptor3d_HCurve and Adaptor3d_HSurface classes 
child of 0024002closedabv Open CASCADE Overall code and build procedure refactoring 
child of 0024784closedapn Open CASCADE Move documentation in CDL files to proper location 
Not all the children of this issue are yet resolved or closed.

-  Notes
(0027272)
dln (developer)
2013-12-20 13:37

Changes are ready for review in CR24487 branch.
(0027601)
abv (manager)
2014-01-22 15:15

I have redefined this issue as general for dealing with generic classes; particular fixes are to be done within separate issues, children of this one
(0027606)
abv (manager)
2014-01-22 16:16

I have attached file gxx_used_by.txt, which is result of executing the following command on the current master:

> cd inc; ls -1 *.gxx | gawk '{print($1); system("grep " $1 " ../src/*/* ../drv/*/* ../inc/* /dev/null")}' >../gxx

The log thus shows where each of GXX files found in inc folder is used.

The files which are not used anywhere (e.g. AppBlend_Line.gxx) and relevant classes can be removed immediately, I suppose (to be checked: perhaps they are still used indirectly somehow? e.g. pure abstract classes...)

The files used once (such as AppParCurves_Variational.gxx) highlight generic classes which are first candidates for conversion to plain C++ classes.

The files referred from src and/or inc folder (such as GCPnts_AbscissaPoint.gxx) most likely do not correspond to real CDL generic classes but just a way to abuse WOK. They should be analyzed on case-by-case basis.
(0049608)
abv (manager)
2015-12-25 19:29

Considered as fixed with OCCT 7.0 since there are no CDL there. Remains of generic classes will be removed later in the frames of separate issues.
(0054244)
git (administrator)
2016-05-20 12:24

Branch CR24487 has been deleted by inv.

SHA-1: e4131afd2009b2d79a8b204bd27f92a2b0535538

- Issue History
Date Modified Username Field Change
2013-12-20 13:15 dln New Issue
2013-12-20 13:15 dln Assigned To => abv
2013-12-20 13:37 dln Note Added: 0027272
2013-12-26 10:59 abv Status new => resolved
2014-01-04 14:07 abv Note Added: 0027388
2014-01-04 14:07 abv Assigned To abv => dln
2014-01-04 14:07 abv Status resolved => assigned
2014-01-04 14:08 abv Note Edited: 0027388 View Revisions
2014-01-04 14:08 abv Note Edited: 0027388 View Revisions
2014-01-04 14:09 abv Note Edited: 0027388 View Revisions
2014-01-11 11:58 abv Category OCCT Release:BUILD => OCCT:Coding
2014-01-21 11:37 dln Relationship added parent of 0024545
2014-01-21 14:09 dln Relationship added parent of 0024547
2014-01-21 14:55 dln Status assigned => resolved
2014-01-21 14:56 dln Status resolved => assigned
2014-01-22 13:51 dln Relationship added parent of 0024552
2014-01-22 14:12 dln Assigned To dln => abv
2014-01-22 14:12 dln Status assigned => resolved
2014-01-22 14:25 abv Relationship added child of 0024002
2014-01-22 14:27 abv Relationship added parent of 0023959
2014-01-22 14:28 abv Relationship added parent of 0023997
2014-01-22 14:55 dln Relationship added parent of 0024553
2014-01-22 15:13 abv Severity integration request => minor
2014-01-22 15:13 abv OS Windows =>
2014-01-22 15:13 abv OS Version 7 =>
2014-01-22 15:13 abv Platform x64 =>
2014-01-22 15:13 abv Target Version 6.7.1 => 7.0.0
2014-01-22 15:13 abv Summary Convertation of the generic classes to the non-generic and non-cdl (from: math, XmlObjMgt and BndLib) => Convertation of the generic classes to the non-generic and non-cdl
2014-01-22 15:13 abv Description Updated View Revisions
2014-01-22 15:14 abv Note Deleted: 0027388
2014-01-22 15:15 abv Note Added: 0027601
2014-01-22 15:15 abv Assigned To abv => dln
2014-01-22 15:15 abv Status resolved => assigned
2014-01-22 15:33 abv Summary Convertation of the generic classes to the non-generic and non-cdl => Getting rid of generic CDL classes
2014-01-22 16:08 abv File Added: gxx_used_by.txt
2014-01-22 16:16 abv Note Added: 0027606
2014-03-20 13:03 abv Relationship added parent of 0024742
2014-03-21 11:20 abv Relationship added parent of 0024748
2014-03-21 15:37 abv Relationship added parent of 0024750
2014-04-01 16:41 kgv Relationship added child of 0024784
2014-04-10 14:46 kgv Relationship added parent of 0024778
2014-04-10 14:46 kgv Relationship added parent of 0024773
2014-04-10 14:47 kgv Relationship added parent of 0024761
2014-04-10 14:47 kgv Relationship added parent of 0024763
2014-04-10 14:47 kgv Relationship added parent of 0024774
2014-04-10 14:47 kgv Relationship added parent of 0024734
2014-04-10 14:47 kgv Relationship added parent of 0024683
2014-04-10 14:47 kgv Relationship added parent of 0024727
2014-04-10 14:48 kgv Relationship added parent of 0024662
2014-04-10 14:48 kgv Relationship added parent of 0024663
2014-04-10 14:48 kgv Relationship added parent of 0024660
2014-04-10 14:50 kgv Relationship added parent of 0024661
2014-04-10 14:55 kgv Relationship added parent of 0024708
2014-04-18 17:15 abv Relationship added parent of 0024859
2014-04-23 09:17 kgv Relationship added related to 0024866
2015-11-08 08:19 abv Relationship added parent of 0026850
2015-12-25 19:29 abv Note Added: 0049608
2015-12-25 19:29 abv Status assigned => closed
2015-12-25 19:29 abv Assigned To dln => abv
2015-12-25 19:29 abv Resolution open => fixed
2015-12-25 19:29 abv Fixed in Version => 7.0.0
2016-05-20 12:24 git Note Added: 0054244
2017-08-03 12:03 kgv Relationship added related to 0028966


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker