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:
@@ -309,7 +309,7 @@ static Standard_Boolean Connect (const Handle(ShapeAnalysis_Wire)& theSAW,
|
||||
if (!IGESToBRep::TransferPCurve (edge2d, edge3d, myface)) continue;
|
||||
if (sfe->FixReversed2d (edge3d, myface)) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: IGESToBRep_IGESBoundary: 2D curve of edge was reversed" << endl;
|
||||
std::cout << "Warning: IGESToBRep_IGESBoundary: 2D curve of edge was reversed" << std::endl;
|
||||
#endif
|
||||
}
|
||||
//#74 rln 10.03.99 S4135: handling use of BRepLib::SameParameter by new static parameter
|
||||
@@ -329,19 +329,19 @@ static Standard_Boolean Connect (const Handle(ShapeAnalysis_Wire)& theSAW,
|
||||
//pdn 08.04.99 S4135 recomputing only if deviation is greater than maxtol
|
||||
if (maxdev > maxtol) { //:e2
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: IGESToBRep_IGESBoundary: Deviation = " << maxdev << endl;
|
||||
std::cout << "Warning: IGESToBRep_IGESBoundary: Deviation = " << maxdev << std::endl;
|
||||
#endif
|
||||
ShapeFix_ShapeTolerance().SetTolerance (edge3d, Precision::Confusion());
|
||||
for (Standard_Integer ie = 1; ie <= iedge; ie++)
|
||||
ShapeBuild_Edge().RemovePCurve (Lsewd3d->Edge (ie), myface);
|
||||
if (Preferred3d) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: IGESToBRep_IGESBoundary: 3D and 2D curves are inconsistent; 2D is ignored" << endl;
|
||||
std::cout << "Warning: IGESToBRep_IGESBoundary: 3D and 2D curves are inconsistent; 2D is ignored" << std::endl;
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: IGESToBRep_IGESBoundary: 3D and 2D curves are inconsistent; 3D is ignored" << endl;
|
||||
std::cout << "Warning: IGESToBRep_IGESBoundary: 3D and 2D curves are inconsistent; 3D is ignored" << std::endl;
|
||||
#endif
|
||||
Lsewd = Lsewd2d;
|
||||
}
|
||||
@@ -352,7 +352,7 @@ static Standard_Boolean Connect (const Handle(ShapeAnalysis_Wire)& theSAW,
|
||||
okCurve = okCurve && ShapeAlgo::AlgoContainer()->ConnectNextWire (saw, Lsewd, maxtol, distmin, revsewd, revnextsewd);
|
||||
if (!okCurve) {
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "Warning: IGESToBRep_IGESBoundary: Curves " << i - 1 << " and " << i << " cannot be connected" << endl;
|
||||
std::cout << "Warning: IGESToBRep_IGESBoundary: Curves " << i - 1 << " and " << i << " cannot be connected" << std::endl;
|
||||
#endif
|
||||
Gsewd3d = new ShapeExtend_WireData;
|
||||
for (Standard_Integer j = 1; j <= len3d; j++) {
|
||||
|
@@ -172,7 +172,7 @@ void IGESControl_Reader::PrintTransferInfo
|
||||
|
||||
sprintf(mess,"%d\t%d\t%s\t%s", igesEnt->TypeNumber(), igesEnt->FormNumber(),
|
||||
"%d", aBinder->ResultTypeName());
|
||||
//cout << mess << endl;
|
||||
//std::cout << mess << std::endl;
|
||||
if (aMapCountMapping.IsBound(mess))
|
||||
aMapCountMapping.ChangeFind(mess)++;
|
||||
else
|
||||
@@ -209,7 +209,7 @@ void IGESControl_Reader::PrintTransferInfo
|
||||
}
|
||||
for(i = 1; i<= nf; i++) {
|
||||
sprintf(mess,"\t F\t%d\t%d\t%s",type,form,aCheck->CFail(i));
|
||||
// TF << mess << endl;
|
||||
// TF << mess << std::endl;
|
||||
if (aMapCount.IsBound(mess))
|
||||
aMapCount.ChangeFind(mess)++;
|
||||
else
|
||||
@@ -247,7 +247,7 @@ void IGESControl_Reader::PrintTransferInfo
|
||||
NCollection_DataMap<TCollection_AsciiString, Handle(TColStd_HSequenceOfInteger)>::Iterator aMapListIter(aMapList);
|
||||
for(; aMapCountIter.More() && aMapListIter.More();
|
||||
aMapCountIter.Next(), aMapListIter.Next()) {
|
||||
TF << aMapCountIter.Value() << aMapCountIter.Key() << endl;
|
||||
TF << aMapCountIter.Value() << aMapCountIter.Key() << Message_EndLine;
|
||||
if (mode == IFSelect_ListByItem) {
|
||||
Handle(TColStd_HSequenceOfInteger) entityList = aMapListIter.Value();
|
||||
Standard_Integer length = entityList->Length();
|
||||
@@ -267,7 +267,7 @@ void IGESControl_Reader::PrintTransferInfo
|
||||
TF << line;
|
||||
}
|
||||
}
|
||||
TF << endl;
|
||||
TF << Message_EndLine;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -281,7 +281,7 @@ void IGESControl_Reader::PrintTransferInfo
|
||||
NCollection_DataMap<TCollection_AsciiString, Standard_Integer>::Iterator aMapIter(aMapCountResult);
|
||||
for (; aMapIter.More(); aMapIter.Next())
|
||||
{
|
||||
TF << aMapIter.Key() << aMapIter.Value() << endl;
|
||||
TF << aMapIter.Key() << aMapIter.Value() << Message_EndLine;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -299,7 +299,7 @@ void IGESControl_Reader::PrintTransferInfo
|
||||
|
||||
sprintf(mess, "%d\t%d \t%s\t%s", root->TypeNumber(), root->FormNumber(),
|
||||
"%d", "Failed");
|
||||
//cout << mess << endl;
|
||||
//std::cout << mess << std::endl;
|
||||
if (aMapCountMapping.IsBound(mess))
|
||||
aMapCountMapping.ChangeFind(mess)++;
|
||||
else
|
||||
@@ -311,7 +311,7 @@ void IGESControl_Reader::PrintTransferInfo
|
||||
for(; aMapCountIter.More(); aMapCountIter.Next()) {
|
||||
char mess[80];
|
||||
sprintf(mess, aMapCountIter.Key().ToCString(), aMapCountIter.Value());
|
||||
TF << mess << endl; //dicoCountIter.Value() << dicoCountIter.Name() << endl;
|
||||
TF << mess << Message_EndLine; //dicoCountIter.Value() << dicoCountIter.Name() << std::endl;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@@ -233,7 +233,7 @@ Standard_Boolean IGESControl_Writer::Write
|
||||
ComputeModel();
|
||||
Standard_Integer nbEnt = myModel->NbEntities();
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<" IGES Write : "<<nbEnt<<" ent.s"<< flush;
|
||||
std::cout<<" IGES Write : "<<nbEnt<<" ent.s"<< std::flush;
|
||||
#endif
|
||||
if(!nbEnt)
|
||||
return Standard_False;
|
||||
@@ -241,12 +241,12 @@ Standard_Boolean IGESControl_Writer::Write
|
||||
// ne pas oublier le mode fnes ... a transmettre a IW
|
||||
IW.SendModel (IGESSelect_WorkLibrary::DefineProtocol());
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<" ... ecriture ..."<<flush;
|
||||
std::cout<<" ... ecriture ..."<<std::flush;
|
||||
#endif
|
||||
if (fnes) IW.WriteMode() = 10;
|
||||
Standard_Boolean status = IW.Print(S);
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<" ... fichier ecrit ..."<<endl;
|
||||
std::cout<<" ... fichier ecrit ..."<<std::endl;
|
||||
#endif
|
||||
return status;
|
||||
}
|
||||
@@ -254,11 +254,11 @@ Standard_Boolean IGESControl_Writer::Write
|
||||
Standard_Boolean IGESControl_Writer::Write
|
||||
(const Standard_CString file, const Standard_Boolean fnes)
|
||||
{
|
||||
ofstream fout;
|
||||
OSD_OpenStream(fout,file,ios::out);
|
||||
std::ofstream fout;
|
||||
OSD_OpenStream(fout,file,std::ios::out);
|
||||
if (!fout) return Standard_False;
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<" Ecriture fichier ("<< (fnes ? "fnes" : "IGES") <<"): "<<file<<endl;
|
||||
std::cout<<" Ecriture fichier ("<< (fnes ? "fnes" : "IGES") <<"): "<<file<<std::endl;
|
||||
#endif
|
||||
Standard_Boolean res = Write (fout,fnes);
|
||||
|
||||
|
Reference in New Issue
Block a user