1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0025266: Debug statements in the source are getting flushed on to the console

Output to cout activated previously in Debug mode by #ifdef DEB is suppressed by using macro <PACKAGE>_DEB instead of DEB
This commit is contained in:
dbv
2014-10-08 19:00:20 +04:00
committed by abv
parent 7aa1b65c2a
commit 63c629aa3a
370 changed files with 1634 additions and 1639 deletions

View File

@@ -38,7 +38,7 @@ Standard_Boolean ShapeProcess::RegisterOperator (const Standard_CString name,
{
if ( dic.IsNull() ) dic = new ShapeProcess_DictionaryOfOperator;
if ( dic->HasItem ( name, Standard_True ) ) {
#ifdef DEB
#ifdef SHAPEPROCESS_DEB
cout << "Warning: operator with name " << name << " is already registered!" << endl;
#endif
return Standard_False;
@@ -57,7 +57,7 @@ Standard_Boolean ShapeProcess::FindOperator (const Standard_CString name,
{
if ( dic.IsNull() ) dic = new ShapeProcess_DictionaryOfOperator;
if ( ! dic->HasItem ( name, Standard_True ) ) {
#ifdef DEB
#ifdef SHAPEPROCESS_DEB
cout << "Error: no operator with name " << name << " registered!" << endl;
#endif
return Standard_False;
@@ -79,7 +79,7 @@ Standard_Boolean ShapeProcess::Perform (const Handle(ShapeProcess_Context)& cont
// get description of the sequence
TCollection_AsciiString sequence;
if ( ! context->GetString ( "exec.op", sequence ) ) {
#ifdef DEB
#ifdef SHAPEPROCESS_DEB
cout << "Error: ShapeProcess_Performer::Perform: sequence not defined for " << seq << endl;
#endif
context->UnSetScope();

View File

@@ -83,7 +83,7 @@ Handle(Resource_Manager) ShapeProcess_Context::LoadResourceManager (const Standa
}
}
if ( sRC.IsNull() ) {
#ifdef DEB
#ifdef SHAPEPROCESS_DEB
cout << "Info: ShapeProcess_Context: Reload Resource_Manager: "
<< name.ToCString() << " -> " << file << endl;
#endif
@@ -166,7 +166,7 @@ Standard_Boolean ShapeProcess_Context::GetString (const Standard_CString param,
if ( myRC.IsNull() ) return Standard_False;
Handle(TCollection_HAsciiString) pname = MakeName ( myScope, param );
if ( ! myRC->Find ( pname->ToCString() ) ) {
#ifdef DEB
#ifdef SHAPEPROCESS_DEB
cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << pname->ToCString() << " is not defined" << endl;
#endif
return Standard_False;
@@ -200,7 +200,7 @@ Standard_Boolean ShapeProcess_Context::GetReal (const Standard_CString param,
ref.LeftAdjust();
ref.RightAdjust();
if ( ! myRC->Find ( ref.ToCString() ) ) {
#ifdef DEB
#ifdef SHAPEPROCESS_DEB
cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << ref.ToCString() << " is not defined" << endl;
#endif
return Standard_False;
@@ -211,7 +211,7 @@ Standard_Boolean ShapeProcess_Context::GetReal (const Standard_CString param,
return Standard_True;
}
}
#ifdef DEB
#ifdef SHAPEPROCESS_DEB
cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << param << " is neither Real nor reference to Real";
#endif
return Standard_False;
@@ -242,7 +242,7 @@ Standard_Boolean ShapeProcess_Context::GetInteger (const Standard_CString param,
ref.LeftAdjust();
ref.RightAdjust();
if ( ! myRC->Find ( ref.ToCString() ) ) {
#ifdef DEB
#ifdef SHAPEPROCESS_DEB
cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << ref.ToCString() << " is not defined" << endl;
#endif
return Standard_False;
@@ -253,7 +253,7 @@ Standard_Boolean ShapeProcess_Context::GetInteger (const Standard_CString param,
return Standard_True;
}
}
#ifdef DEB
#ifdef SHAPEPROCESS_DEB
cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << param << " is neither Integer nor reference to Integer";
#endif
return Standard_False;
@@ -274,7 +274,7 @@ Standard_Boolean ShapeProcess_Context::GetBoolean (const Standard_CString param,
return Standard_True;
}
catch (Standard_Failure) {
#ifdef DEB
#ifdef SHAPEPROCESS_DEB
cout << "Warning: ShapeProcess_Context::GetInteger(): " << param << ": ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
@@ -332,7 +332,7 @@ Standard_CString ShapeProcess_Context::StringVal (const Standard_CString param,
return myRC->Value ( MakeName ( myScope, param )->ToCString() );
}
catch (Standard_Failure) {
#ifdef DEB
#ifdef SHAPEPROCESS_DEB
cout << "Warning: ShapeProcess_Context::GetInteger(): " << param << ": ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif

View File

@@ -186,7 +186,7 @@ static Standard_Boolean splitangle (const Handle(ShapeProcess_Context)& context)
SDA.SetMaxTolerance ( ctx->RealVal ( "MaxTolerance", 1. ) );
if ( ! SDA.Perform() && SDA.Status (ShapeExtend_FAIL) ) {
#ifdef DEB
#ifdef SHAPEPROCESS_DEB
cout<<"ShapeDivideAngle failed"<<endl;
#endif
return Standard_False;
@@ -342,7 +342,7 @@ static Standard_Boolean shapetobezier (const Handle(ShapeProcess_Context)& conte
if ( ctx->GetBoolean ( "EdgeMode", EdgeMode ) ) SCB.SetEdgeMode(EdgeMode);
if ( ! SCB.Perform() && SCB.Status (ShapeExtend_FAIL) ) {
#ifdef DEB
#ifdef SHAPEPROCESS_DEB
cout<<"Shape::ShapeConvertToBezier failed"<<endl; // !!!!
#endif
return Standard_False;
@@ -407,7 +407,7 @@ static Standard_Boolean splitcontinuity (const Handle(ShapeProcess_Context)& con
if ( ctx->GetReal ( "MaxTolerance", maxTol ) ) tool.SetMaxTolerance(maxTol);
if ( ! tool.Perform() && tool.Status (ShapeExtend_FAIL) ) {
#ifdef DEB
#ifdef SHAPEPROCESS_DEB
cout<<"SplitContinuity failed"<<endl;
#endif
return Standard_False;
@@ -444,7 +444,7 @@ static Standard_Boolean splitclosedfaces (const Handle(ShapeProcess_Context)& co
tool.SetNbSplitPoints(num);
tool.SetSurfaceSegmentMode(hasSeg);
if ( ! tool.Perform() && tool.Status (ShapeExtend_FAIL) ) {
#ifdef DEB
#ifdef SHAPEPROCESS_DEB
cout<<"Splitting of closed faces failed"<<endl;
#endif
return Standard_False;
@@ -666,7 +666,7 @@ static Standard_Boolean spltclosededges (const Handle(ShapeProcess_Context)& con
tool.SetNbSplitPoints(nbSplits);
if ( ! tool.Perform() && tool.Status (ShapeExtend_FAIL) ) {
#ifdef DEB
#ifdef SHAPEPROCESS_DEB
cout<<"Splitting of closed edges failed"<<endl;
#endif
return Standard_False;