mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-08 14:17:06 +03:00
0026937: Eliminate NO_CXX_EXCEPTION macro support
Macro NO_CXX_EXCEPTION was removed from code. Method Raise() was replaced by explicit throw statement. Method Standard_Failure::Caught() was replaced by normal C++mechanism of exception transfer. Method Standard_Failure::Caught() is deprecated now. Eliminated empty constructors. Updated samples. Eliminate empty method ChangeValue from NCollection_Map class. Removed not operable methods from NCollection classes.
This commit is contained in:
@@ -28,12 +28,6 @@
|
||||
|
||||
//Standard_IMPORT extern IntImp_ConstIsoparametric *ChoixRef;
|
||||
|
||||
|
||||
IntImp_Int2S::IntImp_Int2S() {
|
||||
Standard_ConstructionError::Raise(" Empty Constructor : IntImp_Int2S");
|
||||
}
|
||||
|
||||
|
||||
IntImp_Int2S::IntImp_Int2S(const ThePSurface& surf1,
|
||||
const ThePSurface& surf2,
|
||||
const Standard_Real TolTangency ) :
|
||||
|
@@ -21,48 +21,45 @@ inline Standard_Boolean IntImp_Int2S::IsDone()const { return done;}
|
||||
|
||||
inline Standard_Boolean IntImp_Int2S::IsEmpty() const
|
||||
{
|
||||
if (!done) StdFail_NotDone::Raise(" IntImp_Int2S::IsEmpty() ");
|
||||
if (!done) throw StdFail_NotDone(" IntImp_Int2S::IsEmpty() ");
|
||||
return empty;
|
||||
}
|
||||
|
||||
inline const IntSurf_PntOn2S& IntImp_Int2S::Point() const
|
||||
{
|
||||
if (!done) StdFail_NotDone::Raise(" IntImp_Int2S::Point() ");
|
||||
if (empty) Standard_DomainError::Raise(" IntImp_Int2S::Point() ");
|
||||
if (!done) throw StdFail_NotDone(" IntImp_Int2S::Point() ");
|
||||
if (empty) throw Standard_DomainError(" IntImp_Int2S::Point() ");
|
||||
return pint;
|
||||
}
|
||||
|
||||
inline Standard_Boolean IntImp_Int2S::IsTangent () const {
|
||||
|
||||
if (!done) StdFail_NotDone::Raise(" IntImp_Int2S::IsTangent () ");
|
||||
if (empty) Standard_DomainError::Raise(" IntImp_Int2S::IsTangent () ");
|
||||
if (!done) throw StdFail_NotDone(" IntImp_Int2S::IsTangent () ");
|
||||
if (empty) throw Standard_DomainError(" IntImp_Int2S::IsTangent () ");
|
||||
return tangent;
|
||||
}
|
||||
|
||||
inline const gp_Dir& IntImp_Int2S::Direction () const {
|
||||
|
||||
if (!done) StdFail_NotDone::Raise(" IntImp_Int2S::Direction () ");
|
||||
if (empty) Standard_DomainError::Raise(" IntImp_Int2S::Direction () ");
|
||||
if (tangent) StdFail_UndefinedDerivative::Raise
|
||||
(" IntImp_Int2S::Direction () ");
|
||||
if (!done) throw StdFail_NotDone(" IntImp_Int2S::Direction () ");
|
||||
if (empty) throw Standard_DomainError(" IntImp_Int2S::Direction () ");
|
||||
if (tangent) throw StdFail_UndefinedDerivative(" IntImp_Int2S::Direction () ");
|
||||
return d3d;
|
||||
}
|
||||
|
||||
inline const gp_Dir2d& IntImp_Int2S::DirectionOnS1 () const {
|
||||
|
||||
if (!done) StdFail_NotDone::Raise(" IntImp_Int2S::DirectionOnS1 () ");
|
||||
if (empty) Standard_DomainError::Raise(" IntImp_Int2S::DirectionOnS1 () ");
|
||||
if (tangent) StdFail_UndefinedDerivative::Raise
|
||||
(" IntImp_Int2S::DirectionOnS1 () ");
|
||||
if (!done) throw StdFail_NotDone(" IntImp_Int2S::DirectionOnS1 () ");
|
||||
if (empty) throw Standard_DomainError(" IntImp_Int2S::DirectionOnS1 () ");
|
||||
if (tangent) throw StdFail_UndefinedDerivative(" IntImp_Int2S::DirectionOnS1 () ");
|
||||
return d2d1;
|
||||
}
|
||||
|
||||
inline const gp_Dir2d& IntImp_Int2S::DirectionOnS2 () const {
|
||||
|
||||
if (!done) StdFail_NotDone::Raise(" IntImp_Int2S::DirectionOnS2 () ");
|
||||
if (empty) Standard_DomainError::Raise(" IntImp_Int2S::DirectionOnS2 () ");
|
||||
if (tangent) StdFail_UndefinedDerivative::Raise
|
||||
(" IntImp_Int2S::DirectionOnS2 () ");
|
||||
if (!done) throw StdFail_NotDone(" IntImp_Int2S::DirectionOnS2 () ");
|
||||
if (empty) throw Standard_DomainError(" IntImp_Int2S::DirectionOnS2 () ");
|
||||
if (tangent) throw StdFail_UndefinedDerivative(" IntImp_Int2S::DirectionOnS2 () ");
|
||||
return d2d2;
|
||||
}
|
||||
|
||||
|
@@ -131,29 +131,29 @@ void IntImp_IntCS::Perform(const Standard_Real U,
|
||||
Standard_Boolean IntImp_IntCS::IsDone() const { return done;}
|
||||
|
||||
Standard_Boolean IntImp_IntCS::IsEmpty()const {
|
||||
if (!done) StdFail_NotDone::Raise();
|
||||
if (!done) throw StdFail_NotDone();
|
||||
return empty;
|
||||
}
|
||||
|
||||
const gp_Pnt& IntImp_IntCS::Point() const
|
||||
{
|
||||
if (!done) StdFail_NotDone::Raise();
|
||||
if (empty) Standard_DomainError::Raise();
|
||||
if (!done) throw StdFail_NotDone();
|
||||
if (empty) throw Standard_DomainError();
|
||||
return myFunction.Point();
|
||||
}
|
||||
|
||||
void IntImp_IntCS::ParameterOnSurface(Standard_Real& U,
|
||||
Standard_Real& V) const
|
||||
{
|
||||
if (!done) StdFail_NotDone::Raise();
|
||||
if (empty) Standard_DomainError::Raise();
|
||||
if (!done) throw StdFail_NotDone();
|
||||
if (empty) throw Standard_DomainError();
|
||||
U=u;
|
||||
V=v;
|
||||
}
|
||||
Standard_Real IntImp_IntCS::ParameterOnCurve() const
|
||||
{
|
||||
if (!done) StdFail_NotDone::Raise();
|
||||
if (empty) Standard_DomainError::Raise();
|
||||
if (!done) throw StdFail_NotDone();
|
||||
if (empty) throw Standard_DomainError();
|
||||
return w;
|
||||
}
|
||||
|
||||
|
@@ -46,13 +46,13 @@ inline const gp_Pnt& IntImp_ZerImpFunc::Point() const
|
||||
|
||||
inline const gp_Vec& IntImp_ZerImpFunc::Direction3d()
|
||||
{
|
||||
if (IsTangent()) StdFail_UndefinedDerivative::Raise();
|
||||
if (IsTangent()) throw StdFail_UndefinedDerivative();
|
||||
return d3d;
|
||||
}
|
||||
|
||||
inline const gp_Dir2d& IntImp_ZerImpFunc::Direction2d()
|
||||
{
|
||||
if (IsTangent()) StdFail_UndefinedDerivative::Raise();
|
||||
if (IsTangent()) throw StdFail_UndefinedDerivative();
|
||||
return d2d;
|
||||
}
|
||||
|
||||
|
@@ -26,10 +26,6 @@
|
||||
#define SURF2 (*((ThePSurface *)(surf2)))
|
||||
|
||||
|
||||
IntImp_ZerParFunc::IntImp_ZerParFunc() {
|
||||
Standard_ConstructionError::Raise(" Empty Constructor : IntImp_ZerParFunc");
|
||||
}
|
||||
|
||||
IntImp_ZerParFunc::IntImp_ZerParFunc(const ThePSurface& S1 ,
|
||||
const ThePSurface& S2) {
|
||||
surf1 = (Standard_Address)(&S1);
|
||||
|
@@ -29,17 +29,17 @@ inline gp_Pnt IntImp_ZerParFunc::Point() const {
|
||||
}
|
||||
|
||||
inline gp_Dir IntImp_ZerParFunc::Direction() const {
|
||||
if (tangent ) StdFail_UndefinedDerivative::Raise();
|
||||
if (tangent ) throw StdFail_UndefinedDerivative();
|
||||
return gp_Dir(tgduv[0]*dpuv[0].XYZ() + tgduv[1]*dpuv[1].XYZ());
|
||||
}
|
||||
|
||||
inline gp_Dir2d IntImp_ZerParFunc::DirectionOnS1() const {
|
||||
if (tangent ) StdFail_UndefinedDerivative::Raise();
|
||||
if (tangent ) throw StdFail_UndefinedDerivative();
|
||||
return gp_Dir2d(tgduv[0],tgduv[1]);
|
||||
}
|
||||
|
||||
inline gp_Dir2d IntImp_ZerParFunc::DirectionOnS2() const {
|
||||
if (tangent ) StdFail_UndefinedDerivative::Raise();
|
||||
if (tangent ) throw StdFail_UndefinedDerivative();
|
||||
return gp_Dir2d(tgduv[2],tgduv[3]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user