Archived issue #0023690
Miscellaneous minor enhancements in OCAF/XDE
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&
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.
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
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
No remarks, please test
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
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
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.
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.
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
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