0027111: Add generalized copy constructor in handle class for old compilers
authorabv <abv@opencascade.com>
Sat, 6 Feb 2016 12:26:26 +0000 (15:26 +0300)
committerabv <abv@opencascade.com>
Sat, 20 Feb 2016 07:10:12 +0000 (10:10 +0300)
commit4796758e8dd2c666e54377fd5ac7f514d1c7282e
treed450df2d5d95d920f975f1f1a7c2fd4f88d00fdc
parentaa00364da7f3f2c7d01a6c086dfd3dee4cd60182
0027111: Add generalized copy constructor in handle class for old compilers

Copy constructor and assignment operator from handle of derived type is added in handle class.
They are enabled only if macro OCC_HANDLE_NOCASTS is defined, and operators of cast of handle to reference to handle to base type are disabled in that case.

Useless type casts to handle to base type are removed in GC and GCE2d classes.
Code returning reference to handle from function is corrected to return it either by value or as reference to handle of actual type.
44 files changed:
dox/dev_guides/upgrade/upgrade.md
src/AIS/AIS_LocalContext_1.cxx
src/BinDrivers/BinDrivers.cxx
src/BinLDrivers/BinLDrivers.cxx
src/BinTObjDrivers/BinTObjDrivers.cxx
src/BinXCAFDrivers/BinXCAFDrivers.cxx
src/FWOSDriver/FWOSDriver.cxx
src/GC/GC_MakeArcOfCircle.hxx
src/GC/GC_MakeArcOfEllipse.hxx
src/GC/GC_MakeArcOfHyperbola.hxx
src/GC/GC_MakeArcOfParabola.hxx
src/GC/GC_MakeCircle.hxx
src/GC/GC_MakeConicalSurface.hxx
src/GC/GC_MakeCylindricalSurface.hxx
src/GC/GC_MakeEllipse.hxx
src/GC/GC_MakeHyperbola.hxx
src/GC/GC_MakeLine.hxx
src/GC/GC_MakePlane.hxx
src/GC/GC_MakeSegment.hxx
src/GC/GC_MakeTrimmedCone.hxx
src/GC/GC_MakeTrimmedCylinder.hxx
src/GCE2d/GCE2d_MakeArcOfCircle.hxx
src/GCE2d/GCE2d_MakeArcOfEllipse.hxx
src/GCE2d/GCE2d_MakeArcOfHyperbola.hxx
src/GCE2d/GCE2d_MakeArcOfParabola.hxx
src/GCE2d/GCE2d_MakeCircle.hxx
src/GCE2d/GCE2d_MakeEllipse.hxx
src/GCE2d/GCE2d_MakeHyperbola.hxx
src/GCE2d/GCE2d_MakeLine.hxx
src/GCE2d/GCE2d_MakeParabola.hxx
src/GCE2d/GCE2d_MakeSegment.hxx
src/OpenGl/OpenGl_Context.cxx
src/PrsMgr/PrsMgr_Presentation.cxx
src/PrsMgr/PrsMgr_Presentation.hxx
src/Standard/Standard_Handle.hxx
src/TopOpeBRepBuild/TopOpeBRepBuild_LoopSet.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_LoopSet.hxx
src/TopOpeBRepBuild/TopOpeBRepBuild_PaveSet.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_PaveSet.hxx
src/XSControl/XSControl_Controller.cxx
src/XmlDrivers/XmlDrivers.cxx
src/XmlLDrivers/XmlLDrivers.cxx
src/XmlTObjDrivers/XmlTObjDrivers.cxx
src/XmlXCAFDrivers/XmlXCAFDrivers.cxx