0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- manual
authorabv <abv@opencascade.com>
Mon, 30 Nov 2015 04:49:48 +0000 (07:49 +0300)
committerabv <abv@opencascade.com>
Fri, 4 Dec 2015 10:57:58 +0000 (13:57 +0300)
commitf5f4ebd07ba84e9a1db91b1bf202b1b45cc7516c
treedb70e6c0824d15c1f62b8511189a2af7f21e9e4b
parent6595eee7961e8f6b154b6befdbd53a2bf378ae0b
0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- manual

Restored possibility to have out-of-line implementation of DynamicCast() and STANDART_TYPE():
- Macro STANDARD_TYPE() now resolves to function get_type_descriptor() of the class
- Macro DEFINE_STANDARD_RTTI is replaced by two variants:
  - DEFINE_STANDARD_RTTI_INLINE works as before, defining DynamicCast() and get_type_descriptor() as inline functions
  - DEFINE_STANDARD_RTTIEXT declares DynamicCast() and get_type_descriptor() as exported
- Macro IMPLEMENT_STANDARD_RTTIEXT provides definition of DynamicCast() and get_type_descriptor() for a class

Upgrade script amended to replace DEFINE_STANDARD_RTTI by pair of DEFINE_STANDARD_RTTIEXT / IMPLEMENT_STANDARD_RTTIEXT if source file with the same name as header is found in the same folder, and by DEFINE_STANDARD_RTTI_INLINE if either source is not found or class is defined in the source (i.e. not in header)

Upgrade tool improved to recognize include statements with path prefix, like #include <occt/gp_Pnt.hxx>
Code corrected to eliminate warnings reported by upgrade tool.
Template of CXX file for testing upgrade tool added.

Documentation of upgrade procedure updated.
23 files changed:
adm/upgrade.tcl
adm/upgrade_sample_orig.dat [new file with mode: 0644]
dox/dev_guides/upgrade/upgrade.md
src/Cocoa/Cocoa_Window.hxx
src/Cocoa/Cocoa_Window.mm
src/Geom/Geom_OffsetCurve.cxx
src/Geom2d/Geom2d_OffsetCurve.cxx
src/Image/Image_AlienPixMap.cxx
src/MAT2d/MAT2d_Circuit.cxx
src/OpenGl/OpenGl_Context.cxx
src/QANCollection/QANCollection_Handle.cxx
src/Standard/Standard_DefineHandle.hxx
src/Standard/Standard_Transient.cxx
src/Standard/Standard_Transient.hxx
src/Standard/Standard_Type.cxx
src/Standard/Standard_Type.hxx
src/StepDimTol/StepDimTol_RunoutZoneDefinition.cxx
src/StepDimTol/StepDimTol_RunoutZoneDefinition.hxx
src/TDF/TDF_ClosureTool.cxx
src/TDF/TDF_CopyTool.cxx
src/WNT/WNT_Window.cxx
src/XmlMXCAFDoc/XmlMXCAFDoc_LocationDriver.cxx
src/Xw/Xw_Window.cxx