mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +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:
@@ -22,9 +22,8 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <GCE2d_Root.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Geom2d_TrimmedCurve;
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
|
||||
class StdFail_NotDone;
|
||||
class gp_Circ2d;
|
||||
class gp_Pnt2d;
|
||||
@@ -73,30 +72,12 @@ public:
|
||||
//! Returns the constructed arc of circle.
|
||||
//! Exceptions StdFail_NotDone if no arc of circle is constructed.
|
||||
Standard_EXPORT const Handle(Geom2d_TrimmedCurve)& Value() const;
|
||||
operator const Handle(Geom2d_TrimmedCurve)& () const { return Value(); }
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
operator const Handle(Geom2d_TrimmedCurve)& () const { return Value(); }
|
||||
operator const Handle(Geom2d_Curve)& () const { return Value(); }
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(Geom2d_TrimmedCurve) TheArc;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GCE2d_MakeArcOfCircle_HeaderFile
|
||||
|
@@ -22,9 +22,8 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <GCE2d_Root.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Geom2d_TrimmedCurve;
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
|
||||
class StdFail_NotDone;
|
||||
class gp_Elips2d;
|
||||
class gp_Pnt2d;
|
||||
@@ -65,30 +64,12 @@ public:
|
||||
|
||||
//! Returns the constructed arc of ellipse.
|
||||
Standard_EXPORT const Handle(Geom2d_TrimmedCurve)& Value() const;
|
||||
operator const Handle(Geom2d_TrimmedCurve)& () const { return Value(); }
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
operator const Handle(Geom2d_TrimmedCurve)& () const { return Value(); }
|
||||
operator const Handle(Geom2d_Curve)& () const { return Value(); }
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(Geom2d_TrimmedCurve) TheArc;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GCE2d_MakeArcOfEllipse_HeaderFile
|
||||
|
@@ -22,9 +22,8 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <GCE2d_Root.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Geom2d_TrimmedCurve;
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
|
||||
class StdFail_NotDone;
|
||||
class gp_Hypr2d;
|
||||
class gp_Pnt2d;
|
||||
@@ -64,30 +63,12 @@ public:
|
||||
|
||||
//! Returns the constructed arc of hyperbola.
|
||||
Standard_EXPORT const Handle(Geom2d_TrimmedCurve)& Value() const;
|
||||
operator const Handle(Geom2d_TrimmedCurve)& () const { return Value(); }
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
operator const Handle(Geom2d_TrimmedCurve)& () const { return Value(); }
|
||||
operator const Handle(Geom2d_Curve)& () const { return Value(); }
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(Geom2d_TrimmedCurve) TheArc;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GCE2d_MakeArcOfHyperbola_HeaderFile
|
||||
|
@@ -22,9 +22,8 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <GCE2d_Root.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Geom2d_TrimmedCurve;
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
|
||||
class StdFail_NotDone;
|
||||
class gp_Parab2d;
|
||||
class gp_Pnt2d;
|
||||
@@ -64,30 +63,12 @@ public:
|
||||
|
||||
//! Returns the constructed arc of parabola.
|
||||
Standard_EXPORT const Handle(Geom2d_TrimmedCurve)& Value() const;
|
||||
operator const Handle(Geom2d_TrimmedCurve)& () const { return Value(); }
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
operator const Handle(Geom2d_TrimmedCurve)& () const { return Value(); }
|
||||
operator const Handle(Geom2d_Curve)& () const { return Value(); }
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(Geom2d_TrimmedCurve) TheArc;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GCE2d_MakeArcOfParabola_HeaderFile
|
||||
|
@@ -22,9 +22,8 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <GCE2d_Root.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Geom2d_Circle;
|
||||
#include <Geom2d_Circle.hxx>
|
||||
|
||||
class StdFail_NotDone;
|
||||
class gp_Circ2d;
|
||||
class gp_Ax2d;
|
||||
@@ -102,30 +101,12 @@ public:
|
||||
//! Returns the constructed circle.
|
||||
//! Exceptions StdFail_NotDone if no circle is constructed.
|
||||
Standard_EXPORT const Handle(Geom2d_Circle)& Value() const;
|
||||
operator const Handle(Geom2d_Circle)& () const { return Value(); }
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
operator const Handle(Geom2d_Circle)& () const { return Value(); }
|
||||
operator const Handle(Geom2d_Curve)& () const { return Value(); }
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(Geom2d_Circle) TheCircle;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GCE2d_MakeCircle_HeaderFile
|
||||
|
@@ -22,9 +22,8 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <GCE2d_Root.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Geom2d_Ellipse;
|
||||
#include <Geom2d_Ellipse.hxx>
|
||||
|
||||
class StdFail_NotDone;
|
||||
class gp_Elips2d;
|
||||
class gp_Ax2d;
|
||||
@@ -87,30 +86,12 @@ public:
|
||||
//! Returns the constructed ellipse.
|
||||
//! Exceptions StdFail_NotDone if no ellipse is constructed.
|
||||
Standard_EXPORT const Handle(Geom2d_Ellipse)& Value() const;
|
||||
operator const Handle(Geom2d_Ellipse)& () const { return Value(); }
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
operator const Handle(Geom2d_Ellipse)& () const { return Value(); }
|
||||
operator const Handle(Geom2d_Curve)& () const { return Value(); }
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(Geom2d_Ellipse) TheEllipse;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GCE2d_MakeEllipse_HeaderFile
|
||||
|
@@ -22,9 +22,8 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <GCE2d_Root.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Geom2d_Hyperbola;
|
||||
#include <Geom2d_Hyperbola.hxx>
|
||||
|
||||
class StdFail_NotDone;
|
||||
class gp_Hypr2d;
|
||||
class gp_Ax2d;
|
||||
@@ -107,30 +106,12 @@ public:
|
||||
//! Returns the constructed hyperbola.
|
||||
//! Exceptions: StdFail_NotDone if no hyperbola is constructed.
|
||||
Standard_EXPORT const Handle(Geom2d_Hyperbola)& Value() const;
|
||||
operator const Handle(Geom2d_Hyperbola)& () const { return Value(); }
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
operator const Handle(Geom2d_Hyperbola)& () const { return Value(); }
|
||||
operator const Handle(Geom2d_Curve)& () const { return Value(); }
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(Geom2d_Hyperbola) TheHyperbola;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GCE2d_MakeHyperbola_HeaderFile
|
||||
|
@@ -22,8 +22,8 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <GCE2d_Root.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class Geom2d_Line;
|
||||
#include <Geom2d_Line.hxx>
|
||||
|
||||
class StdFail_NotDone;
|
||||
class gp_Ax2d;
|
||||
class gp_Lin2d;
|
||||
@@ -75,30 +75,12 @@ public:
|
||||
//! Returns the constructed line.
|
||||
//! Exceptions StdFail_NotDone if no line is constructed.
|
||||
Standard_EXPORT const Handle(Geom2d_Line)& Value() const;
|
||||
operator const Handle(Geom2d_Line)& () const { return Value(); }
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
operator const Handle(Geom2d_Line)& () const { return Value(); }
|
||||
operator const Handle(Geom2d_Curve)& () const { return Value(); }
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(Geom2d_Line) TheLine;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GCE2d_MakeLine_HeaderFile
|
||||
|
@@ -22,9 +22,8 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <GCE2d_Root.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Geom2d_Parabola;
|
||||
#include <Geom2d_Parabola.hxx>
|
||||
|
||||
class StdFail_NotDone;
|
||||
class gp_Parab2d;
|
||||
class gp_Ax22d;
|
||||
@@ -105,30 +104,12 @@ public:
|
||||
//! Returns the constructed parabola.
|
||||
//! Exceptions StdFail_NotDone if no parabola is constructed.
|
||||
Standard_EXPORT const Handle(Geom2d_Parabola)& Value() const;
|
||||
operator const Handle(Geom2d_Parabola)& () const { return Value(); }
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
operator const Handle(Geom2d_Parabola)& () const { return Value(); }
|
||||
operator const Handle(Geom2d_Curve)& () const { return Value(); }
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(Geom2d_Parabola) TheParabola;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GCE2d_MakeParabola_HeaderFile
|
||||
|
@@ -22,8 +22,8 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <GCE2d_Root.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class Geom2d_TrimmedCurve;
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
|
||||
class StdFail_NotDone;
|
||||
class gp_Pnt2d;
|
||||
class gp_Dir2d;
|
||||
@@ -80,30 +80,12 @@ public:
|
||||
//! Returns the constructed line segment.
|
||||
//! Exceptions StdFail_NotDone if no line segment is constructed.
|
||||
Standard_EXPORT const Handle(Geom2d_TrimmedCurve)& Value() const;
|
||||
operator const Handle(Geom2d_TrimmedCurve)& () const { return Value(); }
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
operator const Handle(Geom2d_TrimmedCurve)& () const { return Value(); }
|
||||
operator const Handle(Geom2d_Curve)& () const { return Value(); }
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(Geom2d_TrimmedCurve) TheSegment;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _GCE2d_MakeSegment_HeaderFile
|
||||
|
Reference in New Issue
Block a user