mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +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:
@@ -142,7 +142,7 @@ static Handle(IGESData_DefaultSpecific) speci;
|
||||
gsys->AssignCat
|
||||
#ifdef HPUX
|
||||
("HP-UX");
|
||||
cout<<"-- OSD_Path::SystemVersion, does not work well on HP-UX"<<endl;
|
||||
std::cout<<"-- OSD_Path::SystemVersion, does not work well on HP-UX"<<std::endl;
|
||||
#endif
|
||||
#ifndef HPUX
|
||||
(host.SystemVersion().ToCString());
|
||||
|
@@ -196,7 +196,7 @@ Standard_Boolean IGESData_BasicEditor::SetUnitName (const Standard_CString name)
|
||||
Standard_Integer nums = themodel->Number(sh.Value());
|
||||
if (igt == 402 || igt == 404) subs.SetValue (nums,subs.Value(nums) | 2);
|
||||
else subs.SetValue (nums,subs.Value(nums) | 1);
|
||||
//// cout<<"ComputeStatus : nums = "<<nums<<" ->"<<subs.Value(nums)<<endl;
|
||||
//// std::cout<<"ComputeStatus : nums = "<<nums<<" ->"<<subs.Value(nums)<<std::endl;
|
||||
}
|
||||
}
|
||||
// UseFlag (a propager)
|
||||
@@ -232,7 +232,7 @@ Standard_Boolean IGESData_BasicEditor::SetUnitName (const Standard_CString name)
|
||||
Standard_Integer uf = ent->UseFlag();
|
||||
if (uf == 0) uf = G.Status(i);
|
||||
Standard_Integer hy = ent->HierarchyStatus();
|
||||
//// cout<<" Ent.n0."<<i<<" Subord="<<subs.Value(i)<<" Use="<<uf<<endl;
|
||||
//// std::cout<<" Ent.n0."<<i<<" Subord="<<subs.Value(i)<<" Use="<<uf<<std::endl;
|
||||
ent->InitStatus(bl,subs.Value(i),uf,hy);
|
||||
}
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ IGESData_DefaultSpecific::IGESData_DefaultSpecific ()
|
||||
|
||||
Standard_Integer dstat = lent->DirStatus();
|
||||
if (dstat != 0) S
|
||||
<< " -- Directory Entry Error Status = " << dstat << " --" << endl;
|
||||
<< " -- Directory Entry Error Status = " << dstat << " --" << Message_EndLine;
|
||||
Handle(Interface_UndefinedContent) cont = lent->UndefinedContent();
|
||||
Standard_Integer nb = cont->NbParams();
|
||||
S << " UNDEFINED ENTITY ...\n"<<nb
|
||||
@@ -54,7 +54,7 @@ IGESData_DefaultSpecific::IGESData_DefaultSpecific ()
|
||||
dumper.PrintDNum(anent,S);
|
||||
}
|
||||
else { S<<" ["<<i<<"]=" << cont->ParamValue(i); }
|
||||
if ( i == (i%5)*5) S << endl;
|
||||
if ( i == (i%5)*5) S << Message_EndLine;
|
||||
}
|
||||
S << endl;
|
||||
S << Message_EndLine;
|
||||
}
|
||||
|
@@ -94,10 +94,10 @@ IGESData_IGESDumper::IGESData_IGESDumper
|
||||
case 5 : S<<"Complete"; break;
|
||||
default : S<<"Complete + Transformed Values"; break;
|
||||
}
|
||||
S<<" ) ****"<<endl;
|
||||
S<<" ) ****"<<Message_EndLine;
|
||||
|
||||
// **** Entity 1234:D2467 ** Type:102 Form:56 ** CompositeCurve **
|
||||
S<<"\n**** Entity "; PrintShort (ent,S); S<<endl;
|
||||
S<<"\n**** Entity "; PrintShort (ent,S); S<<Message_EndLine;
|
||||
|
||||
S<<" Directory Part\n";
|
||||
// ** Status : Blank:1 Subordinate:2 UseFlag:3 Hierarchy:4
|
||||
@@ -109,7 +109,7 @@ IGESData_IGESDumper::IGESData_IGESDumper
|
||||
if (own >= 1) {
|
||||
if (ent->HasShortLabel()) S<<"**** Label :"<<ent->ShortLabel()->ToCString();
|
||||
if (ent->HasSubScriptNumber()) S<<" SubScript:"<<ent->SubScriptNumber();
|
||||
if (ent->HasShortLabel()) S<<endl;
|
||||
if (ent->HasShortLabel()) S<<Message_EndLine;
|
||||
|
||||
if (ent->HasTransf())
|
||||
{ S<<"** Transf.Matrix :"; PrintDNum(ent->Transf(),S); S<<"\n"; }
|
||||
@@ -141,13 +141,13 @@ IGESData_IGESDumper::IGESData_IGESDumper
|
||||
if (ent->LineWeightNumber() != 0) {
|
||||
S <<"** LineWeight Num:"<<ent->LineWeightNumber();
|
||||
if (diratt > 0) S<<" -> Value:"<<ent->LineWeight();
|
||||
S<<endl;
|
||||
S<<Message_EndLine;
|
||||
}
|
||||
if (ent->DefColor() == IGESData_DefValue)
|
||||
{ S<<"** Color Value :"<<ent->RankColor(); }
|
||||
else if (ent->DefColor() == IGESData_DefReference)
|
||||
{ S<<"** Color Ref :"; PrintDNum (ent->Color(),S); }
|
||||
S<<endl;
|
||||
S<<Message_EndLine;
|
||||
|
||||
if (own > 3) {
|
||||
S<<"**** Own Data ****\n\n";
|
||||
@@ -178,7 +178,7 @@ IGESData_IGESDumper::IGESData_IGESDumper
|
||||
}
|
||||
}
|
||||
if (iasuit) { if (att <= 1) S << "\n"; }
|
||||
S<<"\n**** End of Dump ****\n"<<endl;
|
||||
S<<"\n**** End of Dump ****\n"<<Message_EndLine;
|
||||
}
|
||||
|
||||
|
||||
@@ -191,8 +191,8 @@ IGESData_IGESDumper::IGESData_IGESDumper
|
||||
if (thelib.Select(ent,module,CN))
|
||||
module->OwnDump(CN,ent,*this,S,own);
|
||||
else if (themodel.IsNull())
|
||||
S <<" **** Dump impossible. Type "<<ent->DynamicType()->Name()<<endl;
|
||||
S <<" **** Dump impossible. Type "<<ent->DynamicType()->Name()<<Message_EndLine;
|
||||
else
|
||||
S <<" **** Dump Impossible, n0:id:"<<themodel->Number(ent)<<":D"
|
||||
<<themodel->DNum(ent)<<" Type "<<ent->DynamicType()->Name()<<endl;
|
||||
<<themodel->DNum(ent)<<" Type "<<ent->DynamicType()->Name()<<Message_EndLine;
|
||||
}
|
||||
|
@@ -78,11 +78,11 @@ void IGESData_IGESModel::DumpHeader
|
||||
(const Handle(Message_Messenger)& S, const Standard_Integer ) const
|
||||
{
|
||||
Standard_Integer ns = thestart->Length();
|
||||
S<<"**** Dump of IGES Model , Start and Global Sections ****"<<endl;
|
||||
S<<"**** Dump of IGES Model , Start and Global Sections ****"<<Message_EndLine;
|
||||
if (ns > 0) {
|
||||
S << "**** Start Section : "<<ns<<" Line(s) ****\n";
|
||||
for (Standard_Integer i = 1; i <= ns; i ++)
|
||||
S<<"["<<(i<10 ? " ": "")<<i<<"]:"<<thestart->Value(i)->ToCString()<<endl;
|
||||
S<<"["<<(i<10 ? " ": "")<<i<<"]:"<<thestart->Value(i)->ToCString()<<Message_EndLine;
|
||||
}
|
||||
S << "\n**** Global Section ****\n";
|
||||
char sep = theheader.Separator();
|
||||
@@ -94,16 +94,16 @@ void IGESData_IGESModel::DumpHeader
|
||||
S<<"\n";
|
||||
Handle(TCollection_HAsciiString) str;
|
||||
str = theheader.SendName();
|
||||
if (!str.IsNull()) S<<"[ 3] Sender : "<<str->ToCString()<<endl;
|
||||
if (!str.IsNull()) S<<"[ 3] Sender : "<<str->ToCString()<<Message_EndLine;
|
||||
str = theheader.FileName();
|
||||
if (!str.IsNull()) S<<"[ 4] (recorded) File Name : "<<str->ToCString()<<endl;
|
||||
if (!str.IsNull()) S<<"[ 4] (recorded) File Name : "<<str->ToCString()<<Message_EndLine;
|
||||
str = theheader.SystemId();
|
||||
if (!str.IsNull()) S<<"[ 5] System Identification : "<<str->ToCString()<<endl;
|
||||
if (!str.IsNull()) S<<"[ 5] System Identification : "<<str->ToCString()<<Message_EndLine;
|
||||
str = theheader.InterfaceVersion();
|
||||
if (!str.IsNull()) S<<"[ 6] Interface Version : "<<str->ToCString()<<endl;
|
||||
S<<endl;
|
||||
if (!str.IsNull()) S<<"[ 6] Interface Version : "<<str->ToCString()<<Message_EndLine;
|
||||
S<<Message_EndLine;
|
||||
S << "[ 7] Integer Bits : " << theheader.IntegerBits()
|
||||
<< " Features for Reals : " << endl;
|
||||
<< " Features for Reals : " << Message_EndLine;
|
||||
S << "[ 8] Single Max.Power(10) : " << theheader.MaxPower10Single();
|
||||
S << " [ 9] Digits : " << theheader.MaxDigitsSingle()<<"\n";
|
||||
S << "[10] Double Max.Power(10) : " << theheader.MaxPower10Double();
|
||||
@@ -143,21 +143,21 @@ void IGESData_IGESModel::DumpHeader
|
||||
num = theheader.DraftingStandard();
|
||||
S << "\n[24] Drafting Standard : " << num;
|
||||
if (num > 0) S<< " -> Name : " << IGESData_BasicEditor::DraftingName(num);
|
||||
S<<endl;
|
||||
S<<Message_EndLine;
|
||||
|
||||
if (theheader.HasLastChangeDate()) {
|
||||
str = theheader.LastChangeDate();
|
||||
S << "[25] Last Change Date : " << str->ToCString()
|
||||
<<" i.e. "<<IGESData_GlobalSection::NewDateString(str,1)->ToCString()<<endl;
|
||||
<<" i.e. "<<IGESData_GlobalSection::NewDateString(str,1)->ToCString()<<Message_EndLine;
|
||||
}
|
||||
else S<<"[25] Last Change Date not defined (version IGES < 5.1)" << endl;
|
||||
else S<<"[25] Last Change Date not defined (version IGES < 5.1)" << Message_EndLine;
|
||||
|
||||
if (theheader.HasApplicationProtocol()) {
|
||||
str = theheader.ApplicationProtocol();
|
||||
S << "[26] Application Protocol : " << str->ToCString() <<endl;
|
||||
S << "[26] Application Protocol : " << str->ToCString() <<Message_EndLine;
|
||||
}
|
||||
|
||||
S << " **** End of Dump ****"<<endl;
|
||||
S << " **** End of Dump ****"<<Message_EndLine;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -121,7 +121,7 @@ void IGESData_IGESWriter::SendStartLine (const Standard_CString startline)
|
||||
|
||||
Standard_Integer nb = themodel->NbEntities();
|
||||
#ifdef PATIENCELOG
|
||||
sout<< " IGESWriter : " << nb << " Entities (* = 1000 Ent.s)" << endl;
|
||||
sout<< " IGESWriter : " << nb << " Entities (* = 1000 Ent.s)" << std::endl;
|
||||
#endif
|
||||
SectionS ();
|
||||
Standard_Integer ns = themodel->NbStartLines();
|
||||
@@ -133,11 +133,11 @@ void IGESData_IGESWriter::SendStartLine (const Standard_CString startline)
|
||||
Handle(IGESData_IGESEntity) ent = themodel->Entity(i);
|
||||
Handle(IGESData_IGESEntity) cnt = ent;
|
||||
#ifdef PATIENCELOG
|
||||
if (i % 1000 == 1) cout << "*" << flush;
|
||||
if (i % 1000 == 1) std::cout << "*" << std::flush;
|
||||
#endif
|
||||
// Attention aux cas d erreur : contenu redefini
|
||||
if (themodel->IsRedefinedContent(i)) {
|
||||
sout << " -- IGESWriter : Erroneous Entity N0."<<i<<" --"<<endl;
|
||||
sout << " -- IGESWriter : Erroneous Entity N0."<<i<<" --"<<Message_EndLine;
|
||||
Handle(Interface_ReportEntity) rep = themodel->ReportEntity(i);
|
||||
if (!rep.IsNull()) cnt = GetCasted(IGESData_IGESEntity,rep->Content());
|
||||
if (cnt.IsNull()) cnt = ent; // secours
|
||||
@@ -156,14 +156,14 @@ void IGESData_IGESWriter::SendStartLine (const Standard_CString startline)
|
||||
undent->WriteOwnParams (*this);
|
||||
}
|
||||
else sout<<" -- IGESWriter : Not Processed for n0."<<i<<" in file, Type "
|
||||
<<cnt->TypeNumber()<<" Form "<<cnt->FormNumber()<<endl;
|
||||
<<cnt->TypeNumber()<<" Form "<<cnt->FormNumber()<<Message_EndLine;
|
||||
|
||||
Associativities (cnt);
|
||||
Properties (cnt);
|
||||
EndEntity ();
|
||||
}
|
||||
#ifdef PATIENCELOG
|
||||
cout << " Envoi des Entites Termine"<<endl;
|
||||
std::cout << " Envoi des Entites Termine"<<std::endl;
|
||||
#endif
|
||||
SectionT();
|
||||
}
|
||||
@@ -502,12 +502,12 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
|
||||
Standard_Integer nbs = 1;
|
||||
if (thestar.IsNull()) {
|
||||
if (fnes) {
|
||||
S << " *** EUCLID/STRIM DESKTOP CLIPBOARD ***"<<endl;
|
||||
S << " *** EUCLID/STRIM DESKTOP CLIPBOARD ***"<<std::endl;
|
||||
writefnes (S," S0000001");
|
||||
}
|
||||
else S<<" S0000001";
|
||||
// 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12
|
||||
S << endl;
|
||||
S << std::endl;
|
||||
} else {
|
||||
nbs = thestar->Length();
|
||||
for (i = 1; i <= nbs; i ++) {
|
||||
@@ -521,11 +521,11 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
|
||||
S << &blancs[line->Length()];
|
||||
if (fnes) writefnes (S,finlin);
|
||||
else S << finlin;
|
||||
S << endl;
|
||||
S << std::endl;
|
||||
}
|
||||
}
|
||||
#ifdef PATIENCELOG
|
||||
cout << "Global Section : " << flush;
|
||||
std::cout << "Global Section : " << std::flush;
|
||||
#endif
|
||||
isGood = S.good();
|
||||
// Global Section : convertie dans <thehead>
|
||||
@@ -541,19 +541,19 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
|
||||
S << &blancs[line->Length()];
|
||||
if (fnes) writefnes (S,finlin);
|
||||
else S << finlin;
|
||||
S << endl;
|
||||
S << std::endl;
|
||||
isGood = S.good();
|
||||
}
|
||||
if(!isGood)
|
||||
return isGood;
|
||||
#ifdef PATIENCELOG
|
||||
cout << nbg << " lines" << endl;
|
||||
std::cout << nbg << " lines" << std::endl;
|
||||
#endif
|
||||
|
||||
// Directory Section
|
||||
Standard_Integer nbd = thedirs.Upper(); // 0 -> NbEnts
|
||||
#ifdef PATIENCELOG
|
||||
cout << "\nDirectory section : " << nbd << " Entites" << endl;
|
||||
std::cout << "\nDirectory section : " << nbd << " Entites" << std::endl;
|
||||
#endif
|
||||
for (i = 1; i <= nbd && isGood ; i ++) {
|
||||
Standard_Integer v[17]; char res1[9],res2[9],lab[9],num[9];
|
||||
@@ -573,18 +573,18 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
|
||||
if (fnes) writefnes (S,ligne);
|
||||
else S << ligne;
|
||||
S<< "\n";
|
||||
// cout << "Ent.no "<<i<<" No en P "<<thepnum.Value(i)<<
|
||||
// " Lignes P:"<<thepnum.Value(i+1)-thepnum.Value(i)<<endl;
|
||||
// std::cout << "Ent.no "<<i<<" No en P "<<thepnum.Value(i)<<
|
||||
// " Lignes P:"<<thepnum.Value(i+1)-thepnum.Value(i)<<std::endl;
|
||||
// for (j = 0; j < 17; j ++) S<<v[j]<<" ";
|
||||
// S<<res1<<res2<<" label:"<<lab<<" subnum:"<<num<<endl;
|
||||
// S<<res1<<res2<<" label:"<<lab<<" subnum:"<<num<<std::endl;
|
||||
isGood = S.good();
|
||||
}
|
||||
if(!isGood)
|
||||
return isGood;
|
||||
// Parameter Section
|
||||
#ifdef PATIENCELOG
|
||||
cout<<" Parameter Section : "<<thepnum.Value(nbd)-1
|
||||
<<" lines (* = 1000 lines) "<<flush;
|
||||
std::cout<<" Parameter Section : "<<thepnum.Value(nbd)-1
|
||||
<<" lines (* = 1000 lines) "<<std::flush;
|
||||
#endif
|
||||
|
||||
blancs[MaxcarsP] = '\0';
|
||||
@@ -601,11 +601,11 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
|
||||
S << &blancs[line->Length()];
|
||||
if (fnes) writefnes (S,finlin);
|
||||
else S << finlin;
|
||||
S << endl;
|
||||
S << std::endl;
|
||||
isGood = S.good();
|
||||
#ifdef PATIENCELOG
|
||||
lignespatience --;
|
||||
if (lignespatience <= 0) { cout<<"*"<<flush; lignespatience = 1000; }
|
||||
if (lignespatience <= 0) { std::cout<<"*"<<std::flush; lignespatience = 1000; }
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -622,8 +622,8 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
|
||||
S.flush();
|
||||
isGood = S.good();
|
||||
#ifdef PATIENCELOG
|
||||
cout <<"\n Section T (lines counts) : G "<<nbg<<" D "<<nbd
|
||||
<<" P "<<thepnum.Value(thepnum.Length())-1<<" T 1"<<endl;
|
||||
std::cout <<"\n Section T (lines counts) : G "<<nbg<<" D "<<nbd
|
||||
<<" P "<<thepnum.Value(thepnum.Length())-1<<" T 1"<<std::endl;
|
||||
#endif
|
||||
return isGood;
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ void IGESData_ReadWriteModule::Read
|
||||
Handle(Interface_Check)& , const Handle(Standard_Transient)& ) const
|
||||
{
|
||||
#ifdef OCCT_DEBUG
|
||||
cout<<"IGESData_ReadWriteModule, Read called"<<endl;
|
||||
std::cout<<"IGESData_ReadWriteModule, Read called"<<std::endl;
|
||||
#endif
|
||||
}
|
||||
// IGESReaderTool fait tout
|
||||
|
Reference in New Issue
Block a user