View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0033490 | Open CASCADE | OCCT:Data Exchange | public | 2023-09-22 18:40 | 2023-09-26 18:59 |
Reporter | oan | Assigned To | dpasukhi | ||
Priority | normal | Severity | minor | ||
Status | new | Resolution | open | ||
Target Version | 7.7.2 | ||||
Summary | 0033490: Data Exchange - eliminate code duplication in XCAFDoc_ViewTool | ||||
Description | XCAFDoc_ViewTool contains code duplication in several places: All three XCAFDoc_ViewTool::SetView() methods could be simplified to the ones just extending functionality of previous, more general, one: 1) implements functionality for aChGNode, aShapeGNode and aShapeGNode; 2) calls 1) and implements additional functionality for aPlaneGNode; 3) calls 2) and implements additional functionality for aNoteGNode, aAnnotGNode. Methods GetRefShapeLabel(), GetRefGDTLabel(), GetRefClippingPlaneLabel(), GetRefNoteLabel() and GetRefAnnotationLabel() can be replaced by a single private implementation with attribute GUID passed as a parameter. The same is for GetViewLabelsForShape(), GetViewLabelsForGDT(), GetViewLabelsForClippingPlane(), GetViewLabelsForNote() and GetViewLabelsForAnnotation() methods. These changes will reduce amount of code of XCAFDoc_ViewTool class three times and simplify further debugging avoiding necessity to make the same change in three or more different places. | ||||
Tags | No tags attached. | ||||
Test case number | |||||