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

0025418: Debug output to be limited to OCC development environment

Macros ending on "DEB" are replaced by OCCT_DEBUG across OCCT code; new macros described in documentation.
Macros starting with DEB are changed to start with "OCCT_DEBUG_".
Some code cleaned.
This commit is contained in:
abv
2014-10-28 12:41:04 +03:00
committed by bugmaster
parent a507ffd9d7
commit 0797d9d30a
700 changed files with 3932 additions and 4250 deletions

View File

@@ -516,7 +516,7 @@ void Draw::Load(Draw_Interpretor& theDI, const TCollection_AsciiString& theKey,
aMsg << aPluginResource->Value(theKey.ToCString());
aMsg << "; reason: ";
aMsg << error.ToCString();
#ifdef DRAW_DEB
#ifdef OCCT_DEBUG
cout << "could not open: " << aPluginResource->Value(theKey.ToCString())<< " ; reason: "<< error.ToCString() << endl;
#endif
Draw_Failure::Raise(aMsg);

View File

@@ -269,7 +269,9 @@ static Standard_Integer dversion(Draw_Interpretor& di, Standard_Integer, const c
{
// print OCCT version and OCCTY-specific macros used
di << "Open CASCADE Technology " << OCC_VERSION_STRING_EXT << "\n";
#if defined(DEB) || defined(_DEBUG)
#ifdef OCCT_DEBUG
di << "Extended debug mode\n";
#elif defined(_DEBUG)
di << "Debug mode\n";
#endif
#ifdef HAVE_TBB

View File

@@ -561,7 +561,7 @@ Draw_Interpretor::~Draw_Interpretor()
Tcl_Exit(0);
}
catch (Standard_Failure) {
#ifdef DRAW_DEB
#ifdef OCCT_DEBUG
cout <<"Tcl_Exit have an exeption" << endl;
#endif
}

View File

@@ -48,7 +48,7 @@ static Standard_Boolean FindPluginFile (TCollection_AsciiString& thePluginName,
// check if the file name has been specified and use default value if not
if (thePluginName.IsEmpty()) {
thePluginName += "DrawPlugin";
#ifdef DRAW_DEB
#ifdef OCCT_DEBUG
cout << "Plugin file name has not been specified. Defaults to " << thePluginName.ToCString() << endl;
#endif
}
@@ -82,7 +82,7 @@ static Standard_Boolean FindPluginFile (TCollection_AsciiString& thePluginName,
if (aToSetCSFVariable) {
OSD_Environment aCSFVarEnv ( aCSFVariable, aPluginDir );
aCSFVarEnv.Build();
#ifdef DRAW_DEB
#ifdef OCCT_DEBUG
cout << "Variable " << aCSFVariable.ToCString() << " has not been explicitly defined. Set to " << aPluginDir.ToCString() << endl;
#endif
if ( aCSFVarEnv.Failed() ) {
@@ -115,7 +115,7 @@ static void Parse (Draw_MapOfAsciiString& theMap)
const TCollection_AsciiString& aKey = theMap.FindKey(j);
TCollection_AsciiString aResource = aKey;
if(myResources->Find(aResource.ToCString())) {
#ifdef DRAW_DEB
#ifdef OCCT_DEBUG
cout << "Parse Value ==> " << myResources->Value(aResource.ToCString()) << endl;
#endif
TCollection_AsciiString aValue(myResources->Value(aResource.ToCString()));
@@ -123,7 +123,7 @@ static void Parse (Draw_MapOfAsciiString& theMap)
Standard_Integer i=1;
for(;;) {
TCollection_AsciiString aCurKey = aValue.Token(" \t,", i++);
#ifdef DRAW_DEB
#ifdef OCCT_DEBUG
cout << "Parse aCurKey = " << aCurKey.ToCString() << endl;
#endif
if(aCurKey.IsEmpty()) break;
@@ -211,12 +211,12 @@ static Standard_Integer Pload (Draw_Interpretor& di,
for(j = 1; j <= aMapExtent; j++) {
const TCollection_AsciiString& aKey = aMap.FindKey(j);
TCollection_AsciiString aResource = aKey;
#ifdef DRAW_DEB
#ifdef OCCT_DEBUG
cout << "aResource = " << aResource << endl;
#endif
if(myResources->Find(aResource.ToCString())) {
const TCollection_AsciiString& aValue = myResources->Value(aResource.ToCString());
#ifdef DRAW_DEB
#ifdef OCCT_DEBUG
cout << "Value ==> " << aValue << endl;
#endif
@@ -234,12 +234,12 @@ static Standard_Integer Pload (Draw_Interpretor& di,
OSD_File aTclScriptFile ( aTclScriptFileName );
OSD_File aTclScriptFileDefaults ( aTclScriptFileNameDefaults );
if (!aTclScriptDir.IsEmpty() && aTclScriptFile.Exists()) {
#ifdef DRAW_DEB
#ifdef OCCT_DEBUG
cout << "Load " << aTclScriptFileName << " TclScript" << endl;
#endif
di.EvalFile( aTclScriptFileName.ToCString() );
} else if (!aPluginDir.IsEmpty() && aTclScriptFileDefaults.Exists()) {
#ifdef DRAW_DEB
#ifdef OCCT_DEBUG
cout << "Load " << aTclScriptFileNameDefaults << " TclScript" << endl;
#endif
di.EvalFile( aTclScriptFileNameDefaults.ToCString() );