mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-24 13:50:49 +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:
@@ -64,10 +64,10 @@ extern Draw_Viewer dout;
|
||||
|
||||
Standard_EXPORT void DBRep_WriteColorOrientation ()
|
||||
{
|
||||
cout << "\nrouge FORWARD";
|
||||
cout << "\nbleu REVERSED";
|
||||
cout << "\nrose EXTERNAL";
|
||||
cout << "\norange INTERNAL"<<endl;
|
||||
std::cout << "\nrouge FORWARD";
|
||||
std::cout << "\nbleu REVERSED";
|
||||
std::cout << "\nrose EXTERNAL";
|
||||
std::cout << "\norange INTERNAL"<<std::endl;
|
||||
}
|
||||
|
||||
Standard_EXPORT Draw_Color DBRep_ColorOrientation (const TopAbs_Orientation Or)
|
||||
@@ -341,8 +341,8 @@ static Standard_Integer triangles(Draw_Interpretor& ,
|
||||
if (n == 1) {
|
||||
disptriangles = !disptriangles;
|
||||
#ifdef OCCT_DEBUG
|
||||
if (disptriangles) cout <<"Triangulations are always displayed"<<endl;
|
||||
else cout <<"Triangulations are displayed only if there is no geometric representation"<<endl;
|
||||
if (disptriangles) std::cout <<"Triangulations are always displayed"<<std::endl;
|
||||
else std::cout <<"Triangulations are displayed only if there is no geometric representation"<<std::endl;
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
@@ -402,8 +402,8 @@ static Standard_Integer polygons(Draw_Interpretor& ,
|
||||
if (n == 1) {
|
||||
disppolygons = !disppolygons;
|
||||
#ifdef OCCT_DEBUG
|
||||
if (disppolygons) cout <<"Polygons are always displayed"<<endl;
|
||||
else cout <<"Polygons are displayed only if there is no geometric representation"<<endl;
|
||||
if (disppolygons) std::cout <<"Polygons are always displayed"<<std::endl;
|
||||
else std::cout <<"Polygons are displayed only if there is no geometric representation"<<std::endl;
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
@@ -1523,7 +1523,7 @@ static Standard_Boolean stest(const Handle(Draw_Drawable3D)& d)
|
||||
return d->IsInstance(STANDARD_TYPE(DBRep_DrawableShape));
|
||||
}
|
||||
|
||||
static void ssave(const Handle(Draw_Drawable3D)&d, ostream& OS)
|
||||
static void ssave(const Handle(Draw_Drawable3D)&d, std::ostream& OS)
|
||||
{
|
||||
Handle(DBRep_DrawableShape)
|
||||
N = Handle(DBRep_DrawableShape)::DownCast(d);
|
||||
@@ -1538,7 +1538,7 @@ static void ssave(const Handle(Draw_Drawable3D)&d, ostream& OS)
|
||||
S.Write(N->Shape(),OS);
|
||||
}
|
||||
|
||||
static Handle(Draw_Drawable3D) srestore (istream& IS)
|
||||
static Handle(Draw_Drawable3D) srestore (std::istream& IS)
|
||||
{
|
||||
BRep_Builder B;
|
||||
BRepTools_ShapeSet S(B);
|
||||
@@ -1572,7 +1572,7 @@ static Draw_SaveAndRestore ssr("DBRep_DrawableShape",
|
||||
|
||||
void dumps (const TopoDS_Shape& S)
|
||||
{
|
||||
BRepTools::Dump(S,cout);
|
||||
BRepTools::Dump(S,std::cout);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -96,6 +96,6 @@ void DBRep_Get(char* name, TopoDS_Shape& S)
|
||||
Standard_CString cs = (Standard_CString)n;
|
||||
S = DBRep::Get(cs);
|
||||
if (*name == '.')
|
||||
cout << "Name : " << n << endl;
|
||||
std::cout << "Name : " << n << std::endl;
|
||||
}
|
||||
*/
|
||||
|
@@ -638,8 +638,8 @@ void DBRep_DrawableShape::DrawOn(Draw_Display& dis) const
|
||||
BRep_Tool::Range(E->Edge(), aCheckU1, aCheckU2);
|
||||
if (aCheckU2 < aCheckU1) {
|
||||
// bad orientation
|
||||
cout << "DBRep_DrawableShape : Bad parameters on edge."<<endl;
|
||||
BRepTools::Dump(E->Edge(),cout);
|
||||
std::cout << "DBRep_DrawableShape : Bad parameters on edge."<<std::endl;
|
||||
BRepTools::Dump(E->Edge(),std::cout);
|
||||
ite.Next();
|
||||
continue;
|
||||
}
|
||||
@@ -1100,7 +1100,7 @@ void DBRep_DrawableShape::display(const Handle(Poly_Triangulation)& T,
|
||||
|
||||
// Display the edges
|
||||
const TColgp_Array1OfPnt& Nodes = T->Nodes();
|
||||
// cout<<"nb nodes = "<<Nodes.Length()<<endl;
|
||||
// std::cout<<"nb nodes = "<<Nodes.Length()<<std::endl;
|
||||
|
||||
// free edges
|
||||
Standard_Integer nn;
|
||||
|
@@ -118,14 +118,14 @@ Geom2dHatch_Hatcher (Geom2dHatch_Intersector (IntersectorConfusion,
|
||||
if (PCurve.IsNull())
|
||||
{
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "DBRep_IsoBuilder : PCurve is null\n";
|
||||
std::cout << "DBRep_IsoBuilder : PCurve is null\n";
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
else if (U1 == U2)
|
||||
{
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "DBRep_IsoBuilder PCurve : U1==U2\n";
|
||||
std::cout << "DBRep_IsoBuilder PCurve : U1==U2\n";
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -149,8 +149,8 @@ Geom2dHatch_Hatcher (Geom2dHatch_Intersector (IntersectorConfusion,
|
||||
U2 - TrimPCurve->BasisCurve()->LastParameter() > Precision::PConfusion())
|
||||
{
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "DBRep_IsoBuilder TrimPCurve : parameters out of range\n";
|
||||
cout << " U1(" << U1 << "), Umin(" << PCurve->FirstParameter()
|
||||
std::cout << "DBRep_IsoBuilder TrimPCurve : parameters out of range\n";
|
||||
std::cout << " U1(" << U1 << "), Umin(" << PCurve->FirstParameter()
|
||||
<< "), U2(" << U2 << "), Umax(" << PCurve->LastParameter() << ")\n";
|
||||
#endif
|
||||
return;
|
||||
@@ -161,32 +161,32 @@ Geom2dHatch_Hatcher (Geom2dHatch_Intersector (IntersectorConfusion,
|
||||
if (PCurve->FirstParameter() - U1 > Precision::PConfusion())
|
||||
{
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "DBRep_IsoBuilder PCurve : parameters out of range\n";
|
||||
cout << " U1(" << U1 << "), Umin(" << PCurve->FirstParameter() << ")\n";
|
||||
std::cout << "DBRep_IsoBuilder PCurve : parameters out of range\n";
|
||||
std::cout << " U1(" << U1 << "), Umin(" << PCurve->FirstParameter() << ")\n";
|
||||
#endif
|
||||
U1 = PCurve->FirstParameter();
|
||||
}
|
||||
if (PCurve->FirstParameter() - U2 > Precision::PConfusion())
|
||||
{
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "DBRep_IsoBuilder PCurve : parameters out of range\n";
|
||||
cout << " U2(" << U2 << "), Umin(" << PCurve->FirstParameter() << ")\n";
|
||||
std::cout << "DBRep_IsoBuilder PCurve : parameters out of range\n";
|
||||
std::cout << " U2(" << U2 << "), Umin(" << PCurve->FirstParameter() << ")\n";
|
||||
#endif
|
||||
U2 = PCurve->FirstParameter();
|
||||
}
|
||||
if (U1 - PCurve->LastParameter() > Precision::PConfusion())
|
||||
{
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "DBRep_IsoBuilder PCurve : parameters out of range\n";
|
||||
cout << " U1(" << U1 << "), Umax(" << PCurve->LastParameter() << ")\n";
|
||||
std::cout << "DBRep_IsoBuilder PCurve : parameters out of range\n";
|
||||
std::cout << " U1(" << U1 << "), Umax(" << PCurve->LastParameter() << ")\n";
|
||||
#endif
|
||||
U1 = PCurve->LastParameter();
|
||||
}
|
||||
if (U2 - PCurve->LastParameter() > Precision::PConfusion())
|
||||
{
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "DBRep_IsoBuilder PCurve : parameters out of range\n";
|
||||
cout << " U2(" << U2 << "), Umax(" << PCurve->LastParameter() << ")\n";
|
||||
std::cout << "DBRep_IsoBuilder PCurve : parameters out of range\n";
|
||||
std::cout << " U2(" << U2 << "), Umax(" << PCurve->LastParameter() << ")\n";
|
||||
#endif
|
||||
U2 = PCurve->LastParameter();
|
||||
}
|
||||
@@ -296,13 +296,13 @@ void DBRep_IsoBuilder::LoadIsos (const Handle(DBRep_Face)& Face) const
|
||||
if (UInd != 0) {
|
||||
Standard_Real UPrm = myUPrm.Value (UIso) ;
|
||||
if (!IsDone (UInd)) {
|
||||
cout << "DBRep_IsoBuilder:: U iso of parameter: " << UPrm ;
|
||||
std::cout << "DBRep_IsoBuilder:: U iso of parameter: " << UPrm ;
|
||||
switch (Status (UInd)) {
|
||||
case HatchGen_NoProblem : cout << " No Problem" << endl ; break ;
|
||||
case HatchGen_TrimFailure : cout << " Trim Failure" << endl ; break ;
|
||||
case HatchGen_TransitionFailure : cout << " Transition Failure" << endl ; break ;
|
||||
case HatchGen_IncoherentParity : cout << " Incoherent Parity" << endl ; break ;
|
||||
case HatchGen_IncompatibleStates : cout << " Incompatible States" << endl ; break ;
|
||||
case HatchGen_NoProblem : std::cout << " No Problem" << std::endl ; break ;
|
||||
case HatchGen_TrimFailure : std::cout << " Trim Failure" << std::endl ; break ;
|
||||
case HatchGen_TransitionFailure : std::cout << " Transition Failure" << std::endl ; break ;
|
||||
case HatchGen_IncoherentParity : std::cout << " Incoherent Parity" << std::endl ; break ;
|
||||
case HatchGen_IncompatibleStates : std::cout << " Incompatible States" << std::endl ; break ;
|
||||
}
|
||||
} else {
|
||||
Standard_Integer NbDom = Geom2dHatch_Hatcher::NbDomains (UInd) ;
|
||||
@@ -322,13 +322,13 @@ void DBRep_IsoBuilder::LoadIsos (const Handle(DBRep_Face)& Face) const
|
||||
if (VInd != 0) {
|
||||
Standard_Real VPrm = myVPrm.Value (VIso) ;
|
||||
if (!IsDone (VInd)) {
|
||||
cout << "DBRep_IsoBuilder:: V iso of parameter: " << VPrm ;
|
||||
std::cout << "DBRep_IsoBuilder:: V iso of parameter: " << VPrm ;
|
||||
switch (Status (VInd)) {
|
||||
case HatchGen_NoProblem : cout << " No Problem" << endl ; break ;
|
||||
case HatchGen_TrimFailure : cout << " Trim Failure" << endl ; break ;
|
||||
case HatchGen_TransitionFailure : cout << " Transition Failure" << endl ; break ;
|
||||
case HatchGen_IncoherentParity : cout << " Incoherent Parity" << endl ; break ;
|
||||
case HatchGen_IncompatibleStates : cout << " Incompatible States" << endl ; break ;
|
||||
case HatchGen_NoProblem : std::cout << " No Problem" << std::endl ; break ;
|
||||
case HatchGen_TrimFailure : std::cout << " Trim Failure" << std::endl ; break ;
|
||||
case HatchGen_TransitionFailure : std::cout << " Transition Failure" << std::endl ; break ;
|
||||
case HatchGen_IncoherentParity : std::cout << " Incoherent Parity" << std::endl ; break ;
|
||||
case HatchGen_IncompatibleStates : std::cout << " Incompatible States" << std::endl ; break ;
|
||||
}
|
||||
} else {
|
||||
Standard_Integer NbDom = Geom2dHatch_Hatcher::NbDomains (VInd) ;
|
||||
|
Reference in New Issue
Block a user