diff --git a/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_ActorWrite.cxx b/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_ActorWrite.cxx index b42b00a8..43cebb55 100644 --- a/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_ActorWrite.cxx +++ b/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_ActorWrite.cxx @@ -17,6 +17,9 @@ #include IMPLEMENT_STANDARD_RTTIEXT(STEPCAFControl_ActorWrite, STEPControl_ActorWrite) +// OCJS_PATCH_NOEXCEPT_DTOR: explicit noexcept destructor eliminates EH landing pads +STEPCAFControl_ActorWrite::~STEPCAFControl_ActorWrite() noexcept = default; + //================================================================================================= diff --git a/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_ActorWrite.hxx b/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_ActorWrite.hxx index c7a5f473..a3a00dfb 100644 --- a/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_ActorWrite.hxx +++ b/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_ActorWrite.hxx @@ -33,6 +33,8 @@ class STEPCAFControl_ActorWrite : public STEPControl_ActorWrite public: Standard_EXPORT STEPCAFControl_ActorWrite(); + Standard_EXPORT ~STEPCAFControl_ActorWrite() noexcept; // OCJS_PATCH_NOEXCEPT_DTOR + //! Check whether shape S is assembly //! Returns True if shape is registered in assemblies map Standard_EXPORT bool IsAssembly(const occ::handle& theModel, diff --git a/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Controller.cxx b/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Controller.cxx index eb40cd4e..cadbebd0 100644 --- a/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Controller.cxx +++ b/src/DataExchange/TKDESTEP/STEPCAFControl/STEPCAFControl_Controller.cxx @@ -21,7 +21,30 @@ #include -IMPLEMENT_STANDARD_RTTIEXT(STEPCAFControl_Controller, STEPControl_Controller) +// OCJS_STEPCAF_RTTI_PATCH_MARKER: explicit RTTI replaces IMPLEMENT_STANDARD_RTTIEXT (see src/patches/patch_stepcaf_dyntype.py) +OCCT_CHECK_BASE_CLASS(STEPCAFControl_Controller, STEPControl_Controller) +namespace +{ +const occ::handle& steocaf_control_controller_type_descriptor() +{ + static const occ::handle THE_TYPE_INSTANCE = + Standard_Type::Register(typeid(STEPCAFControl_Controller), + STEPCAFControl_Controller::get_type_name(), + sizeof(STEPCAFControl_Controller), + STEPControl_Controller::get_type_descriptor()); + return THE_TYPE_INSTANCE; +} +} // namespace + +const occ::handle& STEPCAFControl_Controller::get_type_descriptor() +{ + return steocaf_control_controller_type_descriptor(); +} + +const occ::handle& STEPCAFControl_Controller::DynamicType() const +{ + return steocaf_control_controller_type_descriptor(); +} //================================================================================================= diff --git a/src/FoundationClasses/TKernel/Resource/Resource_Manager.cxx b/src/FoundationClasses/TKernel/Resource/Resource_Manager.cxx index 06ee6c0a..6b7d84ad 100644 --- a/src/FoundationClasses/TKernel/Resource/Resource_Manager.cxx +++ b/src/FoundationClasses/TKernel/Resource/Resource_Manager.cxx @@ -34,6 +34,9 @@ #include IMPLEMENT_STANDARD_RTTIEXT(Resource_Manager, Standard_Transient) +// OCJS_PATCH_NOEXCEPT_DTOR: explicit noexcept destructor eliminates EH landing pads +Resource_Manager::~Resource_Manager() noexcept = default; + //! Auxiliary enumeration for function WhatKindOfLine(). enum Resource_KindOfLine diff --git a/src/FoundationClasses/TKernel/Resource/Resource_Manager.hxx b/src/FoundationClasses/TKernel/Resource/Resource_Manager.hxx index 08fe9f24..dc4ed6f4 100644 --- a/src/FoundationClasses/TKernel/Resource/Resource_Manager.hxx +++ b/src/FoundationClasses/TKernel/Resource/Resource_Manager.hxx @@ -51,6 +51,8 @@ public: //! Create an empty Resource manager Standard_EXPORT Resource_Manager(); + Standard_EXPORT ~Resource_Manager() noexcept; // OCJS_PATCH_NOEXCEPT_DTOR + //! Create a Resource manager. //! @param[in] theName description file name //! @param[in] theDefaultsDirectory default folder for looking description file diff --git a/src/FoundationClasses/TKernel/Standard/Standard_Dump.hxx b/src/FoundationClasses/TKernel/Standard/Standard_Dump.hxx index 364b1cef..be8bf8b7 100644 --- a/src/FoundationClasses/TKernel/Standard/Standard_Dump.hxx +++ b/src/FoundationClasses/TKernel/Standard/Standard_Dump.hxx @@ -61,6 +61,28 @@ //! line feed. To have output in a more readable way, use ConvertToAlignedString method for obtained //! stream. +#ifdef OCCT_NO_DUMP +#define OCCT_CLASS_NAME(theClass) "" +#define OCCT_DUMP_CLASS_BEGIN(theOStream, theField) { } +#define OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream) { } +#define OCCT_DUMP_FIELD_VALUE_NUMERICAL(theOStream, theField) { } +#define OCCT_DUMP_FIELD_VALUE_NUMERICAL_INC(theOStream, theField, theIncName) { } +#define OCCT_INIT_FIELD_VALUE_REAL(theOStream, theStreamPos, theField) { } +#define OCCT_INIT_FIELD_VALUE_INTEGER(theOStream, theStreamPos, theField) { } +#define OCCT_DUMP_FIELD_VALUE_STRING(theOStream, theField) { } +#define OCCT_DUMP_FIELD_VALUE_POINTER(theOStream, theField) { } +#define OCCT_DUMP_FIELD_VALUE_GUID(theOStream, theField) { } +#define OCCT_DUMP_FIELD_VALUES_DUMPED(theOStream, theDepth, theField) { } +#define OCCT_DUMP_FIELD_VALUES_DUMPED_INC(theOStream, theDepth, theField, theIncName) { } +#define OCCT_INIT_FIELD_VALUES_DUMPED(theSStream, theStreamPos, theField) { } +#define OCCT_DUMP_STREAM_VALUE_DUMPED(theOStream, theField) { } +#define OCCT_DUMP_FIELD_VALUES_NUMERICAL(theOStream, theName, theCount, ...) { } +#define OCCT_DUMP_FIELD_VALUES_STRING(theOStream, theName, theCount, ...) { } +#define OCCT_DUMP_BASE_CLASS(theOStream, theDepth, theField) { } +#define OCCT_DUMP_VECTOR_CLASS(theOStream, theName, theCount, ...) { } +#define OCCT_INIT_VECTOR_CLASS(theOStream, theName, theStreamPos, theCount, ...) { } +#else /* !OCCT_NO_DUMP */ + //! Converts the class type into a string value #define OCCT_CLASS_NAME(theClass) #theClass @@ -292,6 +314,8 @@ theStreamPos = aStreamPos; \ } +#endif /* !OCCT_NO_DUMP */ + //! Kind of key in Json string enum Standard_JsonKey { diff --git a/src/ModelingAlgorithms/TKBO/BOPAlgo/BOPAlgo_CheckerSI_1.cxx b/src/ModelingAlgorithms/TKBO/BOPAlgo/BOPAlgo_CheckerSI_1.cxx index 09e97a4c..0572129a 100644 --- a/src/ModelingAlgorithms/TKBO/BOPAlgo/BOPAlgo_CheckerSI_1.cxx +++ b/src/ModelingAlgorithms/TKBO/BOPAlgo/BOPAlgo_CheckerSI_1.cxx @@ -138,7 +138,7 @@ public: myHasInterf(false), myDS(nullptr) {}; // - virtual ~BOPAlgo_ShapeSolid() = default; + virtual ~BOPAlgo_ShapeSolid() noexcept = default; // OCJS_PATCH_NOEXCEPT_DTOR // void SetIndices(const int nE, const int nZ) diff --git a/src/ModelingAlgorithms/TKBO/BRepAlgoAPI/BRepAlgoAPI_Algo.hxx b/src/ModelingAlgorithms/TKBO/BRepAlgoAPI/BRepAlgoAPI_Algo.hxx index 4a5b4382..0955067b 100644 --- a/src/ModelingAlgorithms/TKBO/BRepAlgoAPI/BRepAlgoAPI_Algo.hxx +++ b/src/ModelingAlgorithms/TKBO/BRepAlgoAPI/BRepAlgoAPI_Algo.hxx @@ -38,20 +38,21 @@ public: // Provide access to methods of protected base class BOPAlgo_Options // (inherited as protected to avoid problems with SWIG wrapper) - using BOPAlgo_Options::Clear; - using BOPAlgo_Options::ClearWarnings; - using BOPAlgo_Options::DumpErrors; - using BOPAlgo_Options::DumpWarnings; - using BOPAlgo_Options::FuzzyValue; - using BOPAlgo_Options::GetReport; - using BOPAlgo_Options::HasError; - using BOPAlgo_Options::HasErrors; - using BOPAlgo_Options::HasWarning; - using BOPAlgo_Options::HasWarnings; - using BOPAlgo_Options::RunParallel; - using BOPAlgo_Options::SetFuzzyValue; - using BOPAlgo_Options::SetRunParallel; - using BOPAlgo_Options::SetUseOBB; + // using BOPAlgo_Options -- replaced with explicit forwarding for Embind + void Clear() override { BOPAlgo_Options::Clear(); } + void ClearWarnings() { BOPAlgo_Options::ClearWarnings(); } + void DumpErrors(Standard_OStream& theOS) const { BOPAlgo_Options::DumpErrors(theOS); } + void DumpWarnings(Standard_OStream& theOS) const { BOPAlgo_Options::DumpWarnings(theOS); } + double FuzzyValue() const { return BOPAlgo_Options::FuzzyValue(); } + const occ::handle& GetReport () const { return BOPAlgo_Options::GetReport(); } + bool HasError (const occ::handle& theType) const { return BOPAlgo_Options::HasError(theType); } + bool HasErrors() const { return BOPAlgo_Options::HasErrors(); } + bool HasWarning (const occ::handle& theType) const { return BOPAlgo_Options::HasWarning(theType); } + bool HasWarnings() const { return BOPAlgo_Options::HasWarnings(); } + bool RunParallel() const { return BOPAlgo_Options::RunParallel(); } + void SetFuzzyValue(const double theFuzz) { BOPAlgo_Options::SetFuzzyValue(theFuzz); } + void SetRunParallel(const bool theFlag) { BOPAlgo_Options::SetRunParallel(theFlag); } + void SetUseOBB(const bool theUseOBB) { BOPAlgo_Options::SetUseOBB(theUseOBB); } protected: //! Empty constructor diff --git a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_NSections.cxx b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_NSections.cxx index 9cab1739..6c5851da 100644 --- a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_NSections.cxx +++ b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_NSections.cxx @@ -50,6 +50,9 @@ #include IMPLEMENT_STANDARD_RTTIEXT(BRepFill_NSections, BRepFill_SectionLaw) +// OCJS_PATCH_NOEXCEPT_DTOR: explicit noexcept destructor eliminates EH landing pads +BRepFill_NSections::~BRepFill_NSections() noexcept = default; + #ifdef OCCT_DEBUG static bool Affich = 0; diff --git a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_NSections.hxx b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_NSections.hxx index 3c9add63..94ab0190 100644 --- a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_NSections.hxx +++ b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_NSections.hxx @@ -42,6 +42,8 @@ public: Standard_EXPORT BRepFill_NSections(const NCollection_Sequence& S, const bool Build = true); + Standard_EXPORT ~BRepFill_NSections() noexcept; // OCJS_PATCH_NOEXCEPT_DTOR + //! Construct Standard_EXPORT BRepFill_NSections(const NCollection_Sequence& S, const NCollection_Sequence& Trsfs, diff --git a/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_Line.cxx b/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_Line.cxx index 8fb698e5..92ddd57c 100644 --- a/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_Line.cxx +++ b/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_Line.cxx @@ -16,6 +16,9 @@ #include IMPLEMENT_STANDARD_RTTIEXT(BRepBlend_Line, Standard_Transient) +// OCJS_PATCH_NOEXCEPT_DTOR: explicit noexcept destructor eliminates EH landing pads +BRepBlend_Line::~BRepBlend_Line() noexcept = default; + BRepBlend_Line::BRepBlend_Line() : tras1(IntSurf_Undecided), diff --git a/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_Line.hxx b/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_Line.hxx index f1c3a2a2..5978a7a9 100644 --- a/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_Line.hxx +++ b/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_Line.hxx @@ -31,6 +31,8 @@ class BRepBlend_Line : public Standard_Transient public: Standard_EXPORT BRepBlend_Line(); + Standard_EXPORT ~BRepBlend_Line() noexcept; // OCJS_PATCH_NOEXCEPT_DTOR + //! Clears the content of the line. Standard_EXPORT void Clear(); diff --git a/src/ModelingAlgorithms/TKFillet/BlendFunc/BlendFunc_ChamfInv.hxx b/src/ModelingAlgorithms/TKFillet/BlendFunc/BlendFunc_ChamfInv.hxx index 8f085195..4af52428 100644 --- a/src/ModelingAlgorithms/TKFillet/BlendFunc/BlendFunc_ChamfInv.hxx +++ b/src/ModelingAlgorithms/TKFillet/BlendFunc/BlendFunc_ChamfInv.hxx @@ -49,7 +49,8 @@ public: //! False otherwise. Standard_EXPORT bool Derivatives(const math_Vector& X, math_Matrix& D) override; - using Blend_FuncInv::Set; + // using Blend_FuncInv::Set; + void Set (const bool OnFirst, const occ::handle& COnSurf) override { BlendFunc_GenChamfInv::Set(OnFirst, COnSurf); } Standard_EXPORT void Set(const double Dist1, const double Dist2, const int Choix) override; diff --git a/src/ModelingAlgorithms/TKFillet/BlendFunc/BlendFunc_ConstThroatInv.hxx b/src/ModelingAlgorithms/TKFillet/BlendFunc/BlendFunc_ConstThroatInv.hxx index a508d326..df8d6d97 100644 --- a/src/ModelingAlgorithms/TKFillet/BlendFunc/BlendFunc_ConstThroatInv.hxx +++ b/src/ModelingAlgorithms/TKFillet/BlendFunc/BlendFunc_ConstThroatInv.hxx @@ -45,7 +45,8 @@ public: //! False otherwise. Standard_EXPORT bool Derivatives(const math_Vector& X, math_Matrix& D) override; - using Blend_FuncInv::Set; + // using Blend_FuncInv::Set; + void Set (const bool OnFirst, const occ::handle& COnSurf) override { BlendFunc_GenChamfInv::Set(OnFirst, COnSurf); } Standard_EXPORT void Set(const double theThroat, const double, const int Choix) override; diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntCurve/IntCurve_IntConicConic.lxx b/src/ModelingAlgorithms/TKGeomAlgo/IntCurve/IntCurve_IntConicConic.lxx index 9240c2af..373c58e6 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/IntCurve/IntCurve_IntConicConic.lxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/IntCurve/IntCurve_IntConicConic.lxx @@ -196,3 +196,6 @@ inline CONSTRUCTOR(const gp_Circ2d& C1, SetReversedParameters(false); Perform(C1, D1, C2, D2, TolConf, Tol); } + +#undef CONSTRUCTOR +#undef PERFORM diff --git a/src/ModelingAlgorithms/TKMesh/BRepMeshData/BRepMeshData_Edge.cxx b/src/ModelingAlgorithms/TKMesh/BRepMeshData/BRepMeshData_Edge.cxx index b7b39e5c..a3c34051 100644 --- a/src/ModelingAlgorithms/TKMesh/BRepMeshData/BRepMeshData_Edge.cxx +++ b/src/ModelingAlgorithms/TKMesh/BRepMeshData/BRepMeshData_Edge.cxx @@ -33,7 +33,8 @@ BRepMeshData_Edge::BRepMeshData_Edge(const TopoDS_Edge& //================================================================================================= -BRepMeshData_Edge::~BRepMeshData_Edge() = default; +// OCJS_PATCH_NOEXCEPT_DTOR: explicit noexcept destructor eliminates EH landing pads +BRepMeshData_Edge::~BRepMeshData_Edge() noexcept = default; //================================================================================================= diff --git a/src/ModelingAlgorithms/TKMesh/BRepMeshData/BRepMeshData_Edge.hxx b/src/ModelingAlgorithms/TKMesh/BRepMeshData/BRepMeshData_Edge.hxx index 1e012fdb..7c34098e 100644 --- a/src/ModelingAlgorithms/TKMesh/BRepMeshData/BRepMeshData_Edge.hxx +++ b/src/ModelingAlgorithms/TKMesh/BRepMeshData/BRepMeshData_Edge.hxx @@ -31,7 +31,7 @@ public: const occ::handle& theAllocator); //! Destructor. - Standard_EXPORT ~BRepMeshData_Edge() override; + Standard_EXPORT ~BRepMeshData_Edge() noexcept override; // OCJS_PATCH_NOEXCEPT_DTOR //! Returns number of pcurves assigned to current edge. Standard_EXPORT int PCurvesNb() const override; diff --git a/src/ModelingAlgorithms/TKOffset/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx b/src/ModelingAlgorithms/TKOffset/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx index 6e60f68e..9c164bc5 100644 --- a/src/ModelingAlgorithms/TKOffset/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx +++ b/src/ModelingAlgorithms/TKOffset/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx @@ -255,6 +255,10 @@ static TopoDS_Solid MakeSolid(TopoDS_Shell& shell, //================================================================================================= + +// OCJS_PATCH_NOEXCEPT_DTOR: explicit noexcept destructor eliminates EH landing pads +BRepOffsetAPI_ThruSections::~BRepOffsetAPI_ThruSections() noexcept = default; + BRepOffsetAPI_ThruSections::BRepOffsetAPI_ThruSections(const bool isSolid, const bool ruled, const double pres3d) diff --git a/src/ModelingAlgorithms/TKOffset/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx b/src/ModelingAlgorithms/TKOffset/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx index 267240df..061a8475 100644 --- a/src/ModelingAlgorithms/TKOffset/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx +++ b/src/ModelingAlgorithms/TKOffset/BRepOffsetAPI/BRepOffsetAPI_ThruSections.hxx @@ -66,6 +66,8 @@ public: const bool ruled = false, const double pres3d = 1.0e-06); + Standard_EXPORT ~BRepOffsetAPI_ThruSections() noexcept; // OCJS_PATCH_NOEXCEPT_DTOR + //! Initializes this algorithm for building a shell or a solid //! passing through a set of sections, where: //! - isSolid is set to true if this construction algorithm is