1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +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

@@ -90,7 +90,7 @@ static Standard_Integer proj (Draw_Interpretor& di, Standard_Integer n, const ch
{
if ( n < 5)
{
cout << " Use proj curve/surf x y z [{extrema algo: g(grad)/t(tree)}|{u v}]" << endl;
std::cout << " Use proj curve/surf x y z [{extrema algo: g(grad)/t(tree)}|{u v}]" << std::endl;
return 1;
}
@@ -155,7 +155,7 @@ static Standard_Integer proj (Draw_Interpretor& di, Standard_Integer n, const ch
if(proj.NbPoints() == 0)
{
cout << "No project point was found." << endl;
std::cout << "No project point was found." << std::endl;
return 0;
}

View File

@@ -537,7 +537,7 @@ static Standard_Integer interpol (Draw_Interpretor& di,Standard_Integer n, const
// lecture du fichier.
// nbpoints, 2d ou 3d, puis valeurs.
const char* nomfic = a[2];
ifstream iFile(nomfic, ios::in);
std::ifstream iFile(nomfic, std::ios::in);
if (!iFile) return 1;
Standard_Integer nbp, i;
Standard_Real x, y, z;

View File

@@ -158,7 +158,7 @@ static Standard_Integer surfaceCcontinuity (Draw_Interpretor& di, Standard_Integ
LocalAnalysis_SurfaceContinuity RES (surf1, U1, V1, surf2, U2, V2,
TypeCont, epsnl, epsC0, epsC1, epsC2, epsG1, perce, maxlen);
//LocalAnalysis::Dump(RES,cout);
//LocalAnalysis::Dump(RES,std::cout);
Standard_SStream aSStream;
LocalAnalysis::Dump(RES,aSStream);
di << aSStream;
@@ -252,7 +252,7 @@ static Standard_Integer surfaceGcontinuity (Draw_Interpretor& di, Standard_Integ
LocalAnalysis_SurfaceContinuity RES (surf1, U1, V1, surf2, U2, V2,
TypeCont, epsnl, epsC0, epsC1, epsC2, epsG1, perce, maxlen);
//LocalAnalysis::Dump(RES,cout);
//LocalAnalysis::Dump(RES,std::cout);
Standard_SStream aSStream;
LocalAnalysis::Dump(RES,aSStream);
di << aSStream;
@@ -343,7 +343,7 @@ static Standard_Integer curveGcontinuity(Draw_Interpretor& di, Standard_Integer
LocalAnalysis_CurveContinuity RES (curv1, U1, curv2, U2, TypeCont,
epsnl, epsC0, epsC1, epsC2, epsG1, epsG2, percent, maxlen);
//LocalAnalysis::Dump(RES,cout);
//LocalAnalysis::Dump(RES,std::cout);
Standard_SStream aSStream;
LocalAnalysis::Dump(RES,aSStream);
di << aSStream;
@@ -447,7 +447,7 @@ static Standard_Integer curveCcontinuity(Draw_Interpretor& di, Standard_Integer
LocalAnalysis_CurveContinuity RES (curv1, U1, curv2, U2, TypeCont,
epsnl, epsC0, epsC1, epsC2, epsG1, epsG2, percent, maxlen);
//LocalAnalysis::Dump(RES,cout);
//LocalAnalysis::Dump(RES,std::cout);
Standard_SStream aSStream;
LocalAnalysis::Dump(RES,aSStream);
di << aSStream;

View File

@@ -309,7 +309,7 @@ static Standard_Integer gproject(Draw_Interpretor& di, Standard_Integer n, const
Sprintf(newname,"%s_%d",name,k);
Sprintf(newname1,"%s2d_%d",name,k);
if(Projector.IsSinglePnt(k, P2d)){
// cout<<"Part "<<k<<" of the projection is punctual"<<endl;
// std::cout<<"Part "<<k<<" of the projection is punctual"<<std::endl;
Projector.GetSurface()->D0(P2d.X(), P2d.Y(), P);
DrawTrSurf::Set(temp, P);
DrawTrSurf::Set(temp1, P2d);
@@ -322,7 +322,7 @@ static Standard_Integer gproject(Draw_Interpretor& di, Standard_Integer n, const
gp_Dir2d Dir; // Only for isoparametric projection
if (Projector.IsUIso(k, UIso)) {
// cout<<"Part "<<k<<" of the projection is U-isoparametric curve"<<endl;
// std::cout<<"Part "<<k<<" of the projection is U-isoparametric curve"<<std::endl;
Projector.D0(Udeb, Pdeb);
Projector.D0(Ufin, Pfin);
Udeb = Pdeb.Y();
@@ -338,7 +338,7 @@ static Standard_Integer gproject(Draw_Interpretor& di, Standard_Integer n, const
Only3d = Standard_True;
}
else if(Projector.IsVIso(k, VIso)) {
// cout<<"Part "<<k<<" of the projection is V-isoparametric curve"<<endl;
// std::cout<<"Part "<<k<<" of the projection is V-isoparametric curve"<<std::endl;
Projector.D0(Udeb, Pdeb);
Projector.D0(Ufin, Pfin);
Udeb = Pdeb.X();
@@ -945,7 +945,7 @@ static Standard_Integer crvpoints (Draw_Interpretor& di, Standard_Integer /*n*/,
TopoDS_Wire aWire = TopoDS::Wire(DBRep::Get(a[2], TopAbs_WIRE));
if (aWire.IsNull())
{
cout << "cannot evaluate the argument " << a[2] << " as a curve" << endl;
std::cout << "cannot evaluate the argument " << a[2] << " as a curve" << std::endl;
return 1;
}
BRepAdaptor_CompCurve aCompCurve(aWire);
@@ -1019,7 +1019,7 @@ static Standard_Integer crvtpoints (Draw_Interpretor& di, Standard_Integer n, co
TopoDS_Wire aWire = TopoDS::Wire(DBRep::Get(a[2], TopAbs_WIRE));
if (aWire.IsNull())
{
cout << "cannot evaluate the argument " << a[2] << " as a curve" << endl;
std::cout << "cannot evaluate the argument " << a[2] << " as a curve" << std::endl;
return 1;
}
BRepAdaptor_CompCurve aCompCurve(aWire);
@@ -1681,7 +1681,7 @@ static Standard_Integer intersection (Draw_Interpretor& di,
Standard_Integer Compt = 1;
if(nblines >= 1)
cout << " Lines: " << endl;
std::cout << " Lines: " << std::endl;
for (i = 1; i <= nblines; i++, Compt++)
{
@@ -1693,7 +1693,7 @@ static Standard_Integer intersection (Draw_Interpretor& di,
}
if(nbpoints >= 1)
cout << " Points: " << endl;
std::cout << " Points: " << std::endl;
const Standard_Integer imax = nblines+nbpoints;

View File

@@ -37,7 +37,7 @@ static Standard_Integer qcurve (Draw_Interpretor&, Standard_Integer theArgsNb, c
{
if (theArgsNb < 5)
{
cout << "Error: wrong number of arguments.\n";
std::cout << "Error: wrong number of arguments.\n";
return 1;
}
@@ -61,7 +61,7 @@ static Standard_Integer qcurve (Draw_Interpretor&, Standard_Integer theArgsNb, c
{
if (theArgsNb < 6)
{
cout << "Error: wrong number of arguments.\n";
std::cout << "Error: wrong number of arguments.\n";
return 1;
}
aResult2d = new Geom2d_Line (gp_Pnt2d (Draw::Atof (theArgVec[2]), Draw::Atof (theArgVec[3])),
@@ -71,7 +71,7 @@ static Standard_Integer qcurve (Draw_Interpretor&, Standard_Integer theArgsNb, c
}
else
{
cout << "Error: wrong command name.\n";
std::cout << "Error: wrong command name.\n";
return 1;
}
@@ -95,7 +95,7 @@ static Standard_Integer solutions (Draw_Interpretor& theDI, GccAna_Circ2d3Tan& t
{
if (!theCirTan3.IsDone())
{
cout << "GccAna_Circ2d3Tan is not done";
std::cout << "GccAna_Circ2d3Tan is not done";
return 1;
}
@@ -159,7 +159,7 @@ static Standard_Integer circ2d3Tan (Draw_Interpretor& theDI, Standard_Integer th
{
if (theArgsNb < 5)
{
cout << "Error: wrong number of arguments.\n";
std::cout << "Error: wrong number of arguments.\n";
return 1;
}
@@ -183,7 +183,7 @@ static Standard_Integer circ2d3Tan (Draw_Interpretor& theDI, Standard_Integer th
{
if (!anIsPoint1 || !anIsPoint2 || !anIsPoint3)
{
cout << "Error: wrong points definition.\n";
std::cout << "Error: wrong points definition.\n";
return 1;
}
GccAna_Circ2d3Tan aCircBuilder (aPoint1, aPoint2, aPoint3, aTolerance);
@@ -195,7 +195,7 @@ static Standard_Integer circ2d3Tan (Draw_Interpretor& theDI, Standard_Integer th
{
if (!anIsPoint2 || !anIsPoint3)
{
cout << "Error: wrong points definition.\n";
std::cout << "Error: wrong points definition.\n";
return 1;
}
Geom2dAdaptor_Curve anAdaptorCurve1 (aQCurve1->GetCurve());
@@ -211,7 +211,7 @@ static Standard_Integer circ2d3Tan (Draw_Interpretor& theDI, Standard_Integer th
GccAna_Circ2d3Tan aCircBuilder (aQualifiedLin1, aPoint2, aPoint3, aTolerance);
return solutions (theDI, aCircBuilder, theArgVec[1]);
}
cout << "Error: wrong curve type.\n";
std::cout << "Error: wrong curve type.\n";
return 1;
}
@@ -220,7 +220,7 @@ static Standard_Integer circ2d3Tan (Draw_Interpretor& theDI, Standard_Integer th
{
if (!anIsPoint3)
{
cout << "Error: wrong point definition.\n";
std::cout << "Error: wrong point definition.\n";
return 1;
}
Geom2dAdaptor_Curve anAdaptorCurve1 (aQCurve1->GetCurve());
@@ -246,7 +246,7 @@ static Standard_Integer circ2d3Tan (Draw_Interpretor& theDI, Standard_Integer th
GccAna_Circ2d3Tan aCircBuilder (aQualifiedLin1, aQualifiedLin2, aPoint3, aTolerance);
return solutions (theDI, aCircBuilder, theArgVec[1]);
}
cout << "Error: wrong curve type.\n";
std::cout << "Error: wrong curve type.\n";
return 1;
}
@@ -292,7 +292,7 @@ static Standard_Integer circ2d3Tan (Draw_Interpretor& theDI, Standard_Integer th
return solutions (theDI, aCircBuilder, theArgVec[1]);
}
cout << "Error: wrong curve type.\n";
std::cout << "Error: wrong curve type.\n";
return 1;
}

View File

@@ -39,7 +39,7 @@ static Standard_Integer xdistcc(Draw_Interpretor& , Standard_Integer n, const ch
{
if (n < 5)
{
cout<<" Use xdistcc c1 c2 t1 t2 nbp"<<endl;
std::cout<<" Use xdistcc c1 c2 t1 t2 nbp"<<std::endl;
return 0;
}
@@ -53,14 +53,14 @@ static Standard_Integer xdistcc(Draw_Interpretor& , Standard_Integer n, const ch
aC1=DrawTrSurf::GetCurve(a[1]);
if (aC1.IsNull())
{
cout<<a[1]<<" is null curve"<<endl;
std::cout<<a[1]<<" is null curve"<<std::endl;
return 0;
}
aC2=DrawTrSurf::GetCurve(a[2]);
if (aC2.IsNull())
{
cout<<a[2]<<" is null curve"<<endl;
std::cout<<a[2]<<" is null curve"<<std::endl;
return 0;
}
@@ -102,8 +102,8 @@ static Standard_Integer xdistcc(Draw_Interpretor& , Standard_Integer n, const ch
dout << aMr;
}
cout << "Max distance = " << aMaxDist << endl;
cout << "Param = " << aMaxParam << endl;
std::cout << "Max distance = " << aMaxDist << std::endl;
std::cout << "Param = " << aMaxParam << std::endl;
return 0;
}
@@ -116,7 +116,7 @@ static Standard_Integer xdistc2dc2dss(Draw_Interpretor& , Standard_Integer n, co
{
if (n < 7)
{
cout<<" Use xdistc2dc2dss c2d_1 c2d_2 s1 s2 t1 t2 nbp"<<endl;
std::cout<<" Use xdistc2dc2dss c2d_1 c2d_2 s1 s2 t1 t2 nbp"<<std::endl;
return 0;
}
@@ -132,28 +132,28 @@ static Standard_Integer xdistc2dc2dss(Draw_Interpretor& , Standard_Integer n, co
aC2d1=DrawTrSurf::GetCurve2d(a[1]);
if (aC2d1.IsNull())
{
cout<<a[1]<<" is null 2dcurve"<<endl;
std::cout<<a[1]<<" is null 2dcurve"<<std::endl;
return 0;
}
aC2d2=DrawTrSurf::GetCurve2d(a[2]);
if (aC2d2.IsNull())
{
cout<<a[2]<<" is null 2dcurve"<<endl;
std::cout<<a[2]<<" is null 2dcurve"<<std::endl;
return 0;
}
aS1=DrawTrSurf::GetSurface(a[3]);
if (aS1.IsNull())
{
cout<<a[3]<<" is null surface"<<endl;
std::cout<<a[3]<<" is null surface"<<std::endl;
return 0;
}
aS2=DrawTrSurf::GetSurface(a[4]);
if (aS2.IsNull())
{
cout<<a[4]<<" is null surface"<<endl;
std::cout<<a[4]<<" is null surface"<<std::endl;
return 0;
}
@@ -198,8 +198,8 @@ static Standard_Integer xdistc2dc2dss(Draw_Interpretor& , Standard_Integer n, co
dout << aMr;
}
cout << "Max distance = " << aMaxDist << endl;
cout << "Param = " << aMaxParam << endl;
std::cout << "Max distance = " << aMaxDist << std::endl;
std::cout << "Param = " << aMaxParam << std::endl;
return 0;
}
@@ -212,7 +212,7 @@ static Standard_Integer xdistcc2ds(Draw_Interpretor& , Standard_Integer n, const
{
if (n < 6)
{
cout<<" Use xdistcc2ds c c2d s t1 t2 nbp"<<endl;
std::cout<<" Use xdistcc2ds c c2d s t1 t2 nbp"<<std::endl;
return 0;
}
@@ -229,21 +229,21 @@ static Standard_Integer xdistcc2ds(Draw_Interpretor& , Standard_Integer n, const
aC=DrawTrSurf::GetCurve(a[1]);
if (aC.IsNull())
{
cout<<a[1]<<" is null curve"<<endl;
std::cout<<a[1]<<" is null curve"<<std::endl;
return 0;
}
aC2d=DrawTrSurf::GetCurve2d(a[2]);
if (aC2d.IsNull())
{
cout<<a[2]<<" is null 2dcurve"<<endl;
std::cout<<a[2]<<" is null 2dcurve"<<std::endl;
return 0;
}
aS=DrawTrSurf::GetSurface(a[3]);
if (aS.IsNull())
{
cout<<a[3]<<" is null surface"<<endl;
std::cout<<a[3]<<" is null surface"<<std::endl;
return 0;
}
@@ -287,8 +287,8 @@ static Standard_Integer xdistcc2ds(Draw_Interpretor& , Standard_Integer n, const
dout << aMr;
}
cout << "Max distance = " << aMaxDist << endl;
cout << "Param = " << aMaxParam << endl;
std::cout << "Max distance = " << aMaxDist << std::endl;
std::cout << "Param = " << aMaxParam << std::endl;
return 0;
}
@@ -300,10 +300,10 @@ static Standard_Integer xdistcc2ds(Draw_Interpretor& , Standard_Integer n, const
static Standard_Integer xdistcs(Draw_Interpretor& di, Standard_Integer n, const char** a)
{
if (n < 6) {
cout << "Use: xdistcs curve surface t1 t2 nbpoints [tol [warn_tol]]" << endl;
cout << "Measures distances from curve to surface by nbpoints probing points on a curve" << endl;
cout << "Error will be reported for points where distance is greater than tol" << endl;
cout << "Warning will be reported for points where distance is greater than warn_tol" << endl;
std::cout << "Use: xdistcs curve surface t1 t2 nbpoints [tol [warn_tol]]" << std::endl;
std::cout << "Measures distances from curve to surface by nbpoints probing points on a curve" << std::endl;
std::cout << "Error will be reported for points where distance is greater than tol" << std::endl;
std::cout << "Warning will be reported for points where distance is greater than warn_tol" << std::endl;
return 0;
}
//