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:
@@ -87,6 +87,7 @@ static Standard_Integer QAHandleOps (Draw_Interpretor& theDI,
|
||||
CHECK(theDI, cpLine == aLine, "equality of const pointer and handle");
|
||||
CHECK(theDI, &rLine == aLine, "equality of reference and handle");
|
||||
CHECK(theDI, &crLine == aLine, "equality of reference and handle");
|
||||
CHECK(theDI, aLine, "cast to bool");
|
||||
|
||||
Handle(Geom_Line) aLin2;
|
||||
CHECK(theDI, aLine != aLin2, "inequality of handle to the same type handle");
|
||||
@@ -120,10 +121,13 @@ static Standard_Integer QAHandleOps (Draw_Interpretor& theDI,
|
||||
// currently allowed for compatibility
|
||||
gunc (aLine);
|
||||
Handle(Geom_Curve)& aCurve2 = aLine; // cast to base non-const ref
|
||||
(void)aCurve2;
|
||||
|
||||
Handle(Geom_Line) qLine = cpLine; // constructor from const pointer -- could be made explicit...
|
||||
|
||||
// check whether compiler will destroy reference to temporary handle
|
||||
Handle(Geom_Curve)& aTmpRef (Handle(Geom_Line)::DownCast (aCurve2));
|
||||
CHECK(theDI, ! aTmpRef.IsNull(), "local reference of handle to base type to temporary handle object");
|
||||
|
||||
Handle(Geom_Surface) aSurf;
|
||||
(void)aSurf;
|
||||
|
||||
|
Reference in New Issue
Block a user