1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0030895: Coding Rules - specify std namespace explicitly for std::cout and streams

"endl" manipulator for Message_Messenger is renamed to "Message_EndLine".

The following entities from std namespace are now used
with std:: explicitly specified (from Standard_Stream.hxx):
std::istream,std::ostream,std::ofstream,std::ifstream,std::fstream,
std::filebuf,std::streambuf,std::streampos,std::ios,std::cout,std::cerr,
std::cin,std::endl,std::ends,std::flush,std::setw,std::setprecision,
std::hex,std::dec.
This commit is contained in:
tiv
2019-08-02 10:32:16 +03:00
committed by bugmaster
parent 3977d18aca
commit 0423218095
972 changed files with 8554 additions and 8550 deletions

View File

@@ -64,20 +64,20 @@ static void DUMP(const MultiLine& Line)
TColgp_Array1OfPnt tabP(1, mynbP3d);
TColgp_Array1OfPnt2d tabP2d(1, mynbP2d);
cout <<"DUMP de la MultiLine entre "<<firstP <<" et "<<lastP<<": "<<endl;
std::cout <<"DUMP de la MultiLine entre "<<firstP <<" et "<<lastP<<": "<<std::endl;
for (i = firstP; i <= lastP; i++) {
if (nbP3d != 0 && nbP2d != 0) LineTool::Value(Line, i, tabP, tabP2d);
else if (nbP2d != 0) LineTool::Value(Line, i, tabP2d);
else if (nbP3d != 0) LineTool::Value(Line, i, tabP);
cout << "point "<<i<<":"<< endl;
std::cout << "point "<<i<<":"<< std::endl;
for (j = 1; j <= nbP3d; j++) {
P1 = tabP(j);
cout <<P1.X()<<" "<<P1.Y()<<" "<<P1.Z()<<endl;
std::cout <<P1.X()<<" "<<P1.Y()<<" "<<P1.Z()<<std::endl;
}
for (j = 1; j <= nbP2d; j++) {
P12d = tabP2d(j);
cout <<P12d.X()<<" "<<P12d.Y()<<endl;
std::cout <<P12d.X()<<" "<<P12d.Y()<<std::endl;
}
}
@@ -197,7 +197,7 @@ static Standard_Boolean CheckMultiCurve(const AppParCurves_MultiCurve& theMultiC
if (ScalProd < MinScalProd)
{
#ifdef DRAW
cout<<"ScalProd("<<indp-2<<","<<indp-1<<")-("<<indp-1<<","<<indp<<") = "<<ScalProd<<endl;
std::cout<<"ScalProd("<<indp-2<<","<<indp-1<<")-("<<indp-1<<","<<indp<<") = "<<ScalProd<<std::endl;
#endif
LoopFound = Standard_True;
break;
@@ -329,7 +329,7 @@ static Standard_Boolean CheckMultiCurve(const AppParCurves_MultiCurve& theMultiC
if (ScalProd < MinScalProd)
{
#ifdef DRAW
cout<<"ScalProd("<<k-2<<","<<k-1<<")-("<<k-1<<","<<k<<") = "<<ScalProd<<endl;
std::cout<<"ScalProd("<<k-2<<","<<k-1<<")-("<<k-1<<","<<k<<") = "<<ScalProd<<std::endl;
#endif
LoopFound = Standard_True;
break;
@@ -1486,7 +1486,7 @@ Standard_Boolean Approx_ComputeLine::ComputeCurve(const MultiLine& Line,
#ifdef OCCT_DEBUG
if (!Parallel) {
if (mydebug) cout <<"droite mais tangentes pas vraiment paralleles!!"<< endl;
if (mydebug) std::cout <<"droite mais tangentes pas vraiment paralleles!!"<< std::endl;
}
#endif
AppParCurves_MultiCurve mySCU(mydegremin+1);

View File

@@ -174,8 +174,8 @@ Approx_Curve3d::Approx_Curve3d(const Handle(Adaptor3d_HCurve)& Curve,
void Approx_Curve3d::Dump(Standard_OStream& o) const
{
o << "******* Dump of ApproxCurve *******" << endl;
o << "*******Degree " << Curve()->Degree() << endl;
o << "*******NbSegments " << Curve()->NbKnots() - 1 << endl;
o << "*******Error " << MaxError() << endl;
o << "******* Dump of ApproxCurve *******" << std::endl;
o << "*******Degree " << Curve()->Degree() << std::endl;
o << "*******NbSegments " << Curve()->NbKnots() - 1 << std::endl;
o << "*******Error " << MaxError() << std::endl;
}

View File

@@ -197,11 +197,11 @@ Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor3d_
#ifdef OCCT_DEBUG_CHRONO
ResultChron(chr_total, t_total);
cout<<" total reparametrization time = "<<t_total<<endl;
cout<<"initialization time = "<<t_init<<endl;
cout<<"approximation time = "<<t_approx<<endl;
cout<<"total time for uparam computation = "<<t_uparam<<endl;
cout<<"number uparam calles = "<<uparam_count<<endl;
std::cout<<" total reparametrization time = "<<t_total<<std::endl;
std::cout<<"initialization time = "<<t_init<<std::endl;
std::cout<<"approximation time = "<<t_approx<<std::endl;
std::cout<<"total time for uparam computation = "<<t_uparam<<std::endl;
std::cout<<"number uparam calles = "<<uparam_count<<std::endl;
#endif
}
@@ -358,11 +358,11 @@ Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor2d_
#ifdef OCCT_DEBUG_CHRONO
ResultChron(chr_total, t_total);
cout<<" total reparametrization time = "<<t_total<<endl;
cout<<"initialization time = "<<t_init<<endl;
cout<<"approximation time = "<<t_approx<<endl;
cout<<"total time for uparam computation = "<<t_uparam<<endl;
cout<<"number uparam calles = "<<uparam_count<<endl;
std::cout<<" total reparametrization time = "<<t_total<<std::endl;
std::cout<<"initialization time = "<<t_init<<std::endl;
std::cout<<"approximation time = "<<t_approx<<std::endl;
std::cout<<"total time for uparam computation = "<<t_uparam<<std::endl;
std::cout<<"number uparam calles = "<<uparam_count<<std::endl;
#endif
}
@@ -531,11 +531,11 @@ Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor2d_
#ifdef OCCT_DEBUG_CHRONO
ResultChron(chr_total, t_total);
cout<<" total reparametrization time = "<<t_total<<endl;
cout<<"initialization time = "<<t_init<<endl;
cout<<"approximation time = "<<t_approx<<endl;
cout<<"total time for uparam computation = "<<t_uparam<<endl;
cout<<"number uparam calles = "<<uparam_count<<endl;
std::cout<<" total reparametrization time = "<<t_total<<std::endl;
std::cout<<"initialization time = "<<t_init<<std::endl;
std::cout<<"approximation time = "<<t_approx<<std::endl;
std::cout<<"total time for uparam computation = "<<t_uparam<<std::endl;
std::cout<<"number uparam calles = "<<uparam_count<<std::endl;
#endif
}
@@ -628,12 +628,12 @@ Approx_CurvilinearParameter::Approx_CurvilinearParameter(const Handle(Adaptor2d_
void Approx_CurvilinearParameter::Dump(Standard_OStream& o) const
{
o << "Dump of Approx_CurvilinearParameter" << endl;
o << "Dump of Approx_CurvilinearParameter" << std::endl;
if (myCase==2 || myCase==3)
o << "myMaxError2d1 = " << myMaxError2d1 << endl;
o << "myMaxError2d1 = " << myMaxError2d1 << std::endl;
if (myCase==3)
o << "myMaxError2d2 = " << myMaxError2d2 << endl;
o << "myMaxError3d = " << myMaxError3d << endl;
o << "myMaxError2d2 = " << myMaxError2d2 << std::endl;
o << "myMaxError3d = " << myMaxError3d << std::endl;
}
//=======================================================================
@@ -665,7 +665,7 @@ void Approx_CurvilinearParameter::ToleranceComputation(const Handle(Adaptor2d_HC
TolW = Tol / (4.*Max_dS_dw);
#ifdef OCCT_DEBUG
cout << "TolV = " << TolV << endl;
cout << "TolW = " << TolW << endl;
std::cout << "TolV = " << TolV << std::endl;
std::cout << "TolW = " << TolW << std::endl;
#endif
}

View File

@@ -36,17 +36,17 @@ static void DEBUG(const AppParCurves_MultiCurve& MC) {
TColgp_Array1OfPnt2d Poles2d(1, nbpoles);
for (i = 1; i <= nbcu; i++) {
cout << " Curve No. " << i << endl;
std::cout << " Curve No. " << i << std::endl;
if (MC.Dimension(i) == 3) {
MC.Curve(i, Poles);
for (j = 1; j <= nbpoles; j++) {
cout<< " Pole = " << Poles(j).X() <<" "<<Poles(j).Y()<<" "<<Poles(j).Z()<< endl;
std::cout<< " Pole = " << Poles(j).X() <<" "<<Poles(j).Y()<<" "<<Poles(j).Z()<< std::endl;
}
}
else {
MC.Curve(i, Poles2d);
for (j = 1; j <= nbpoles; j++) {
cout<< " Pole = " << Poles2d(j).X() <<" "<<Poles2d(j).Y()<< endl;
std::cout<< " Pole = " << Poles2d(j).X() <<" "<<Poles2d(j).Y()<< std::endl;
}
}
}

View File

@@ -542,7 +542,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
{
//Projector
#ifdef OCCT_DEBUG
cout << "Projection not done" << endl;
std::cout << "Projection not done" << std::endl;
#endif
}
}
@@ -558,7 +558,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
// If not already SameP and tangent to mill, abandon.
mySameParameter = Standard_False;
#ifdef OCCT_DEBUG
cout<<"SameParameter problem : zero tangent to extremities"<<endl;
std::cout<<"SameParameter problem : zero tangent to extremities"<<std::endl;
#endif
return;
}
@@ -653,7 +653,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
}
else {
#ifdef OCCT_DEBUG
cout << "Projection not done" << endl;
std::cout << "Projection not done" << std::endl;
#endif
}
}
@@ -687,7 +687,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
if (Precision::IsInfinite(algtol)) {
mySameParameter = Standard_False;
#ifdef OCCT_DEBUG
cout<<"SameParameter problem : function of interpolation of parametration at mills !!"<<endl;
std::cout<<"SameParameter problem : function of interpolation of parametration at mills !!"<<std::endl;
#endif
return;
}
@@ -778,7 +778,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
}
else {
#ifdef OCCT_DEBUG
cout << "Projection not done" << endl;
std::cout << "Projection not done" << std::endl;
#endif
}
}

View File

@@ -737,19 +737,19 @@ Standard_Real Approx_SweepApproximation::TolCurveOnSurf(const Standard_Integer I
void Approx_SweepApproximation::Dump(Standard_OStream& o) const
{
o << "Dump of SweepApproximation" << endl;
o << "Dump of SweepApproximation" << std::endl;
if (done) {
o << "Error 3d = " << MaxErrorOnSurf() << endl;
o << "Error 3d = " << MaxErrorOnSurf() << std::endl;
if (Num2DSS>0) {
o << "Error 2d = ";
for (Standard_Integer ii=1; ii<=Num2DSS; ii++)
{ o << Max2dError(ii);
if (ii < Num2DSS) o << " , " << endl;
if (ii < Num2DSS) o << " , " << std::endl;
}
cout << endl;
std::cout << std::endl;
}
o << tabVKnots->Length()-1 <<" Segment(s) of degree " << vdeg << endl;
o << tabVKnots->Length()-1 <<" Segment(s) of degree " << vdeg << std::endl;
}
else cout << " Not Done " << endl;
else std::cout << " Not Done " << std::endl;
}