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

@@ -309,7 +309,7 @@ static void Print(const Handle(Geom2d_BezierCurve)& B,
OS << degree << " ";
for (i = 1; i <= degree+1; i++) {
if (!compact) OS << "\n "<<setw(2)<<i<<" : ";
if (!compact) OS << "\n "<<std::setw(2)<<i<<" : ";
Print(B->Pole(i),OS,compact);
if (rational)
OS << " " << B->Weight(i);
@@ -369,7 +369,7 @@ static void Print(const Handle(Geom2d_BSplineCurve)& B,
if (!compact) OS << "Poles :\n";
for (i = 1; i <= nbpoles; i++) {
if (!compact) OS << "\n "<<setw(2)<<i<<" : ";
if (!compact) OS << "\n "<<std::setw(2)<<i<<" : ";
else OS << " ";
Print(B->Pole(i),OS,compact);
if (rational)
@@ -379,7 +379,7 @@ static void Print(const Handle(Geom2d_BSplineCurve)& B,
if (!compact) OS << "Knots :\n";
for (i = 1; i <= nbknots; i++) {
if (!compact) OS << "\n "<<setw(2)<<i<<" : ";
if (!compact) OS << "\n "<<std::setw(2)<<i<<" : ";
else OS << " ";
OS << B->Knot(i) << " " << B->Multiplicity(i);
}
@@ -468,7 +468,7 @@ void GeomTools_Curve2dSet::PrintCurve2d(const Handle(Geom2d_Curve)& C,
//if (!compact)
// OS << "****** UNKNOWN CURVE2d TYPE ******\n";
//else
// cout << "****** UNKNOWN CURVE2d TYPE ******" << endl;
// std::cout << "****** UNKNOWN CURVE2d TYPE ******" << std::endl;
}
}
@@ -485,7 +485,7 @@ void GeomTools_Curve2dSet::Dump(Standard_OStream& OS)const
OS << "\n -------\n\n";
for (i = 1; i <= nbsurf; i++) {
OS << setw(4) << i << " : ";
OS << std::setw(4) << i << " : ";
PrintCurve2d(Handle(Geom2d_Curve)::DownCast(myMap(i)),OS,Standard_False);
}
}
@@ -827,8 +827,8 @@ Handle(Geom2d_Curve) GeomTools_Curve2dSet::ReadCurve2d(Standard_IStream& IS)
}
catch(Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
cout <<"EXCEPTION in GeomTools_Curve2dSet::ReadCurve2d(..)!!!" << endl;
cout << anException << endl;
std::cout <<"EXCEPTION in GeomTools_Curve2dSet::ReadCurve2d(..)!!!" << std::endl;
std::cout << anException << std::endl;
#endif
(void)anException;
}
@@ -845,7 +845,7 @@ void GeomTools_Curve2dSet::Read(Standard_IStream& IS)
char buffer[255];
IS >> buffer;
if (strcmp(buffer,"Curve2ds")) {
cout << "Not a Curve2d table"<<endl;
std::cout << "Not a Curve2d table"<<std::endl;
return;
}

View File

@@ -323,7 +323,7 @@ static void Print(const Handle(Geom_BezierCurve)& B,
OS << degree << " ";
for (i = 1; i <= degree+1; i++) {
if (!compact) OS << "\n "<<setw(2)<<i<<" : ";
if (!compact) OS << "\n "<<std::setw(2)<<i<<" : ";
Print(B->Pole(i),OS,compact);
if (rational)
OS << " " << B->Weight(i);
@@ -383,7 +383,7 @@ static void Print(const Handle(Geom_BSplineCurve)& B,
if (!compact) OS << "Poles :\n";
for (i = 1; i <= nbpoles; i++) {
if (!compact) OS << "\n "<<setw(2)<<i<<" : ";
if (!compact) OS << "\n "<<std::setw(2)<<i<<" : ";
else OS << " ";
Print(B->Pole(i),OS,compact);
if (rational)
@@ -393,7 +393,7 @@ static void Print(const Handle(Geom_BSplineCurve)& B,
if (!compact) OS << "Knots :\n";
for (i = 1; i <= nbknots; i++) {
if (!compact) OS << "\n "<<setw(2)<<i<<" : ";
if (!compact) OS << "\n "<<std::setw(2)<<i<<" : ";
OS << " " << B->Knot(i) << " " << B->Multiplicity(i);
}
@@ -485,7 +485,7 @@ void GeomTools_CurveSet::PrintCurve(const Handle(Geom_Curve)& C,
//if (!compact)
// OS << "****** UNKNOWN CURVE TYPE ******\n";
//else
// cout << "****** UNKNOWN CURVE TYPE ******" << endl;
// std::cout << "****** UNKNOWN CURVE TYPE ******" << std::endl;
}
}
@@ -502,7 +502,7 @@ void GeomTools_CurveSet::Dump(Standard_OStream& OS)const
OS << "\n -------\n\n";
for (i = 1; i <= nbsurf; i++) {
OS << setw(4) << i << " : ";
OS << std::setw(4) << i << " : ";
PrintCurve(Handle(Geom_Curve)::DownCast(myMap(i)),OS,Standard_False);
}
}
@@ -848,8 +848,8 @@ Handle(Geom_Curve) GeomTools_CurveSet::ReadCurve (Standard_IStream& IS)
}
catch(Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
cout <<"EXCEPTION in GeomTools_CurveSet::ReadCurve(..)!!!" << endl;
cout << anException << endl;
std::cout <<"EXCEPTION in GeomTools_CurveSet::ReadCurve(..)!!!" << std::endl;
std::cout << anException << std::endl;
#endif
(void)anException;
}
@@ -866,7 +866,7 @@ void GeomTools_CurveSet::Read(Standard_IStream& IS)
char buffer[255];
IS >> buffer;
if (strcmp(buffer,"Curves")) {
cout << "Not a Curve table"<<endl;
std::cout << "Not a Curve table"<<std::endl;
return;
}

View File

@@ -40,26 +40,26 @@ const char* GeomTools_Dump (void* theHandlePtr)
Handle(Geom_Surface) GS = Handle(Geom_Surface)::DownCast(aHandle);
if (!GS.IsNull()) {
cout << "\n\n";
GeomTools_SurfaceSet::PrintSurface (GS,cout);
cout << endl;
return "Found Geom_Surface, see dump in cout";
std::cout << "\n\n";
GeomTools_SurfaceSet::PrintSurface (GS,std::cout);
std::cout << std::endl;
return "Found Geom_Surface, see dump in std::cout";
}
Handle(Geom_Curve) GC = Handle(Geom_Curve)::DownCast(aHandle);
if (!GC.IsNull()) {
cout << "\n\n";
GeomTools_CurveSet::PrintCurve(GC,cout);
cout << endl;
return "Found Geom_Curve, see dump in cout";
std::cout << "\n\n";
GeomTools_CurveSet::PrintCurve(GC,std::cout);
std::cout << std::endl;
return "Found Geom_Curve, see dump in std::cout";
}
Handle(Geom2d_Curve) GC2d = Handle(Geom2d_Curve)::DownCast(aHandle);
if (!GC2d.IsNull()) {
cout << "\n\n";
GeomTools_Curve2dSet::PrintCurve2d(GC2d,cout);
cout << endl;
return "Found Geom2d_Curve, see dump in cout";
std::cout << "\n\n";
GeomTools_Curve2dSet::PrintCurve2d(GC2d,std::cout);
std::cout << std::endl;
return "Found Geom2d_Curve, see dump in std::cout";
}
return "Error: Not a geometric object";

View File

@@ -400,7 +400,7 @@ static void Print(const Handle(Geom_BezierSurface)& S,
for (i = 1; i <= udegree+1; i++) {
for (j = 1; j <= vdegree+1; j++) {
if (!compact) OS << "\n "<<setw(2)<<i<<", "<<setw(2)<<j<<" : ";
if (!compact) OS << "\n "<<std::setw(2)<<i<<", "<<std::setw(2)<<j<<" : ";
Print(S->Pole(i,j),OS,compact);
if (urational || vrational)
OS << " " << S->Weight(i,j);
@@ -486,7 +486,7 @@ static void Print(const Handle(Geom_BSplineSurface)& S,
if (!compact) OS << "\n Poles :\n";
for (i = 1; i <= nbupoles; i++) {
for (j = 1; j <= nbvpoles; j++) {
if (!compact) OS << "\n "<<setw(2)<<i<<", "<<setw(2)<<j<<" : ";
if (!compact) OS << "\n "<<std::setw(2)<<i<<", "<<std::setw(2)<<j<<" : ";
Print(S->Pole(i,j),OS,compact);
if (urational || vrational)
OS << " " << S->Weight(i,j);
@@ -498,13 +498,13 @@ static void Print(const Handle(Geom_BSplineSurface)& S,
OS << "\n";
if (!compact) OS << "\n UKnots :\n";
for (i = 1; i <= nbuknots; i++) {
if (!compact) OS << "\n "<<setw(2)<<i<<" : ";
if (!compact) OS << "\n "<<std::setw(2)<<i<<" : ";
OS << S->UKnot(i) << " " << S->UMultiplicity(i) <<"\n";
}
OS << "\n";
if (!compact) OS << "\n VKnots :\n";
for (i = 1; i <= nbvknots; i++) {
if (!compact) OS << "\n "<<setw(2)<<i<<" : ";
if (!compact) OS << "\n "<<std::setw(2)<<i<<" : ";
OS << S->VKnot(i) << " " << S->VMultiplicity(i) <<"\n";
}
OS << "\n";
@@ -605,7 +605,7 @@ void GeomTools_SurfaceSet::PrintSurface(const Handle(Geom_Surface)& S,
//if (!compact)
// OS << "***** Unknown Surface ********\n";
//else
// cout << "***** Unknown Surface ********"<<endl;
// std::cout << "***** Unknown Surface ********"<<std::endl;
}
}
@@ -622,7 +622,7 @@ void GeomTools_SurfaceSet::Dump(Standard_OStream& OS)const
OS << "\n -------\n\n";
for (i = 1; i <= nbsurf; i++) {
OS << setw(4) << i << " : ";
OS << std::setw(4) << i << " : ";
PrintSurface(Handle(Geom_Surface)::DownCast(myMap(i)),OS,Standard_False);
}
}
@@ -1039,8 +1039,8 @@ Handle(Geom_Surface) GeomTools_SurfaceSet::ReadSurface(Standard_IStream& IS)
}
catch(Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
cout <<"EXCEPTION in GeomTools_SurfaceSet::ReadSurface(..)!!!" << endl;
cout << anException << endl;
std::cout <<"EXCEPTION in GeomTools_SurfaceSet::ReadSurface(..)!!!" << std::endl;
std::cout << anException << std::endl;
#endif
(void)anException;
}
@@ -1057,7 +1057,7 @@ void GeomTools_SurfaceSet::Read(Standard_IStream& IS)
char buffer[255];
IS >> buffer;
if (strcmp(buffer,"Surfaces")) {
cout << "Not a surface table"<<endl;
std::cout << "Not a surface table"<<std::endl;
return;
}

View File

@@ -39,7 +39,7 @@ void GeomTools_UndefinedTypeHandler::PrintCurve(const Handle(Geom_Curve)& /*C*/,
if (!compact)
OS << "****** UNKNOWN CURVE TYPE ******\n";
else
cout << "****** UNKNOWN CURVE TYPE ******" << endl;
std::cout << "****** UNKNOWN CURVE TYPE ******" << std::endl;
}
//=======================================================================
@@ -66,7 +66,7 @@ void GeomTools_UndefinedTypeHandler::PrintCurve2d(const Handle(Geom2d_Curve)& /*
if (!compact)
OS << "****** UNKNOWN CURVE2d TYPE ******\n";
else
cout << "****** UNKNOWN CURVE2d TYPE ******" << endl;
std::cout << "****** UNKNOWN CURVE2d TYPE ******" << std::endl;
}
//=======================================================================
@@ -93,7 +93,7 @@ void GeomTools_UndefinedTypeHandler::PrintSurface(const Handle(Geom_Surface)& /*
if (!compact)
OS << "****** UNKNOWN SURFACE TYPE ******\n";
else
cout << "****** UNKNOWN SURFACE TYPE ******" << endl;
std::cout << "****** UNKNOWN SURFACE TYPE ******" << std::endl;
}
Standard_IStream& GeomTools_UndefinedTypeHandler::ReadSurface(const Standard_Integer /*ctype*/,