1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +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

@@ -363,10 +363,10 @@ static Standard_Integer DDataStd_Self (Draw_Interpretor& di,
TDF_Label L;
if (!DDF::FindLabel(DF,arg[2],L)) return 1;
// TDataStd::MakeSelfContained(L,removed);
// if (removed.IsEmpty()) cout << "noone attriburte removed" << endl;
// if (removed.IsEmpty()) std::cout << "noone attriburte removed" << std::endl;
// for (TDF_ListIteratorOfAttributeList it(removed);it.More();it.Next()) {
// TDF_Tool::Entry(it.Value()->Label(),s); cout << s << " ";
// cout << endl;
// TDF_Tool::Entry(it.Value()->Label(),s); std::cout << s << " ";
// std::cout << std::endl;
// }
return 0;
}
@@ -394,7 +394,7 @@ static Standard_Integer DDataStd_Self (Draw_Interpretor& di,
// return 0;
// }
// cout << "Wrong arguments" << endl;
// std::cout << "Wrong arguments" << std::endl;
// return 1;
// }
@@ -466,7 +466,7 @@ static Standard_Integer DDataStd_GetUAttribute (Draw_Interpretor& di,
// if (!DDF::GetDF(arg[1],DF)) return 1;
// TDF_Label label;
// if( !DDF::FindLabel(DF, arg[2], label) ) {
// cout << "No label for entry" << endl;
// std::cout << "No label for entry" << std::endl;
// return 1;
// }
// Handle(TDataStd_Object) O;
@@ -474,18 +474,18 @@ static Standard_Integer DDataStd_GetUAttribute (Draw_Interpretor& di,
// Standard_GUID guidUO(arg[3]);
// if( !label.FindAttribute( TDataStd_Object::GetID(), O) ) {
// cout << "No Object Attribute on label" << endl;
// std::cout << "No Object Attribute on label" << std::endl;
// }
// else {
// cout << "UObject is found with ObjectID = ";
// std::cout << "UObject is found with ObjectID = ";
// O->Find(label, guidUO, UO);
// UO->ObjectID().ShallowDump(cout);
// cout << endl;
// UO->ObjectID().ShallowDump(std::cout);
// std::cout << std::endl;
// }
// return 0;
// }
// cout << "Wrong arguments" << endl;
// std::cout << "Wrong arguments" << std::endl;
// return 1;
// }
@@ -610,7 +610,7 @@ static Standard_Integer DDataStd_GetIntArray (Draw_Interpretor& di,
}
for(Standard_Integer i = A->Lower(); i<=A->Upper(); i++){
//cout << A->Value(i) << endl;
//std::cout << A->Value(i) << std::endl;
di << A->Value(i);
if(i<A->Upper())
di<<" ";
@@ -856,14 +856,14 @@ static Standard_Integer DDataStd_GetRealArray (Draw_Interpretor& di,
if ( !label.FindAttribute(aGuid, A) ) {
di << "There is no TDataStd_RealArray with the specified GUID at the label" << "\n";
#ifdef DEB_DDataStd
aGuid.ShallowDump(cout);
aGuid.ShallowDump(std::cout);
#endif
return 1;
}
for(Standard_Integer i = A->Lower(); i<=A->Upper(); i++){
#ifdef DEB_DDataStd
cout << A->Value(i) << endl;
std::cout << A->Value(i) << std::endl;
#endif
di << A->Value(i);
if(i<A->Upper())
@@ -1415,13 +1415,13 @@ static Standard_Integer DDataStd_KeepUTF (Draw_Interpretor& di,
Standard_CString aFileName(arg[3]);
#ifdef _MSC_VER
ifstream anIS (aFileName, ios::in | ios::binary);
std::ifstream anIS (aFileName, std::ios::in | std::ios::binary);
#else
ifstream anIS (aFileName);
std::ifstream anIS (aFileName);
#endif
if (!anIS) {
// Can not open file
cout << "Error: can't open file " << aFileName <<endl;;
std::cout << "Error: can't open file " << aFileName <<std::endl;;
return 1;
}
char buf[1024];
@@ -1480,21 +1480,21 @@ static Standard_Integer DDataStd_GetUTFtoFile (Draw_Interpretor& di,
}
if(!aES.Length()) {
cout << "Data is not found in the Document" <<endl;
std::cout << "Data is not found in the Document" <<std::endl;
return 1;
}
Standard_CString aFileName(arg[3]);
#ifdef _MSC_VER
ofstream anOS (aFileName, ios::in | ios::binary | ios::ate);
std::ofstream anOS (aFileName, std::ios::in | std::ios::binary | std::ios::ate);
#else
ofstream anOS (aFileName, ios::ate);
std::ofstream anOS (aFileName, std::ios::ate);
#endif
if (!anOS) {
// A problem with the stream
#ifdef OCCT_DEBUG
cout << "Error: problem with the file stream, rdstate = " <<anOS.rdstate() <<endl;
std::cout << "Error: problem with the file stream, rdstate = " <<anOS.rdstate() <<std::endl;
#endif
}
unsigned char prefix[4] = {0xEF,0xBB,0xBF, 0x00};
@@ -1556,7 +1556,7 @@ static Standard_Integer DDataStd_SetByteArray (Draw_Interpretor& di,
for(Standard_Integer i = From; i<=To; ++i) {
Standard_Integer ival = Draw::Atoi(arg[j]);
if(ival < 0 || 255 < ival) {
cout << "Bad value = " << ival<< endl;
std::cout << "Bad value = " << ival<< std::endl;
return 1;
}
A->SetValue(i, (Standard_Byte)ival);
@@ -1592,7 +1592,7 @@ static Standard_Integer DDataStd_SetByteArrayValue (Draw_Interpretor&,
// Check the value.
if(value < 0 || 255 < value) {
cout << "Bad value = " << value << endl;
std::cout << "Bad value = " << value << std::endl;
return 1;
}
@@ -1657,7 +1657,7 @@ static Standard_Integer DDataStd_SetBooleanArray (Draw_Interpretor& di,
Standard_Integer ival = Draw::Atoi(arg[j]);
if(ival > 1)
{
cout << "Bad value (" <<i <<") = " << ival<< ". 0 or 1 is expected." << endl;
std::cout << "Bad value (" <<i <<") = " << ival<< ". 0 or 1 is expected." << std::endl;
return 1;
}
A->SetValue(i, ival != 0);
@@ -1852,7 +1852,7 @@ static Standard_Integer DDataStd_SetBooleanList (Draw_Interpretor& di,
Standard_Integer ival = Draw::Atoi(arg[i]);
if(ival > 1)
{
cout << "Bad value = " << ival<< ". 0 or 1 is expected." << endl;
std::cout << "Bad value = " << ival<< ". 0 or 1 is expected." << std::endl;
return 1;
}
A->Append (ival != 0);
@@ -2475,7 +2475,7 @@ static Standard_Integer DDataStd_GetByteArray (Draw_Interpretor& di,
}
for(Standard_Integer i = A->Lower(); i<=A->Upper(); i++){
//cout << A->Value(i) << endl;
//std::cout << A->Value(i) << std::endl;
di << A->Value(i);
if(i<A->Upper())
di<<" ";
@@ -2973,7 +2973,7 @@ static Standard_Integer DDataStd_SetIntPackedMap (Draw_Interpretor& di,
}
const Handle(TColStd_HPackedMapOfInteger)& aHMap = new TColStd_HPackedMapOfInteger(aMap);
anAtt->ChangeMap(aHMap);
cout << "Map extent = " << anAtt->Extent()<<endl;
std::cout << "Map extent = " << anAtt->Extent()<<std::endl;
return 0;
}
di << "DDataStd_SetIntPackedMap : Error\n";
@@ -3171,7 +3171,7 @@ static Standard_Integer DDataStd_SetIntPHugeMap (Draw_Interpretor& di,
}
const Handle(TColStd_HPackedMapOfInteger)& aHMap = new TColStd_HPackedMapOfInteger(aMap);
anAtt->ChangeMap(aHMap);
cout << "Map extent = " << anAtt->Extent()<<endl;
std::cout << "Map extent = " << anAtt->Extent()<<std::endl;
return 0;
}
di << "DDataStd_SetIntPHugeMap : Error\n";
@@ -3237,7 +3237,7 @@ static Standard_Integer DDataStd_SetNDataIntAr2 (Draw_Interpretor& di,
if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
anAtt = TDataStd_NamedData::Set(aLabel);
if(anAtt.IsNull()) {
cout<< "NamedData attribute is not found or not set" << endl;
std::cout<< "NamedData attribute is not found or not set" << std::endl;
return 1;}
j = 15;
@@ -3285,7 +3285,7 @@ static Standard_Integer DDataStd_SetAsciiString (Draw_Interpretor& di,
return 1;
}
cout << "String = " << anAtt->Get().ToCString() << " is kept in DF" << endl;
std::cout << "String = " << anAtt->Get().ToCString() << " is kept in DF" << std::endl;
return 0;
}
di << "DDataStd_SetAsciiString : Error\n";
@@ -3316,12 +3316,12 @@ static Standard_Integer DDataStd_GetAsciiString (Draw_Interpretor& di,
}
Handle(TDataStd_AsciiString) anAtt;
if( !aLabel.FindAttribute(aGuid, anAtt) ) {
cout << "AsciiString attribute is not found or not set" << endl;
std::cout << "AsciiString attribute is not found or not set" << std::endl;
return 1;
}
#ifdef DEB_DDataStd
cout << "String = " << anAtt->Get().ToCString() << endl;
std::cout << "String = " << anAtt->Get().ToCString() << std::endl;
#endif
di << anAtt->Get().ToCString();
return 0;
@@ -3347,12 +3347,12 @@ static Standard_Integer DDataStd_SetNDataIntegers (Draw_Interpretor& di,
//
// TCollection_ExtendedString aString("123456789 0_abcde");
// Standard_Integer aPos = aString.Search(" ");
// cout << "From Start = " <<aPos<<endl;
// std::cout << "From Start = " <<aPos<<std::endl;
// aPos = aString.SearchFromEnd(" ");
// cout << "From Start = " <<aPos<<endl;
// std::cout << "From Start = " <<aPos<<std::endl;
// TCollection_ExtendedString aValue = aString.Split(aPos);
// cout << "Value = |"<<aValue<<endl;
// cout << "aKey = " << aString << "|"<<endl;
// std::cout << "Value = |"<<aValue<<std::endl;
// std::cout << "aKey = " << aString << "|"<<std::endl;
//
Standard_Integer aNumP = Draw::Atoi(arg[3]), j;
Handle(TDataStd_NamedData) anAtt;
@@ -3393,17 +3393,17 @@ static Standard_Integer DDataStd_GetNDIntegers (Draw_Interpretor& di,
Handle(TDataStd_NamedData) anAtt;
if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt)) {
cout << "NamedData attribute is not found or not set" << endl;
std::cout << "NamedData attribute is not found or not set" << std::endl;
return 1;}
cout <<endl;
cout <<"NamedData attribute at Label = " << arg[2] <<endl;
std::cout <<std::endl;
std::cout <<"NamedData attribute at Label = " << arg[2] <<std::endl;
const TColStd_DataMapOfStringInteger& aMap = anAtt->GetIntegersContainer();
TColStd_DataMapIteratorOfDataMapOfStringInteger itr(aMap);
for (; itr.More(); itr.Next()){
TCollection_ExtendedString aKey(itr.Key());
TCollection_AsciiString aStr(aKey,'?');
Standard_Integer aValue = itr.Value();
cout << "Key = " << aStr.ToCString() << " Value = " <<aValue<<endl;;
std::cout << "Key = " << aStr.ToCString() << " Value = " <<aValue<<std::endl;;
}
return 0;
@@ -3429,16 +3429,16 @@ static Standard_Integer DDataStd_GetNDInteger (Draw_Interpretor& di,
Handle(TDataStd_NamedData) anAtt;
if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt)) {
cout << "NamedData attribute is not found or not set" << endl;
std::cout << "NamedData attribute is not found or not set" << std::endl;
return 1;}
cout <<endl;
cout <<"NamedData attribute at Label = " << arg[2] <<endl;
std::cout <<std::endl;
std::cout <<"NamedData attribute at Label = " << arg[2] <<std::endl;
if(!anAtt->HasInteger(arg[3])) {
cout << "There is no data specified by Key = "<< arg[3] << endl;
std::cout << "There is no data specified by Key = "<< arg[3] << std::endl;
return 1;
} else {
cout << "Key = " << arg[3] << " Value = " <<anAtt->GetInteger(arg[3])<<endl;
std::cout << "Key = " << arg[3] << " Value = " <<anAtt->GetInteger(arg[3])<<std::endl;
if(nb == 5)
Draw::Set(arg[4], anAtt->GetInteger(arg[3]));
return 0;
@@ -3469,7 +3469,7 @@ static Standard_Integer DDataStd_SetNDataReals (Draw_Interpretor& di,
if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
anAtt = TDataStd_NamedData::Set(aLabel);
if(anAtt.IsNull()) {
cout << "NamedData attribute is not found or not set" << endl;;
std::cout << "NamedData attribute is not found or not set" << std::endl;;
return 1;}
j = 4;
@@ -3499,11 +3499,11 @@ static Standard_Integer DDataStd_GetNDReals (Draw_Interpretor& di,
TDF_Label aLabel;
if(!DDF::FindLabel(DF, arg[2], aLabel)) return 1;
cout <<endl;
cout <<"NamedData attribute at Label = " << arg[2] <<endl;
std::cout <<std::endl;
std::cout <<"NamedData attribute at Label = " << arg[2] <<std::endl;
Handle(TDataStd_NamedData) anAtt;
if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt)) {
cout << "NamedData attribute is not found or not set" << endl;
std::cout << "NamedData attribute is not found or not set" << std::endl;
return 1;}
const TDataStd_DataMapOfStringReal& aMap = anAtt->GetRealsContainer();
@@ -3512,7 +3512,7 @@ static Standard_Integer DDataStd_GetNDReals (Draw_Interpretor& di,
TCollection_ExtendedString aKey(itr.Key());
TCollection_AsciiString aStr(aKey,'?');
Standard_Real aValue = itr.Value();
cout << "Key = " << aStr.ToCString() << " Value = " <<aValue<<endl;
std::cout << "Key = " << aStr.ToCString() << " Value = " <<aValue<<std::endl;
}
return 0;
}
@@ -3537,16 +3537,16 @@ static Standard_Integer DDataStd_GetNDReal (Draw_Interpretor& di,
Handle(TDataStd_NamedData) anAtt;
if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt)) {
cout << "NamedData attribute is not found or not set" << endl;
std::cout << "NamedData attribute is not found or not set" << std::endl;
return 1;}
cout <<endl;
cout <<"NamedData attribute at Label = " << arg[2] <<endl;
std::cout <<std::endl;
std::cout <<"NamedData attribute at Label = " << arg[2] <<std::endl;
if(!anAtt->HasReal(arg[3])) {
cout << "There is no data specified by Key = "<< arg[3] << endl;
std::cout << "There is no data specified by Key = "<< arg[3] << std::endl;
return 1;
} else {
cout << "Key = " << arg[3] << " Value = " <<anAtt->GetReal(arg[3])<<endl;
std::cout << "Key = " << arg[3] << " Value = " <<anAtt->GetReal(arg[3])<<std::endl;
if(nb == 5)
Draw::Set(arg[4], anAtt->GetReal(arg[3]));
return 0;
@@ -3610,10 +3610,10 @@ static Standard_Integer DDataStd_GetNDStrings (Draw_Interpretor& di,
Handle(TDataStd_NamedData) anAtt;
if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt)) {
cout << "NamedData attribute is not found or not set" << endl;
std::cout << "NamedData attribute is not found or not set" << std::endl;
return 1;}
cout <<endl;
cout <<"NamedData attribute at Label = " << arg[2] <<endl;
std::cout <<std::endl;
std::cout <<"NamedData attribute at Label = " << arg[2] <<std::endl;
const TDataStd_DataMapOfStringString& aMap = anAtt->GetStringsContainer();
TDataStd_DataMapIteratorOfDataMapOfStringString itr(aMap);
for (; itr.More(); itr.Next()){
@@ -3621,7 +3621,7 @@ static Standard_Integer DDataStd_GetNDStrings (Draw_Interpretor& di,
TCollection_AsciiString aStr(aKey,'?');
TCollection_ExtendedString aVal(itr.Value());
TCollection_AsciiString aStrValue(aVal,'?');
cout << "Key = " << aStr.ToCString() << " Value = " <<aStrValue.ToCString()<< endl;
std::cout << "Key = " << aStr.ToCString() << " Value = " <<aStrValue.ToCString()<< std::endl;
}
return 0;
}
@@ -3649,14 +3649,14 @@ static Standard_Integer DDataStd_GetNDString (Draw_Interpretor& di,
di << "NamedData attribute is not found or not set" << "\n";
return 1;}
cout <<endl;
cout <<"NamedData attribute at Label = " << arg[2] <<endl;
std::cout <<std::endl;
std::cout <<"NamedData attribute at Label = " << arg[2] <<std::endl;
if(!anAtt->HasString(arg[3])) {
cout << "There is no data specified by Key = "<< arg[3] << endl;
std::cout << "There is no data specified by Key = "<< arg[3] << std::endl;
return 1;
} else {
TCollection_AsciiString aValue (anAtt->GetString(arg[3]), '?');
cout << "Key = " << arg[3] << " Value = " << aValue.ToCString() << endl;
std::cout << "Key = " << arg[3] << " Value = " << aValue.ToCString() << std::endl;
if(nb == 5)
Draw::Set(arg[4], aValue.ToCString());
return 0;
@@ -3687,7 +3687,7 @@ static Standard_Integer DDataStd_SetNDataBytes (Draw_Interpretor& di,
if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
anAtt = TDataStd_NamedData::Set(aLabel);
if(anAtt.IsNull()) {
cout << "NamedData attribute is not found or not set" << endl;
std::cout << "NamedData attribute is not found or not set" << std::endl;
return 1;}
j = 4;
@@ -3720,17 +3720,17 @@ static Standard_Integer DDataStd_GetNDBytes (Draw_Interpretor& di,
Handle(TDataStd_NamedData) anAtt;
if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt)) {
cout << "NamedData attribute is not found or not set" << endl;
std::cout << "NamedData attribute is not found or not set" << std::endl;
return 1;}
cout <<endl;
cout <<"NamedData attribute at Label = " << arg[2] <<endl;
std::cout <<std::endl;
std::cout <<"NamedData attribute at Label = " << arg[2] <<std::endl;
const TDataStd_DataMapOfStringByte& aMap = anAtt->GetBytesContainer();
TDataStd_DataMapIteratorOfDataMapOfStringByte itr(aMap);
for (; itr.More(); itr.Next()){
TCollection_ExtendedString aKey(itr.Key());
TCollection_AsciiString aStr(aKey,'?');
Standard_Byte aValue = itr.Value();
cout << "Key = " << aStr.ToCString() << " Value = " <<aValue<<endl;
std::cout << "Key = " << aStr.ToCString() << " Value = " <<aValue<<std::endl;
}
return 0;
}
@@ -3755,16 +3755,16 @@ static Standard_Integer DDataStd_GetNDByte (Draw_Interpretor& di,
Handle(TDataStd_NamedData) anAtt;
if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt)) {
cout << "NamedData attribute is not found or not set" << endl;
std::cout << "NamedData attribute is not found or not set" << std::endl;
return 1;}
cout <<endl;
cout <<"NamedData attribute at Label = " << arg[2] <<endl;
std::cout <<std::endl;
std::cout <<"NamedData attribute at Label = " << arg[2] <<std::endl;
if(!anAtt->HasByte(arg[3])) {
cout << "There is no data specified by Key = "<< arg[3] << endl;
std::cout << "There is no data specified by Key = "<< arg[3] << std::endl;
return 1;
} else {
cout << "Key = " << arg[3] << " Value = " <<anAtt->GetByte(arg[3])<< endl;
std::cout << "Key = " << arg[3] << " Value = " <<anAtt->GetByte(arg[3])<< std::endl;
if(nb == 5)
Draw::Set(arg[4], anAtt->GetByte(arg[3]));
return 0;
@@ -3797,7 +3797,7 @@ static Standard_Integer DDataStd_SetNDataIntAr (Draw_Interpretor& di,
if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
anAtt = TDataStd_NamedData::Set(aLabel);
if(anAtt.IsNull()) {
cout<< "NamedData attribute is not found or not set" << endl;
std::cout<< "NamedData attribute is not found or not set" << std::endl;
return 1;}
j = 5;
@@ -3832,26 +3832,26 @@ static Standard_Integer DDataStd_GetNDIntArrays (Draw_Interpretor& di,
Handle(TDataStd_NamedData) anAtt;
if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt)) {
cout << "NamedData attribute is not found or not set" << endl;
std::cout << "NamedData attribute is not found or not set" << std::endl;
return 1;}
cout <<endl;
cout <<"NamedData attribute at Label = " << arg[2] <<endl;
std::cout <<std::endl;
std::cout <<"NamedData attribute at Label = " << arg[2] <<std::endl;
const TDataStd_DataMapOfStringHArray1OfInteger& aMap = anAtt->GetArraysOfIntegersContainer();
TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfInteger itr(aMap);
for (; itr.More(); itr.Next()){
TCollection_ExtendedString aKey(itr.Key());
TCollection_AsciiString aStr(aKey,'?');
cout << "Key = " << aStr.ToCString()<< endl;
std::cout << "Key = " << aStr.ToCString()<< std::endl;
Handle(TColStd_HArray1OfInteger) anArrValue = itr.Value();
if(!anArrValue.IsNull()) {
Standard_Integer lower = anArrValue->Lower();
Standard_Integer upper = anArrValue->Upper();
for(Standard_Integer i = lower; i<=upper;i++) {
Standard_Integer aValue = anArrValue->Value(i);
cout << "\tValue("<<i<<") = " <<aValue<<endl;
std::cout << "\tValue("<<i<<") = " <<aValue<<std::endl;
}
} else
cout << "\tthe specified array is Null "<<endl;
std::cout << "\tthe specified array is Null "<<std::endl;
}
return 0;
}
@@ -3876,16 +3876,16 @@ static Standard_Integer DDataStd_GetNDIntArray (Draw_Interpretor& di,
Handle(TDataStd_NamedData) anAtt;
if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt)) {
cout << "NamedData attribute is not found or not set" << endl;
std::cout << "NamedData attribute is not found or not set" << std::endl;
return 1;}
cout <<endl;
cout <<"NamedData attribute at Label = " << arg[2] <<endl;
std::cout <<std::endl;
std::cout <<"NamedData attribute at Label = " << arg[2] <<std::endl;
if(!anAtt->HasArrayOfIntegers(arg[3])) {
cout << "There is no data specified by Key = "<< arg[3] << endl;
std::cout << "There is no data specified by Key = "<< arg[3] << std::endl;
return 1;
} else {
cout << "Key = " << arg[3] <<endl;
std::cout << "Key = " << arg[3] <<std::endl;
Handle(TColStd_HArray1OfInteger) anArrValue = anAtt->GetArrayOfIntegers(arg[3]);
if(!anArrValue.IsNull()) {
@@ -3893,10 +3893,10 @@ static Standard_Integer DDataStd_GetNDIntArray (Draw_Interpretor& di,
Standard_Integer upper = anArrValue->Upper();
for(Standard_Integer i = lower; i<=upper;i++) {
Standard_Integer aValue = anArrValue->Value(i);
cout << "\tValue("<<i<<") = " <<aValue<<endl;
std::cout << "\tValue("<<i<<") = " <<aValue<<std::endl;
}
} else
cout << "\tthe specified array is Null or not found"<<endl;
std::cout << "\tthe specified array is Null or not found"<<std::endl;
return 0;
}
}
@@ -3927,7 +3927,7 @@ static Standard_Integer DDataStd_SetNDataRealAr (Draw_Interpretor& di,
if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt))
anAtt = TDataStd_NamedData::Set(aLabel);
if(anAtt.IsNull()) {
cout << "NamedData attribute is not found or not set" << endl;
std::cout << "NamedData attribute is not found or not set" << std::endl;
return 1;}
j = 5;
@@ -3962,26 +3962,26 @@ static Standard_Integer DDataStd_GetNDRealArrays (Draw_Interpretor& di,
Handle(TDataStd_NamedData) anAtt;
if(!aLabel.FindAttribute(TDataStd_NamedData::GetID(), anAtt)) {
cout << "NamedData attribute is not found or not set" << endl;
std::cout << "NamedData attribute is not found or not set" << std::endl;
return 1;}
cout <<endl;
cout <<"NamedData attribute at Label = " << arg[2] <<endl;
std::cout <<std::endl;
std::cout <<"NamedData attribute at Label = " << arg[2] <<std::endl;
const TDataStd_DataMapOfStringHArray1OfReal& aMap = anAtt->GetArraysOfRealsContainer();
TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfReal itr(aMap);
for (; itr.More(); itr.Next()){
TCollection_ExtendedString aKey(itr.Key());
TCollection_AsciiString aStr(aKey,'?');
cout << "Key = " << aStr.ToCString()<<endl;
std::cout << "Key = " << aStr.ToCString()<<std::endl;
Handle(TColStd_HArray1OfReal) anArrValue = itr.Value();
if(!anArrValue.IsNull()) {
Standard_Integer lower = anArrValue->Lower();
Standard_Integer upper = anArrValue->Upper();
for(Standard_Integer i = lower; i<=upper;i++) {
Standard_Real aValue = anArrValue->Value(i);
cout << "\tValue("<<i<<") = " <<aValue<<endl;
std::cout << "\tValue("<<i<<") = " <<aValue<<std::endl;
}
} else
cout << "\tthe specified array is Null "<<endl;
std::cout << "\tthe specified array is Null "<<std::endl;
}
return 0;
}
@@ -4009,13 +4009,13 @@ static Standard_Integer DDataStd_GetNDRealArray (Draw_Interpretor& di,
di << "NamedData attribute is not found or not set" << "\n";
return 1;}
cout <<endl;
cout <<"NamedData attribute at Label = " << arg[2] <<endl;
std::cout <<std::endl;
std::cout <<"NamedData attribute at Label = " << arg[2] <<std::endl;
if(!anAtt->HasArrayOfReals(arg[3])) {
cout << "There is no data specified by Key = "<< arg[3] << endl;
std::cout << "There is no data specified by Key = "<< arg[3] << std::endl;
return 1;
} else {
cout << "Key = " << arg[3] <<endl;
std::cout << "Key = " << arg[3] <<std::endl;
Handle(TColStd_HArray1OfReal) anArrValue = anAtt->GetArrayOfReals(arg[3]);
if(!anArrValue.IsNull()) {
@@ -4023,10 +4023,10 @@ static Standard_Integer DDataStd_GetNDRealArray (Draw_Interpretor& di,
Standard_Integer upper = anArrValue->Upper();
for(Standard_Integer i = lower; i<=upper;i++) {
Standard_Real aValue = anArrValue->Value(i);
cout << "\tValue("<<i<<") = " <<aValue<<endl;
std::cout << "\tValue("<<i<<") = " <<aValue<<std::endl;
}
} else
cout << "\tthe specified array is Null or not found"<<endl;
std::cout << "\tthe specified array is Null or not found"<<std::endl;
return 0;
}
}

View File

@@ -321,7 +321,7 @@ static Standard_Integer DDataStd_DumpPattern (Draw_Interpretor& di,
{
// Standard_SStream aStream;
// CTR->Dump(aStream);
// aStream << ends;
// aStream << std::ends;
// di << aStream.rdbuf()->str();
TCollection_AsciiString S;

View File

@@ -175,7 +175,7 @@ static Standard_Integer DDataStd_DrawDisplay (Draw_Interpretor& di,
// DDataStd_DrawPresentation::Display(L,Standard_True);
// return 0;
// }
// cout << "DDataStd_DrawRedisplay : Error" << endl;
// std::cout << "DDataStd_DrawRedisplay : Error" << std::endl;
// return 1;
// }

View File

@@ -201,7 +201,7 @@ Handle(TDF_Attribute) DDataStd_DrawPresentation::NewEmpty() const
void DDataStd_DrawPresentation::Restore (const Handle(TDF_Attribute)& With)
{
//cout<< "DDataStd_DrawPresentation::Restore" << endl;
//std::cout<< "DDataStd_DrawPresentation::Restore" << std::endl;
isDisplayed = Handle(DDataStd_DrawPresentation)::DownCast (With)->IsDisplayed();
myDrawable = Handle(DDataStd_DrawPresentation)::DownCast (With)->GetDrawable();
}
@@ -225,7 +225,7 @@ void DDataStd_DrawPresentation::Paste (const Handle(TDF_Attribute)& Into,
void DDataStd_DrawPresentation::AfterAddition()
{
//cout<< "DDataStd_DrawPresentation::AfterAddition" << endl;
//std::cout<< "DDataStd_DrawPresentation::AfterAddition" << std::endl;
//if (isDisplayed) DrawDisplay ();
}
@@ -236,7 +236,7 @@ void DDataStd_DrawPresentation::AfterAddition()
void DDataStd_DrawPresentation::BeforeRemoval()
{
//cout<< "DDataStd_DrawPresentation::BeforeRemoval" << endl;
//std::cout<< "DDataStd_DrawPresentation::BeforeRemoval" << std::endl;
//if (isDisplayed) DrawErase ();
}
@@ -247,7 +247,7 @@ void DDataStd_DrawPresentation::BeforeRemoval()
void DDataStd_DrawPresentation::BeforeForget()
{
//cout<< "DDataStd_DrawPresentation::BeforeForget" << endl;
//std::cout<< "DDataStd_DrawPresentation::BeforeForget" << std::endl;
if (isDisplayed) DrawErase (Label(),this);
}
@@ -259,7 +259,7 @@ void DDataStd_DrawPresentation::BeforeForget()
void DDataStd_DrawPresentation::AfterResume()
{
//cout<< "DDataStd_DrawPresentation::AfterResume"<< endl;
//std::cout<< "DDataStd_DrawPresentation::AfterResume"<< std::endl;
if (isDisplayed) DrawDisplay (Label(),this);
}
@@ -275,28 +275,28 @@ Standard_Boolean DDataStd_DrawPresentation::BeforeUndo (const Handle(TDF_Attribu
Handle(DDataStd_DrawPresentation) Pdt = Handle(DDataStd_DrawPresentation)::DownCast(AD->Attribute());
Handle(DDataStd_DrawPresentation) Pfw;
if (AD->Label().FindAttribute(GetID(),Pfw)) {
//cout<< "DDataStd_DrawPresentation::BeforeUndo : attribute in framework" << endl;
//std::cout<< "DDataStd_DrawPresentation::BeforeUndo : attribute in framework" << std::endl;
}
else {
//cout<< "DDataStd_DrawPresentation::BeforeUndo : attribute not in framework" << endl;
//std::cout<< "DDataStd_DrawPresentation::BeforeUndo : attribute not in framework" << std::endl;
}
//
if (AD->IsKind(STANDARD_TYPE(TDF_DeltaOnAddition))) {
//cout<< "DDataStd_DrawPresentation::BeforeUndo : delta on addition" << endl;
//std::cout<< "DDataStd_DrawPresentation::BeforeUndo : delta on addition" << std::endl;
if (Pfw->IsDisplayed()) DrawErase(AD->Label(),Pfw);
//TDF appelle BeforeRemoval effacer
}
else if (AD->IsKind(STANDARD_TYPE(TDF_DefaultDeltaOnRemoval))) {
//cout<< "DDataStd_DrawPresentation::BeforeUndo : delta on removal" << endl;
//std::cout<< "DDataStd_DrawPresentation::BeforeUndo : delta on removal" << std::endl;
}
else if (AD->IsKind(STANDARD_TYPE(TDF_DefaultDeltaOnModification))) {
//cout<< "DDataStd_DrawPresentation::BeforeUndo : delta on modification" << endl;
//std::cout<< "DDataStd_DrawPresentation::BeforeUndo : delta on modification" << std::endl;
if (Pfw->IsDisplayed()) DrawErase(AD->Label(),Pfw);
}
else {
//cout<< "DDataStd_DrawPresentation::BeforeUndo : unknown delta" << endl;
//std::cout<< "DDataStd_DrawPresentation::BeforeUndo : unknown delta" << std::endl;
}
//if (Label().IsNull()) cout<< "DDataStd_DrawPresentation::BeforeUndo : null label" << endl;
//if (Label().IsNull()) std::cout<< "DDataStd_DrawPresentation::BeforeUndo : null label" << std::endl;
return Standard_True;
}
@@ -313,28 +313,28 @@ Standard_Boolean DDataStd_DrawPresentation::AfterUndo (const Handle(TDF_Attribut
Handle(DDataStd_DrawPresentation) Pdt = Handle(DDataStd_DrawPresentation)::DownCast(AD->Attribute());
Handle(DDataStd_DrawPresentation) Pfw;
if (AD->Label().FindAttribute(GetID(),Pfw)) {
//cout<< "DDataStd_DrawPresentation::AfterUndo : attribute in framework" << endl;
//std::cout<< "DDataStd_DrawPresentation::AfterUndo : attribute in framework" << std::endl;
}
else {
//cout<< "DDataStd_DrawPresentation::AfterUndo : attribute not in framework" << endl;
//std::cout<< "DDataStd_DrawPresentation::AfterUndo : attribute not in framework" << std::endl;
}
//
if (AD->IsKind(STANDARD_TYPE(TDF_DeltaOnAddition))) {
//cout<< "DDataStd_DrawPresentation::AfterUndo : delta on addition" << endl;
//std::cout<< "DDataStd_DrawPresentation::AfterUndo : delta on addition" << std::endl;
}
else if (AD->IsKind(STANDARD_TYPE(TDF_DefaultDeltaOnRemoval))) {
//cout<< "DDataStd_DrawPresentation::AfterUndo : delta on removal" << endl;
//std::cout<< "DDataStd_DrawPresentation::AfterUndo : delta on removal" << std::endl;
if (Pdt->IsDisplayed()) DrawDisplay(AD->Label(),Pdt);
}
else if (AD->IsKind(STANDARD_TYPE(TDF_DefaultDeltaOnModification))) {
//cout<< "DDataStd_DrawPresentation::AfterUndo : delta on modification" << endl;
//std::cout<< "DDataStd_DrawPresentation::AfterUndo : delta on modification" << std::endl;
if (Pdt->IsDisplayed()) DrawDisplay(AD->Label(),Pdt);
}
else {
//cout<< "DDataStd_DrawPresentation::AfterUndo : unknown delta" << endl;
//std::cout<< "DDataStd_DrawPresentation::AfterUndo : unknown delta" << std::endl;
}
//if (Label().IsNull()) cout<< "DDataStd_DrawPresentation::AfterUndo : null label" << endl;
//if (Label().IsNull()) std::cout<< "DDataStd_DrawPresentation::AfterUndo : null label" << std::endl;
return Standard_True;
}
@@ -347,14 +347,14 @@ Standard_Boolean DDataStd_DrawPresentation::AfterUndo (const Handle(TDF_Attribut
void DDataStd_DrawPresentation::DrawBuild ()
{
//cout<< "DDataStd_DrawPresentation::DrawBuild" << endl;
//std::cout<< "DDataStd_DrawPresentation::DrawBuild" << std::endl;
Handle(DDataStd_DrawDriver) DD = DDataStd_DrawDriver::Get();
if (DD.IsNull()) {
DD = new DDataStd_DrawDriver ();
DDataStd_DrawDriver::Set(DD);
}
Handle(Draw_Drawable3D) D3D = DD->Drawable(Label());
if (D3D.IsNull()) cout<< "DDataStd_DrawPresentation::DrawBuild : null drawable" << endl;
if (D3D.IsNull()) std::cout<< "DDataStd_DrawPresentation::DrawBuild : null drawable" << std::endl;
myDrawable = D3D;
}
@@ -377,11 +377,11 @@ void DDataStd_DrawPresentation::DrawDisplay (const TDF_Label& L,
return;
}
else {
//cout<< "DDataStd_DrawPresentation::DrawDisplay : null Drawable" << endl;
//std::cout<< "DDataStd_DrawPresentation::DrawDisplay : null Drawable" << std::endl;
return;
}
}
cout<< "DDataStd_DrawPresentation::DrawDisplay : null Label" << endl;
std::cout<< "DDataStd_DrawPresentation::DrawDisplay : null Label" << std::endl;
}
//=======================================================================
@@ -398,11 +398,11 @@ void DDataStd_DrawPresentation::DrawErase (const TDF_Label& L,
return;
}
else {
//cout<< "DDataStd_DrawPresentation::DrawErase : null Drawable" << endl;
//std::cout<< "DDataStd_DrawPresentation::DrawErase : null Drawable" << std::endl;
return;
}
}
cout<< "DDataStd_DrawPresentation::DrawErase : null Label" << endl;
std::cout<< "DDataStd_DrawPresentation::DrawErase : null Label" << std::endl;
}

View File

@@ -98,12 +98,12 @@ static Standard_Integer DDataStd_GetName (Draw_Interpretor& di,
}
Handle(TDataStd_Name) N;
if( !L.FindAttribute(aGuid, N) ) {
cout << "Name attribute is not found or not set" << endl;
std::cout << "Name attribute is not found or not set" << std::endl;
return 1;
}
#ifdef DEB_DDataStd
if(!N.IsNull())
cout << "String = " << TCollection_AsciiString(N->Get(), '?').ToCString() << endl;
std::cout << "String = " << TCollection_AsciiString(N->Get(), '?').ToCString() << std::endl;
#endif
di << N->Get();
return 0;

View File

@@ -60,7 +60,7 @@ DDataStd_TreeBrowser::DDataStd_TreeBrowser(const TDF_Label& aLabel)
//=======================================================================
void DDataStd_TreeBrowser::DrawOn(Draw_Display& /*dis*/) const
{ cout<<"DDataStd_TreeBrowser"<<endl; }
{ std::cout<<"DDataStd_TreeBrowser"<<std::endl; }
//=======================================================================
@@ -79,7 +79,7 @@ Handle(Draw_Drawable3D) DDataStd_TreeBrowser::Copy() const
void DDataStd_TreeBrowser::Dump(Standard_OStream& S) const
{
S<<"DDataStd_TreeBrowser on a label: "<<endl;
S<<"DDataStd_TreeBrowser on a label: "<<std::endl;
S<<myRoot;
}

View File

@@ -461,11 +461,11 @@ static Standard_Integer DDataStd_ChildNodeMore (Draw_Interpretor& di,
const char** /*a*/)
{
if (cni.More()) {
//cout<<"TRUE"<<endl;
//std::cout<<"TRUE"<<std::endl;
di<<"TRUE\n";
}
else {
//cout<<"FALSE"<<endl;
//std::cout<<"FALSE"<<std::endl;
di<<"FALSE\n";
}
return 0;
@@ -508,7 +508,7 @@ static Standard_Integer DDataStd_ChildNodeValue (Draw_Interpretor& di,
{
TCollection_AsciiString entry;
TDF_Tool::Entry(cni.Value()->Label(), entry);
//cout<<entry<<endl;
//std::cout<<entry<<std::endl;
di <<entry<<"\n";
return 0;
}