1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0025246: Make methods Intervals and NbIntervals const in Adaptor3d_Curve and it descendants

Qualifier "const" added to NbIntervals and Intervals functions.

Fixed Standard_OVERRIDE macro description
Removed obsolete method declaration from Standard_Transient.cdl
This commit is contained in:
aml
2015-02-26 12:44:01 +03:00
committed by bugmaster
parent 69f86542ba
commit 31b1749c42
27 changed files with 65 additions and 74 deletions

View File

@@ -84,12 +84,12 @@ is
---Purpose:
is virtual;
NbIntervals(me:in out; S : Shape from GeomAbs) returns Integer
NbIntervals(me; S : Shape from GeomAbs) returns Integer
---Purpose: Returns the number of intervals for continuity
-- <S>. May be one if Continuity(me) >= <S>
is virtual;
Intervals(me:in out; T : in out Array1OfReal from TColStd;
Intervals(me; T : in out Array1OfReal from TColStd;
S : Shape from GeomAbs)
---Purpose: Stores in <T> the parameters bounding the intervals
-- of continuity <S>.

View File

@@ -67,8 +67,7 @@ GeomAbs_Shape Adaptor3d_Curve::Continuity() const
//purpose :
//=======================================================================
//Standard_Integer Adaptor3d_Curve::NbIntervals(const GeomAbs_Shape S) const
Standard_Integer Adaptor3d_Curve::NbIntervals(const GeomAbs_Shape )
Standard_Integer Adaptor3d_Curve::NbIntervals(const GeomAbs_Shape ) const
{
Standard_NotImplemented::Raise("Adaptor3d_Curve::NbIntervals");
return 0;
@@ -80,8 +79,7 @@ Standard_Integer Adaptor3d_Curve::NbIntervals(const GeomAbs_Shape )
//purpose :
//=======================================================================
//void Adaptor3d_Curve::Intervals(TColStd_Array1OfReal& T, const GeomAbs_Shape S) const
void Adaptor3d_Curve::Intervals(TColStd_Array1OfReal& , const GeomAbs_Shape )
void Adaptor3d_Curve::Intervals(TColStd_Array1OfReal& , const GeomAbs_Shape ) const
{
Standard_NotImplemented::Raise("Adaptor3d_Curve::Intervals");
}

View File

@@ -100,12 +100,12 @@ is
Continuity(me) returns Shape from GeomAbs
is redefined static;
NbIntervals(me: in out; S : Shape from GeomAbs) returns Integer
NbIntervals(me; S : Shape from GeomAbs) returns Integer
---Purpose: Returns the number of intervals for continuity
-- <S>. May be one if Continuity(me) >= <S>
is redefined static;
Intervals(me:in out; T : in out Array1OfReal from TColStd;
Intervals(me; T : in out Array1OfReal from TColStd;
S : Shape from GeomAbs)
---Purpose: Stores in <T> the parameters bounding the intervals
-- of continuity <S>.

View File

@@ -812,8 +812,7 @@ static void AddIntervals (const Handle(TColStd_HSequenceOfReal)& theParameters,
//purpose :
//=======================================================================
Standard_Integer Adaptor3d_CurveOnSurface::NbIntervals
(const GeomAbs_Shape S)
Standard_Integer Adaptor3d_CurveOnSurface::NbIntervals (const GeomAbs_Shape S) const
{
if(S == myIntCont && !myIntervals.IsNull())
return myIntervals->Length()-1;
@@ -838,10 +837,10 @@ Standard_Integer Adaptor3d_CurveOnSurface::NbIntervals
// sorted sequence of parameters defining continuity intervals;
// started with own intervals of curve and completed by
// additional points coming from surface discontinuities
myIntervals = new TColStd_HSequenceOfReal;
Handle(TColStd_HSequenceOfReal) aIntervals = new TColStd_HSequenceOfReal;
for (Standard_Integer i = 1; i <= nc + 1; i++)
{
myIntervals->Append(TabC(i));
aIntervals->Append(TabC(i));
}
if (nu>1)
@@ -852,7 +851,7 @@ Standard_Integer Adaptor3d_CurveOnSurface::NbIntervals
U = TabU.Value(iu);
Adaptor3d_InterFunc Func(myCurve,U,1);
math_FunctionRoots Resol(Func,Tdeb,Tfin,NbSample,Tol,Tol,Tol,0.);
AddIntervals (myIntervals, Resol, Tol);
AddIntervals (aIntervals, Resol, Tol);
}
}
if (nv>1)
@@ -863,17 +862,18 @@ Standard_Integer Adaptor3d_CurveOnSurface::NbIntervals
V = TabV.Value(iv);
Adaptor3d_InterFunc Func(myCurve,V,2);
math_FunctionRoots Resol(Func,Tdeb,Tfin,NbSample,Tol,Tol,Tol,0.);
AddIntervals (myIntervals, Resol, Tol);
AddIntervals (aIntervals, Resol, Tol);
}
}
// for case intervals==1 and first point == last point SequenceOfReal
// contains only one value, therefore it is necessary to add second
// value into myIntervals which will be equal first value.
if (myIntervals->Length() == 1)
myIntervals->Append (myIntervals->Value(1));
// value into aIntervals which will be equal first value.
if (aIntervals->Length() == 1)
aIntervals->Append (aIntervals->Value(1));
myIntCont = S;
const_cast<Adaptor3d_CurveOnSurface*>(this)->myIntervals = aIntervals;
const_cast<Adaptor3d_CurveOnSurface*>(this)->myIntCont = S;
return myIntervals->Length() - 1;
}
@@ -883,7 +883,7 @@ Standard_Integer Adaptor3d_CurveOnSurface::NbIntervals
//=======================================================================
void Adaptor3d_CurveOnSurface::Intervals(TColStd_Array1OfReal& T,
const GeomAbs_Shape S)
const GeomAbs_Shape S) const
{
NbIntervals(S);
Standard_ASSERT_RAISE (T.Length() == myIntervals->Length(), "Error: Wrong size of array buffer in call to Adaptor3d_CurveOnSurface::Intervals");

View File

@@ -85,10 +85,10 @@ is
Continuity(me) returns Shape from GeomAbs ;
---C++: inline
NbIntervals(me: mutable; S : Shape from GeomAbs) returns Integer;
NbIntervals(me; S : Shape from GeomAbs) returns Integer;
---C++: inline
Intervals(me: mutable; T : in out Array1OfReal from TColStd;
Intervals(me; T : in out Array1OfReal from TColStd;
S : Shape from GeomAbs)
---Purpose: Stores in <T> the parameters bounding the intervals
-- of continuity <S>.

View File

@@ -48,9 +48,9 @@ inline Standard_Real Adaptor3d_HCurve::FirstParameter() const
//purpose :
//=======================================================================
inline Standard_Integer Adaptor3d_HCurve::NbIntervals(const GeomAbs_Shape S)
inline Standard_Integer Adaptor3d_HCurve::NbIntervals(const GeomAbs_Shape S) const
{
return GetCurve().NbIntervals(S);
return Curve().NbIntervals(S);
}
//=======================================================================
@@ -59,9 +59,9 @@ inline Standard_Real Adaptor3d_HCurve::FirstParameter() const
//=======================================================================
inline void Adaptor3d_HCurve::Intervals(TColStd_Array1OfReal& T,
const GeomAbs_Shape S)
const GeomAbs_Shape S) const
{
GetCurve().Intervals(T,S);
Curve().Intervals(T,S);
}
//=======================================================================

View File

@@ -120,12 +120,12 @@ is
Continuity(me) returns Shape from GeomAbs
is redefined static;
NbIntervals(me:in out; S : Shape from GeomAbs) returns Integer
NbIntervals(me; S : Shape from GeomAbs) returns Integer
---Purpose: Returns the number of intervals for continuity
-- <S>. May be one if Continuity(me) >= <S>
is redefined static;
Intervals(me:in out; T : in out Array1OfReal from TColStd;
Intervals(me; T : in out Array1OfReal from TColStd;
S : Shape from GeomAbs)
---Purpose: Stores in <T> the parameters bounding the intervals
-- of continuity <S>.

View File

@@ -229,7 +229,7 @@ GeomAbs_Shape Adaptor3d_IsoCurve::Continuity() const
//purpose :
//=======================================================================
Standard_Integer Adaptor3d_IsoCurve::NbIntervals(const GeomAbs_Shape S)
Standard_Integer Adaptor3d_IsoCurve::NbIntervals(const GeomAbs_Shape S) const
{
if (myIso == GeomAbs_NoneIso) Standard_NoSuchObject::Raise();
Standard_Boolean UIso = (myIso == GeomAbs_IsoU);
@@ -260,7 +260,7 @@ Standard_Integer Adaptor3d_IsoCurve::NbIntervals(const GeomAbs_Shape S)
//=======================================================================
void Adaptor3d_IsoCurve::Intervals(TColStd_Array1OfReal& TI,
const GeomAbs_Shape S)
const GeomAbs_Shape S) const
{
if (myIso == GeomAbs_NoneIso) Standard_NoSuchObject::Raise();
Standard_Boolean UIso = (myIso == GeomAbs_IsoU);