mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0026922: Huge performance issue writing data to the output stream
Test case for issue CR26922 Correction of literal (char to string)
This commit is contained in:
@@ -97,9 +97,9 @@ IGESData_IGESDumper::IGESData_IGESDumper
|
||||
S<<" ) ****"<<endl;
|
||||
|
||||
// **** Entity 1234:D2467 ** Type:102 Form:56 ** CompositeCurve **
|
||||
S<<"\n"<<"**** Entity "; PrintShort (ent,S); S<<endl;
|
||||
S<<"\n**** Entity "; PrintShort (ent,S); S<<endl;
|
||||
|
||||
S<<" Directory Part"<<"\n";
|
||||
S<<" Directory Part\n";
|
||||
// ** Status : Blank:1 Subordinate:2 UseFlag:3 Hierarchy:4
|
||||
if (own >= 2)
|
||||
S <<"** Status Number : Blank:"<<ent->BlankStatus()
|
||||
@@ -126,7 +126,7 @@ IGESData_IGESDumper::IGESData_IGESDumper
|
||||
if (ent->HasStructure())
|
||||
{ S<<"** Structure :"; PrintDNum (ent->Structure(),S); S<<"\n"; }
|
||||
|
||||
S<<"\n"<<" Graphic Attributes"<<"\n";
|
||||
S<<"\n Graphic Attributes\n";
|
||||
if (ent->DefLineFont() == IGESData_DefValue)
|
||||
{ S<<"** LineFont Value:"<<ent->RankLineFont()<<"\n"; }
|
||||
else if (ent->DefLineFont() == IGESData_DefReference)
|
||||
@@ -150,7 +150,7 @@ IGESData_IGESDumper::IGESData_IGESDumper
|
||||
S<<endl;
|
||||
|
||||
if (own > 3) {
|
||||
S<<"**** Own Data ****"<<"\n\n";
|
||||
S<<"**** Own Data ****\n\n";
|
||||
OwnDump(ent,S,own);
|
||||
}
|
||||
}
|
||||
@@ -161,7 +161,7 @@ IGESData_IGESDumper::IGESData_IGESDumper
|
||||
Standard_Integer nb = iter.NbEntities();
|
||||
Standard_Boolean iasuit = (nb > 0);
|
||||
if (nb > 0) {
|
||||
S<<"\n"<<"**** Properties (nb:"<<nb<<") ****"<<"\n";
|
||||
S<<"\n**** Properties (nb:"<<nb<<") ****\n";
|
||||
for (;iter.More(); iter.Next()) {
|
||||
DeclareAndCast(IGESData_IGESEntity,ent2,iter.Value());
|
||||
Dump (ent2,S,att,-1);
|
||||
@@ -171,14 +171,14 @@ IGESData_IGESDumper::IGESData_IGESDumper
|
||||
nb = iter.NbEntities();
|
||||
if (nb > 0) iasuit = Standard_True;
|
||||
if (nb > 0) {
|
||||
S<<"\n"<<"**** Associativities (nb:"<<nb<<") ****"<<"\n";
|
||||
S<<"\n**** Associativities (nb:"<<nb<<") ****\n";
|
||||
for (;iter.More(); iter.Next()) {
|
||||
DeclareAndCast(IGESData_IGESEntity,ent2,iter.Value());
|
||||
Dump(ent2,S,att,-1);
|
||||
}
|
||||
}
|
||||
if (iasuit) { if (att <= 1) S << "\n"; }
|
||||
S<<"\n"<<"**** End of Dump ****"<<"\n"<<endl;
|
||||
S<<"\n**** End of Dump ****\n"<<endl;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -78,11 +78,11 @@ void IGESData_IGESModel::DumpHeader
|
||||
Standard_Integer ns = thestart->Length();
|
||||
S<<"**** Dump of IGES Model , Start and Global Sections ****"<<endl;
|
||||
if (ns > 0) {
|
||||
S << "**** Start Section : "<<ns<<" Line(s) ****"<<"\n";
|
||||
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 << "\n"<<"**** Global Section ****"<<"\n";
|
||||
S << "\n**** Global Section ****\n";
|
||||
char sep = theheader.Separator();
|
||||
if (sep == ',') S << "[ 1] Default Separator : " << sep;
|
||||
else S << "[ 1] Non Default Separator : " << sep;
|
||||
@@ -128,7 +128,7 @@ void IGESData_IGESModel::DumpHeader
|
||||
S << "[19] Resolution : " << theheader.Resolution()<<"\n";
|
||||
if (theheader.HasMaxCoord())
|
||||
S<<"[20] Maximum Coord : " << theheader.MaxCoord() << "\n\n";
|
||||
else S<<"[20] Maximum Coord not defined"<<"\n\n";
|
||||
else S<<"[20] Maximum Coord not defined\n\n";
|
||||
|
||||
str = theheader.AuthorName();
|
||||
if (!str.IsNull()) S<<"[21] Author : "<<str->ToCString()<<"\n";
|
||||
@@ -139,7 +139,7 @@ void IGESData_IGESModel::DumpHeader
|
||||
<< IGESData_BasicEditor::IGESVersionName(num);
|
||||
|
||||
num = theheader.DraftingStandard();
|
||||
S << "\n"<<"[24] Drafting Standard : " << num;
|
||||
S << "\n[24] Drafting Standard : " << num;
|
||||
if (num > 0) S<< " -> Name : " << IGESData_BasicEditor::DraftingName(num);
|
||||
S<<endl;
|
||||
|
||||
|
Reference in New Issue
Block a user