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

@@ -33,6 +33,7 @@
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
#include <Standard_OStream.hxx>
class IGESData_IGESModel;
class Interface_InterfaceMismatch;
class Interface_FloatWriter;
@@ -43,7 +44,6 @@ class TCollection_HAsciiString;
class gp_XY;
class gp_XYZ;
//! manages atomic file writing, under control of IGESModel :
//! prepare text to be sent then sends it
//! takes into account distinction between successive Sections
@@ -147,7 +147,15 @@ public:
//! If <val> is Null, "0" will be sent
//! If <negative> is True, "Pointer" is sent as negative
Standard_EXPORT void Send (const Handle(IGESData_IGESEntity)& val, const Standard_Boolean negative = Standard_False);
template <class T> void Send (const Handle(T)& val, Standard_Boolean negative = Standard_False, typename std::enable_if<std::is_base_of<IGESData_IGESEntity, T>::value>::type * = 0) { Send ((const Handle(IGESData_IGESEntity)&)val, negative); }
//! Helper method to avoid ambiguity of calls to above methods Send() for
//! classes derived from IGESData_IGESEntity, for VC++ 10 and 11 compillers
template <class T>
void Send (const Handle(T)& val, Standard_Boolean negative = Standard_False,
typename std::enable_if<std::is_base_of<IGESData_IGESEntity, T>::value>::type * = 0)
{
Send ((const Handle(IGESData_IGESEntity)&)val, negative);
}
//! sends a parameter under its exact form given as a string
Standard_EXPORT void SendString (const Handle(TCollection_HAsciiString)& val);
@@ -170,17 +178,7 @@ template <class T> void Send (const Handle(T)& val, Standard_Boolean negative =
//! Takes WriteMode into account
Standard_EXPORT Standard_Boolean Print (Standard_OStream& S) const;
protected:
private:
//! Basic action of adding a string to current parameter list as a
//! line; manages size limit (64 or 72 according Sestion G or P)
@@ -203,6 +201,8 @@ private:
Standard_EXPORT void AddChar (const Standard_Character val, const Standard_Integer more = 0);
private:
Handle(IGESData_IGESModel) themodel;
Handle(TColStd_HSequenceOfHAsciiString) thestar;
Handle(TColStd_HSequenceOfHAsciiString) thehead;
@@ -216,14 +216,6 @@ private:
Interface_LineBuffer thecurr;
Standard_Integer themodew;
Interface_FloatWriter thefloatw;
};
#endif // _IGESData_IGESWriter_HeaderFile