Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0024753Community[OCCT] OCCT:Codingpublic2014-03-23 03:272020-08-28 14:45
Assigned Tokgv 
PrioritynormalSeverityintegration request 
PlatformWindowsOSVC++ 2012OS Version64 bit
Product Version[OCCT] 6.7.0 
Target Version[OCCT] 7.6.0*Fixed in Version 
Summary0024753: make IntPatch_HInterTool a static class
Descriptionthe class IntPatch_HInterTool has a constructor and only 2 non static methods

Standard_EXPORT Standard_Integer NbSamplePoints(const Handle(Adaptor3d_HSurface)& S) ;
Standard_EXPORT void SamplePoint(const Handle(Adaptor3d_HSurface)& S,const Standard_Integer Index,Standard_Real& U,Standard_Real& V) const;

and only these class variables

Standard_Real uinf;
Standard_Real vinf;
Standard_Real usup;
Standard_Real vsup;

It could be better making all the methods as static, and remove the class variables (making them locals) and the contructor as it's only a Tool class.
TagsNo tags attached.
Test case number
Attached Files

- Relationships

-  Notes
abv (manager)
2014-03-24 08:58

One remark: if we make the class fields static (global) variables, this will break thread safety, as all calls to this class (methods that are now non-static) will use the same data. These fields are not necessary in fact, and can be removed if all methods made static. The values can be obtained directly from the surface.

- Issue History
Date Modified Username Field Change
2014-03-23 03:27 mach22 New Issue
2014-03-23 03:27 mach22 Assigned To => kgv
2014-03-24 08:58 abv Note Added: 0028435
2014-09-12 14:37 abv Target Version => 7.1.0
2016-11-01 06:41 abv Target Version 7.1.0 => 7.2.0
2017-07-20 11:39 kgv Target Version 7.2.0 => 7.4.0
2019-07-10 19:27 abv Target Version 7.4.0 => 7.5.0
2020-08-28 14:45 kgv Target Version 7.5.0 => 7.6.0*

Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker