Salome HOME
NPAL18078: dependance on CASCADE in Salome.
authorjfa <jfa@opencascade.com>
Fri, 30 Nov 2007 08:33:11 +0000 (08:33 +0000)
committerjfa <jfa@opencascade.com>
Fri, 30 Nov 2007 08:33:11 +0000 (08:33 +0000)
src/SMESH_I/SMESH_MeshEditor_i.cxx
src/StdMeshers/StdMeshers_Distribution.cxx
src/StdMeshers/StdMeshers_NumberOfSegments.cxx
src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx

index 77914d16ea549de7d11f165164e25f52405d81c4..7c8d3197a2464831b156c2ea482f59c4da1744ff 100644 (file)
@@ -38,7 +38,6 @@
 #include "SMESH_Filter_i.hxx"
 #include "SMESH_PythonDump.hxx"
 
-#include "CASCatch.hxx"
 #include "utilities.h"
 #include "Utils_ExceptHandlers.hxx"
 #include "Utils_CorbaException.hxx"
@@ -61,8 +60,6 @@
 
 #ifdef NO_CAS_CATCH
 #include <Standard_ErrorHandler.hxx>
-#else
-#include "CASCatch.hxx"
 #endif
 
 #include <sstream>
@@ -1524,11 +1521,9 @@ SMESH_MeshEditor_i::extrusionSweep(const SMESH::long_array & theIDsOfElements,
 {
   initData();
 
-#ifdef NO_CAS_CATCH
   try {   
+#ifdef NO_CAS_CATCH
     OCC_CATCH_SIGNALS;
-#else
-  CASCatch_TRY {
 #endif
     TIDSortedElemSet elements;
     arrayToSet(theIDsOfElements, GetMeshDS(), elements, theElementType);
@@ -1545,11 +1540,7 @@ SMESH_MeshEditor_i::extrusionSweep(const SMESH::long_array & theIDsOfElements,
 
     return theMakeGroups ? getGroups(groupIds.get()) : 0;
 
-#ifdef NO_CAS_CATCH
   } catch(Standard_Failure) {
-#else
-  } CASCatch_CATCH(Standard_Failure) {
-#endif
     Handle(Standard_Failure) aFail = Standard_Failure::Caught();          
     INFOS( "SMESH_MeshEditor_i::ExtrusionSweep fails - "<< aFail->GetMessageString() );
   }
index 44153632755a5836ed37d64fb58f9f8e031921d0..fce8298f430ac1708e708921c5811f4d104f6d5b 100644 (file)
@@ -39,8 +39,6 @@
 
 #ifdef NO_CAS_CATCH
 #include <Standard_ErrorHandler.hxx>
-#else
-#include "CASCatch.hxx"
 #endif
 
 Function::Function( const int conv )
@@ -56,18 +54,12 @@ bool Function::value( const double, double& f ) const
 {
   bool ok = true;
   if (myConv == 0) {
-#ifdef NO_CAS_CATCH
     try {
+#ifdef NO_CAS_CATCH
       OCC_CATCH_SIGNALS;
-#else
-    CASCatch_TRY {
 #endif
       f = pow( 10., f );
-#ifdef NO_CAS_CATCH
     } catch(Standard_Failure) {
-#else
-    } CASCatch_CATCH(Standard_Failure) {
-#endif
       Handle(Standard_Failure) aFail = Standard_Failure::Caught();
       f = 0.0;
       ok = false;
@@ -194,19 +186,13 @@ FunctionExpr::FunctionExpr( const char* str, const int conv )
   myValues( 1, 1 )
 {
   bool ok = true;
-#ifdef NO_CAS_CATCH
   try {
+#ifdef NO_CAS_CATCH
     OCC_CATCH_SIGNALS;
-#else
-  CASCatch_TRY {
 #endif
     myExpr = ExprIntrp_GenExp::Create();
     myExpr->Process( ( Standard_CString )str );
-#ifdef NO_CAS_CATCH
   } catch(Standard_Failure) {
-#else
-  } CASCatch_CATCH(Standard_Failure) {
-#endif
     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
     ok = false;
   }
@@ -236,18 +222,12 @@ bool FunctionExpr::value( const double t, double& f ) const
 
   ( ( TColStd_Array1OfReal& )myValues ).ChangeValue( 1 ) = t;
   bool ok = true;
-#ifdef NO_CAS_CATCH
   try {
+#ifdef NO_CAS_CATCH
     OCC_CATCH_SIGNALS;
-#else
-  CASCatch_TRY {
 #endif
     f = myExpr->Expression()->Evaluate( myVars, myValues );
-#ifdef NO_CAS_CATCH
   } catch(Standard_Failure) {
-#else
-  } CASCatch_CATCH(Standard_Failure) {
-#endif
     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
     f = 0.0;
     ok = false;
@@ -260,21 +240,15 @@ bool FunctionExpr::value( const double t, double& f ) const
 double FunctionExpr::integral( const double a, const double b ) const
 {
   double res = 0.0;
-#ifdef NO_CAS_CATCH
   try {
+#ifdef NO_CAS_CATCH
     OCC_CATCH_SIGNALS;
-#else
-  CASCatch_TRY {
 #endif
     math_GaussSingleIntegration _int
       ( *static_cast<math_Function*>( const_cast<FunctionExpr*> (this) ), a, b, 20 );
     if( _int.IsDone() )
       res = _int.Value();
-#ifdef NO_CAS_CATCH
   } catch(Standard_Failure) {
-#else
-  } CASCatch_CATCH(Standard_Failure) {
-#endif
     res = 0.0;
     MESSAGE( "Exception in integral calculating" );
   }
index a6364114a63a70c7a071b410c33f3e0fc0490a04..51300c1379cb308788abce3e6b8f6195c082fe51 100644 (file)
@@ -49,8 +49,6 @@
 
 #ifdef NO_CAS_CATCH
 #include <Standard_ErrorHandler.hxx>
-#else
-#include "CASCatch.hxx"
 #endif
 
 using namespace std;
@@ -233,18 +231,12 @@ void StdMeshers_NumberOfSegments::SetTableFunction(const vector<double>& table)
     double val = table[i*2+1];
     if( _convMode==0 )
     {
-#ifdef NO_CAS_CATCH
       try {
+#ifdef NO_CAS_CATCH
         OCC_CATCH_SIGNALS;
-#else
-      CASCatch_TRY {
 #endif
        val = pow( 10.0, val );
-#ifdef NO_CAS_CATCH
       } catch(Standard_Failure) {
-#else
-      } CASCatch_CATCH(Standard_Failure) {
-#endif
        Handle(Standard_Failure) aFail = Standard_Failure::Caught();
        throw SALOME_Exception( LOCALIZED( "invalid value"));
        return;
@@ -333,19 +325,13 @@ bool process( const TCollection_AsciiString& str, int convMode,
 {
   bool parsed_ok = true;
   Handle( ExprIntrp_GenExp ) myExpr;
-#ifdef NO_CAS_CATCH
   try {
+#ifdef NO_CAS_CATCH
     OCC_CATCH_SIGNALS;
-#else
-  CASCatch_TRY {
 #endif
     myExpr = ExprIntrp_GenExp::Create();
     myExpr->Process( str.ToCString() );
-#ifdef NO_CAS_CATCH
   } catch(Standard_Failure) {
-#else
-  } CASCatch_CATCH(Standard_Failure) {
-#endif
     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
     parsed_ok = false;
   }
index 482aeb6be4bd01a31736297b15d0e8833383bb25..460dfb4d54e2848f7162a789e53e2e4317abfeeb 100644 (file)
@@ -31,8 +31,6 @@
 
 #ifdef NO_CAS_CATCH
 #include <Standard_ErrorHandler.hxx>
-#else
-#include "CASCatch.hxx"
 #endif
 
 StdMeshersGUI_DistrPreview::StdMeshersGUI_DistrPreview( QWidget* p, StdMeshers::StdMeshers_NumberOfSegments_ptr h )
@@ -251,18 +249,12 @@ void StdMeshersGUI_DistrPreview::update()
   delete[] y;
   x = y = 0;
 
-#ifdef NO_CAS_CATCH
   try {   
+#ifdef NO_CAS_CATCH
     OCC_CATCH_SIGNALS;
-#else
-  CASCatch_TRY {
 #endif
     replot();
-#ifdef NO_CAS_CATCH
   } catch(Standard_Failure) {
-#else
-  } CASCatch_CATCH(Standard_Failure) {
-#endif
     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
   }
 }
@@ -302,19 +294,13 @@ bool isCorrectArg( const Handle( Expr_GeneralExpression )& expr )
 bool StdMeshersGUI_DistrPreview::init( const QString& str )
 {
   bool parsed_ok = true;
-#ifdef NO_CAS_CATCH
   try {
+#ifdef NO_CAS_CATCH
     OCC_CATCH_SIGNALS;
-#else
-  CASCatch_TRY {
 #endif
     myExpr = ExprIntrp_GenExp::Create();
     myExpr->Process( ( Standard_CString ) str.latin1() );
-#ifdef NO_CAS_CATCH
   } catch(Standard_Failure) {
-#else
-  } CASCatch_CATCH(Standard_Failure) {
-#endif
     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
     parsed_ok = false;
   }
@@ -350,18 +336,12 @@ double StdMeshersGUI_DistrPreview::calc( bool& ok )
   double res = 0.0;
 
   ok = true;
-#ifdef NO_CAS_CATCH
   try {   
+#ifdef NO_CAS_CATCH
     OCC_CATCH_SIGNALS;
-#else
-  CASCatch_TRY {
 #endif
     res = myExpr->Expression()->Evaluate( myVars, myValues );
-#ifdef NO_CAS_CATCH
   } catch(Standard_Failure) {
-#else
-  } CASCatch_CATCH(Standard_Failure) {
-#endif
     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
     ok = false;
     res = 0.0;
@@ -382,22 +362,16 @@ bool StdMeshersGUI_DistrPreview::convert( double& v ) const
   {
   case EXPONENT:
     {
-#ifdef NO_CAS_CATCH
       try { 
+#ifdef NO_CAS_CATCH
         OCC_CATCH_SIGNALS;
-#else
-      CASCatch_TRY {
 #endif
        // in StdMeshers_NumberOfSegments.cc
        // const double PRECISION = 1e-7;
        //
        if(v < -7) v = -7.0;
        v = pow( 10.0, v );
-#ifdef NO_CAS_CATCH
       } catch(Standard_Failure) {
-#else
-      } CASCatch_CATCH(Standard_Failure) {
-#endif
        Handle(Standard_Failure) aFail = Standard_Failure::Caught();
        v = 0.0;
        ok = false;