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

@@ -35,7 +35,7 @@ Standard_Boolean ShapeProcess::RegisterOperator (const Standard_CString name,
{
if (aMapOfOperators.IsBound(name)) {
#ifdef OCCT_DEBUG
cout << "Warning: operator with name " << name << " is already registered!" << endl;
std::cout << "Warning: operator with name " << name << " is already registered!" << std::endl;
#endif
return Standard_False;
}
@@ -53,7 +53,7 @@ Standard_Boolean ShapeProcess::FindOperator (const Standard_CString name,
{
if (!aMapOfOperators.IsBound(name)) {
#ifdef OCCT_DEBUG
cout << "Error: no operator with name " << name << " registered!" << endl;
std::cout << "Error: no operator with name " << name << " registered!" << std::endl;
#endif
return Standard_False;
}
@@ -75,7 +75,7 @@ Standard_Boolean ShapeProcess::Perform (const Handle(ShapeProcess_Context)& cont
TCollection_AsciiString sequence;
if ( ! context->GetString ( "exec.op", sequence ) ) {
#ifdef OCCT_DEBUG
cout << "Error: ShapeProcess_Performer::Perform: sequence not defined for " << seq << endl;
std::cout << "Error: ShapeProcess_Performer::Perform: sequence not defined for " << seq << std::endl;
#endif
if ( context->TraceLevel() >0 ) {
Message_Msg SMSG3 ("SP.Sequence.Warn.NoSeq"); // Sequence %s not found

View File

@@ -117,8 +117,8 @@ Handle(Resource_Manager) ShapeProcess_Context::LoadResourceManager (const Standa
}
if ( sRC.IsNull() ) {
#ifdef OCCT_DEBUG
cout << "Info: ShapeProcess_Context: Reload Resource_Manager: "
<< sName.ToCString() << " -> " << name << endl;
std::cout << "Info: ShapeProcess_Context: Reload Resource_Manager: "
<< sName.ToCString() << " -> " << name << std::endl;
#endif
sRC = new Resource_Manager ( name );
if (!isFileModified)
@@ -205,7 +205,7 @@ Standard_Boolean ShapeProcess_Context::GetString (const Standard_CString param,
Handle(TCollection_HAsciiString) pname = MakeName ( myScope, param );
if ( ! myRC->Find ( pname->ToCString() ) ) {
#ifdef OCCT_DEBUG
cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << pname->ToCString() << " is not defined" << endl;
std::cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << pname->ToCString() << " is not defined" << std::endl;
#endif
return Standard_False;
}
@@ -239,7 +239,7 @@ Standard_Boolean ShapeProcess_Context::GetReal (const Standard_CString param,
ref.RightAdjust();
if ( ! myRC->Find ( ref.ToCString() ) ) {
#ifdef OCCT_DEBUG
cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << ref.ToCString() << " is not defined" << endl;
std::cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << ref.ToCString() << " is not defined" << std::endl;
#endif
return Standard_False;
}
@@ -250,7 +250,7 @@ Standard_Boolean ShapeProcess_Context::GetReal (const Standard_CString param,
}
}
#ifdef OCCT_DEBUG
cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << param << " is neither Real nor reference to Real";
std::cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << param << " is neither Real nor reference to Real";
#endif
return Standard_False;
}
@@ -281,7 +281,7 @@ Standard_Boolean ShapeProcess_Context::GetInteger (const Standard_CString param,
ref.RightAdjust();
if ( ! myRC->Find ( ref.ToCString() ) ) {
#ifdef OCCT_DEBUG
cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << ref.ToCString() << " is not defined" << endl;
std::cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << ref.ToCString() << " is not defined" << std::endl;
#endif
return Standard_False;
}
@@ -292,7 +292,7 @@ Standard_Boolean ShapeProcess_Context::GetInteger (const Standard_CString param,
}
}
#ifdef OCCT_DEBUG
cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << param << " is neither Integer nor reference to Integer";
std::cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << param << " is neither Integer nor reference to Integer";
#endif
return Standard_False;
}
@@ -313,8 +313,8 @@ Standard_Boolean ShapeProcess_Context::GetBoolean (const Standard_CString param,
}
catch (Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
cout << "Warning: ShapeProcess_Context::GetInteger(): " << param << ": ";
anException.Print(cout); cout << endl;
std::cout << "Warning: ShapeProcess_Context::GetInteger(): " << param << ": ";
anException.Print(std::cout); std::cout << std::endl;
#endif
(void)anException;
}
@@ -372,8 +372,8 @@ Standard_CString ShapeProcess_Context::StringVal (const Standard_CString param,
}
catch (Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
cout << "Warning: ShapeProcess_Context::GetInteger(): " << param << ": ";
anException.Print(cout); cout << endl;
std::cout << "Warning: ShapeProcess_Context::GetInteger(): " << param << ": ";
anException.Print(std::cout); std::cout << std::endl;
#endif
(void)anException;
}

View File

@@ -207,7 +207,7 @@ static Standard_Boolean splitangle (const Handle(ShapeProcess_Context)& context)
if ( ! SDA.Perform() && SDA.Status (ShapeExtend_FAIL) ) {
#ifdef OCCT_DEBUG
cout<<"ShapeDivideAngle failed"<<endl;
std::cout<<"ShapeDivideAngle failed"<<std::endl;
#endif
return Standard_False;
}
@@ -382,7 +382,7 @@ static Standard_Boolean shapetobezier (const Handle(ShapeProcess_Context)& conte
if ( ! SCB.Perform() && SCB.Status (ShapeExtend_FAIL) ) {
#ifdef OCCT_DEBUG
cout<<"Shape::ShapeConvertToBezier failed"<<endl; // !!!!
std::cout<<"Shape::ShapeConvertToBezier failed"<<std::endl; // !!!!
#endif
return Standard_False;
}
@@ -458,7 +458,7 @@ static Standard_Boolean splitcontinuity (const Handle(ShapeProcess_Context)& con
if ( ! tool.Perform() && tool.Status (ShapeExtend_FAIL) ) {
#ifdef OCCT_DEBUG
cout<<"SplitContinuity failed"<<endl;
std::cout<<"SplitContinuity failed"<<std::endl;
#endif
return Standard_False;
}
@@ -500,7 +500,7 @@ static Standard_Boolean splitclosedfaces (const Handle(ShapeProcess_Context)& co
tool.SetSurfaceSegmentMode(hasSeg);
if ( ! tool.Perform() && tool.Status (ShapeExtend_FAIL) ) {
#ifdef OCCT_DEBUG
cout<<"Splitting of closed faces failed"<<endl;
std::cout<<"Splitting of closed faces failed"<<std::endl;
#endif
return Standard_False;
}
@@ -819,7 +819,7 @@ static Standard_Boolean spltclosededges (const Handle(ShapeProcess_Context)& con
if ( ! tool.Perform() && tool.Status (ShapeExtend_FAIL) ) {
#ifdef OCCT_DEBUG
cout<<"Splitting of closed edges failed"<<endl;
std::cout<<"Splitting of closed edges failed"<<std::endl;
#endif
return Standard_False;
}

View File

@@ -160,14 +160,14 @@ void ShapeProcess_ShapeContext::SetResult (const TopoDS_Shape &res)
#ifdef OCCT_DEBUG
static void DumpMap (const TopTools_DataMapOfShapeShape &map)
{
cout << "----" << endl;
cout << "Map:" << endl;
std::cout << "----" << std::endl;
std::cout << "Map:" << std::endl;
for (TopTools_DataMapIteratorOfDataMapOfShapeShape It (map); It.More(); It.Next()) {
TopoDS_Shape S0 = It.Key(), S = It.Value();
cout << S0.TShape()->DynamicType()->Name() << "\t" << *(void**)&S0.TShape() <<
" \t-> " << S.TShape()->DynamicType()->Name() << "\t" << *(void**)&S.TShape() << endl;
std::cout << S0.TShape()->DynamicType()->Name() << "\t" << *(void**)&S0.TShape() <<
" \t-> " << S.TShape()->DynamicType()->Name() << "\t" << *(void**)&S.TShape() << std::endl;
}
cout << "----" << endl;
std::cout << "----" << std::endl;
}
#endif
*/
@@ -258,7 +258,7 @@ void ShapeProcess_ShapeContext::RecordModification (const TopTools_DataMapOfShap
RecModif ( myShape, repl, msg, myMap, myMsg, myUntil );
if ( myMap.IsBound(myShape) ) myResult = myMap.Find ( myShape );
#ifdef OCCT_DEBUG
// cout << "Modifier: " << endl; DumpMap (myMap);
// std::cout << "Modifier: " << std::endl; DumpMap (myMap);
#endif
}
@@ -333,7 +333,7 @@ void ShapeProcess_ShapeContext::RecordModification (const Handle(ShapeBuild_ReSh
myResult.Location(myShape.Location());
}
#ifdef OCCT_DEBUG
// cout << "ReShape: " << endl; DumpMap (myMap);
// std::cout << "ReShape: " << std::endl; DumpMap (myMap);
#endif
}