DiscussionsIssue archiveOCCT:Application Framework

Archived issue #0023690

Miscellaneous minor enhancements in OCAF/XDE

CommunityOCCT:Application Frameworkclosed5 public notes

Search issues

Description

A set of a few minor enhancements mainly to positively affect performance. Grouped into commit to reduce integration overhead.

TDF_Label
- constructor made inline

XCAFDoc_Color
- GetColor() to return const&

XCAFDoc_ColorTool
- GetColor() returning a label made static

XCAFDoc_Location
- Get() to return const&

Public activity

5 archived notes

Participants are labeled by their role within this record.

01Author
Pushed into the git repository as branch CR23690

Of course, to benefit from these changes (except TDF_Label) the callers must be respectively updated. Inlining TDF_Label constructors will be used automatically during next compile
02Commenter 2
No remarks, please test
03Commenter 3
Dear Commenter 1,

There are compilation errors on Linux:

http://jenkins-test-01.nnov.opencascade.com/user/mnt/my-views/view/CR23690/job/mnt-CR23690-master_build_occt_linux/2/parsed_console/?

../../../src/XCAFDoc/XCAFDoc_ColorTool.cxx: In static member function
'static Standard_Boolean XCAFDoc_ColorTool::GetColor(const
TopoDS_Shape&, XCAFDoc_ColorType, TDF_Label&)':


../../../src/XCAFDoc/XCAFDoc_ColorTool.cxx:323:
 error: cannot call member function 'const Handle_XCAFDoc_ShapeTool&
 XCAFDoc_ColorTool::ShapeTool()' without object


../../../src/XCAFDoc/XCAFDoc_ColorTool.cxx:324:
 error: cannot call member function 'Standard_Boolean
XCAFDoc_ColorTool::GetColor(const TDF_Label&, XCAFDoc_ColorType,
TDF_Label&)' without object
04Author
Sorry for the trouble.
The fixed XCAFDoc_ColorTool.cdl has been updated in the branch CR23690 (with --force).
The root-cause of the failure - wrong overload has been made static. The correct method is one accepting TDF_Label, not TopoDS_Shape.

I have not caught the issue prior to committing as this .cdl change has not been promoted into my 6.5.4-based dev environment (to minimize API changes) and I do not built the git environment as there are no Visual Studio files. Neither do I use WOK other than for header extraction.
05Commenter 5
Dear Commenter 1,

Branch CR23690 (and products from GIT master) was compiled on Linux and
Windows platforms and tested.

Regressions:
Not detected

Improvements:
Not detected

Testing cases:
Not needed