View Issue Details

IDProjectCategoryView StatusLast Update
0024487Open CASCADEOCCT:Codingpublic2020-12-03 17:32
ReporterdlnAssigned Toabv 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version6.7.0 
Target Version7.0.0Fixed in Version7.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 Files

  • gxx_used_by.txt (258,130 bytes)

Relationships

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

Activities

dln

2013-12-20 13:37

developer   ~0027272

Changes are ready for review in CR24487 branch.

abv

2014-01-22 15:15

manager   ~0027601

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

abv

2014-01-22 16:08

manager  

gxx_used_by.txt (258,130 bytes)

abv

2014-01-22 16:16

manager   ~0027606

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.

abv

2015-12-25 19:29

manager   ~0049608

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.

git

2016-05-20 12:24

administrator   ~0054244

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 Assigned To abv => dln
2014-01-04 14:07 abv Status resolved => assigned
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
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
2019-10-03 12:48 kgv Relationship added related to 0031025
2020-12-03 17:32 kgv Relationship added parent of 0031975