1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0024816: Tool for upgrading OCCT and dependent code

A new script adm/upgrade.tcl defines a Tcl procedure occt_upgrade, to be used for upgrading code of OCCT and applications for changes introduced by OCCT 7.0.
Batch script upgrade.bat is provided for convenience.
File upgrade.dat contains data (lists of classes) required for some upgrade steps.
Details on upgrade procedure are put in dox/dev_guides/upgrade/upgrade.md.

OCCT code corrected to improve compatibility with code based on previous versions of OCCT:
- Added conversion operator of handle to bool, for use in conditional expressions.
- Forward declaration of argument class restored in macro DEFINE_STANDARD_HANDLE.
- Includes of used classes added in some headers to avoid problem of missing includes in dependent code
- Type cast operators to base curve and surface added in GC and GCE2d classes to reduce porting issues.

Added test for local reference to handle initialized by temporary handle to derived class.

WOK and CDL User Guides removed.
This commit is contained in:
abv
2015-08-19 18:51:52 +03:00
parent 39bff09c9f
commit d1a67b9d1b
84 changed files with 2902 additions and 5856 deletions

View File

@@ -21,13 +21,10 @@
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
#include <GeomAbs_Shape.hxx>
#include <Standard_Integer.hxx>
class Geom2d_BSplineCurve;
class Adaptor2d_HCurve2d;
#include <Geom2d_BSplineCurve.hxx>
class Adaptor2d_HCurve2d;
//! Makes an approximation for HCurve2d from Adaptor3d
class Approx_Curve2d
@@ -49,32 +46,14 @@ public:
Standard_EXPORT Standard_Real MaxError2dV() const;
protected:
private:
Handle(Geom2d_BSplineCurve) myCurve;
Standard_Boolean myIsDone;
Standard_Boolean myHasResult;
Standard_Real myMaxError2dU;
Standard_Real myMaxError2dV;
};
#endif // _Approx_Curve2d_HeaderFile

View File

@@ -21,18 +21,11 @@
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
#include <GeomAbs_Shape.hxx>
#include <Standard_Integer.hxx>
#include <Standard_OStream.hxx>
class Geom_BSplineCurve;
class Standard_OutOfRange;
class Standard_ConstructionError;
#include <Geom_BSplineCurve.hxx>
class Adaptor3d_HCurve;
class Approx_Curve3d
{
public:
@@ -62,31 +55,13 @@ public:
//! Print on the stream o information about the object
Standard_EXPORT void Dump (Standard_OStream& o) const;
protected:
private:
Standard_Boolean myIsDone;
Standard_Boolean myHasResult;
Handle(Geom_BSplineCurve) myBSplCurve;
Standard_Real myMaxError;
};
#endif // _Approx_Curve3d_HeaderFile