mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-24 13:50:49 +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:
@@ -26,7 +26,7 @@
|
||||
inline void IntRes2d_Domain::SetEquivalentParameters
|
||||
(const Standard_Real p_first,
|
||||
const Standard_Real p_last) {
|
||||
if((status&3)!=3) { Standard_DomainError::Raise(); }
|
||||
if((status&3)!=3) { throw Standard_DomainError(); }
|
||||
status|=4;
|
||||
periodfirst=p_first;
|
||||
periodlast=p_last;
|
||||
@@ -37,17 +37,17 @@ inline Standard_Boolean IntRes2d_Domain::HasFirstPoint () const {
|
||||
}
|
||||
|
||||
inline Standard_Real IntRes2d_Domain::FirstParameter () const {
|
||||
if(!(status&1)) { Standard_DomainError::Raise(); }
|
||||
if(!(status&1)) { throw Standard_DomainError(); }
|
||||
return(first_param);
|
||||
}
|
||||
|
||||
inline const gp_Pnt2d& IntRes2d_Domain::FirstPoint () const {
|
||||
if(!(status&1)) { Standard_DomainError::Raise(); }
|
||||
if(!(status&1)) { throw Standard_DomainError(); }
|
||||
return(first_point);
|
||||
}
|
||||
|
||||
inline Standard_Real IntRes2d_Domain::FirstTolerance () const {
|
||||
if(!(status&1)) { Standard_DomainError::Raise(); }
|
||||
if(!(status&1)) { throw Standard_DomainError(); }
|
||||
return(first_tol);
|
||||
}
|
||||
|
||||
@@ -58,17 +58,17 @@ inline Standard_Boolean IntRes2d_Domain::HasLastPoint () const {
|
||||
}
|
||||
|
||||
inline Standard_Real IntRes2d_Domain::LastParameter () const {
|
||||
if(!(status&2)) { Standard_DomainError::Raise(); }
|
||||
if(!(status&2)) { throw Standard_DomainError(); }
|
||||
return(last_param);
|
||||
}
|
||||
|
||||
inline const gp_Pnt2d& IntRes2d_Domain::LastPoint () const {
|
||||
if(!(status&2)) { Standard_DomainError::Raise(); }
|
||||
if(!(status&2)) { throw Standard_DomainError(); }
|
||||
return(last_point);
|
||||
}
|
||||
|
||||
inline Standard_Real IntRes2d_Domain::LastTolerance () const {
|
||||
if(!(status&2)) { Standard_DomainError::Raise(); }
|
||||
if(!(status&2)) { throw Standard_DomainError(); }
|
||||
return(last_tol);
|
||||
}
|
||||
|
||||
|
@@ -34,29 +34,29 @@ inline IntRes2d_Intersection::IntRes2d_Intersection(const IntRes2d_Intersection&
|
||||
}
|
||||
//----------------------------------------------------------------------
|
||||
inline Standard_Boolean IntRes2d_Intersection::IsEmpty() const {
|
||||
if (!done) {StdFail_NotDone::Raise();}
|
||||
if (!done) {throw StdFail_NotDone();}
|
||||
return ((lpnt.Length() == 0) && (lseg.Length() == 0));
|
||||
}
|
||||
//----------------------------------------------------------------------
|
||||
inline Standard_Integer IntRes2d_Intersection::NbPoints() const {
|
||||
if (!done) {StdFail_NotDone::Raise();}
|
||||
if (!done) {throw StdFail_NotDone();}
|
||||
return lpnt.Length();
|
||||
}
|
||||
//----------------------------------------------------------------------
|
||||
inline const IntRes2d_IntersectionPoint&
|
||||
IntRes2d_Intersection::Point( const Standard_Integer N) const {
|
||||
if (!done) {StdFail_NotDone::Raise();}
|
||||
if (!done) {throw StdFail_NotDone();}
|
||||
return lpnt(N);
|
||||
}
|
||||
//----------------------------------------------------------------------
|
||||
inline Standard_Integer IntRes2d_Intersection::NbSegments() const {
|
||||
if (!done) {StdFail_NotDone::Raise();}
|
||||
if (!done) {throw StdFail_NotDone();}
|
||||
return lseg.Length();
|
||||
}
|
||||
//----------------------------------------------------------------------
|
||||
inline const IntRes2d_IntersectionSegment&
|
||||
IntRes2d_Intersection::Segment(const Standard_Integer N) const {
|
||||
if (!done) {StdFail_NotDone::Raise();}
|
||||
if (!done) {throw StdFail_NotDone();}
|
||||
return lseg(N);
|
||||
}
|
||||
//----------------------------------------------------------------------
|
||||
|
@@ -86,7 +86,7 @@ inline Standard_Boolean IntRes2d_IntersectionSegment::HasLastPoint () const {
|
||||
inline const IntRes2d_IntersectionPoint&
|
||||
IntRes2d_IntersectionSegment::FirstPoint () const {
|
||||
|
||||
if (!first) { Standard_DomainError::Raise(); }
|
||||
if (!first) { throw Standard_DomainError(); }
|
||||
return ptfirst;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ inline const IntRes2d_IntersectionPoint&
|
||||
inline const IntRes2d_IntersectionPoint&
|
||||
IntRes2d_IntersectionSegment::LastPoint () const {
|
||||
|
||||
if (!last) { Standard_DomainError::Raise();}
|
||||
if (!last) { throw Standard_DomainError();}
|
||||
return ptlast;
|
||||
}
|
||||
|
||||
|
@@ -88,7 +88,7 @@ inline IntRes2d_TypeTrans IntRes2d_Transition::TransitionType () const {
|
||||
inline Standard_Boolean IntRes2d_Transition::IsTangent () const {
|
||||
|
||||
if (typetra==IntRes2d_Undecided) {
|
||||
Standard_DomainError::Raise();
|
||||
throw Standard_DomainError();
|
||||
}
|
||||
return tangent;
|
||||
}
|
||||
@@ -96,7 +96,7 @@ inline Standard_Boolean IntRes2d_Transition::IsTangent () const {
|
||||
inline IntRes2d_Situation IntRes2d_Transition::Situation () const {
|
||||
|
||||
if (typetra!=IntRes2d_Touch) {
|
||||
Standard_DomainError::Raise();
|
||||
throw Standard_DomainError();
|
||||
}
|
||||
return situat;
|
||||
}
|
||||
@@ -104,7 +104,7 @@ inline IntRes2d_Situation IntRes2d_Transition::Situation () const {
|
||||
inline Standard_Boolean IntRes2d_Transition::IsOpposite () const {
|
||||
|
||||
if (typetra!=IntRes2d_Touch) {
|
||||
Standard_DomainError::Raise();
|
||||
throw Standard_DomainError();
|
||||
}
|
||||
return oppos;
|
||||
}
|
||||
|
Reference in New Issue
Block a user