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

@@ -40,7 +40,7 @@ Handle(Standard_Transient) XmlLDrivers::Factory(const Standard_GUID& theGUID)
{
if (theGUID == XmlLStorageDriver)
{
#ifdef XMLLDRIVERS_DEB
#ifdef OCCT_DEBUG
cout << "XmlLDrivers : Storage Plugin" << endl;
#endif
static Handle(XmlLDrivers_DocumentStorageDriver) model_sd =
@@ -51,7 +51,7 @@ Handle(Standard_Transient) XmlLDrivers::Factory(const Standard_GUID& theGUID)
if (theGUID == XmlLRetrievalDriver)
{
#ifdef XMLLDRIVERS_DEB
#ifdef OCCT_DEBUG
cout << "XmlLDrivers : Retrieval Plugin" << endl;
#endif
static Handle (XmlLDrivers_DocumentRetrievalDriver) model_rd =
@@ -76,7 +76,7 @@ TCollection_AsciiString XmlLDrivers::CreationDate ()
if (time(&nowbin) == (time_t) - 1)
{
#ifdef XMLLDRIVERS_DEB
#ifdef OCCT_DEBUG
cerr << "Storage ERROR : Could not get time of day from time()" << endl;
#endif
}
@@ -85,7 +85,7 @@ TCollection_AsciiString XmlLDrivers::CreationDate ()
if (strftime(nowstr, SLENGTH, "%Y-%m-%d", nowstruct) == (size_t) 0)
{
#ifdef XMLLDRIVERS_DEB
#ifdef OCCT_DEBUG
cerr << "Storage ERROR : Could not get string from strftime()" << endl;
#endif
}

View File

@@ -402,7 +402,7 @@ void XmlLDrivers_DocumentRetrievalDriver::ReadFromDomDocument
try
{
OCC_CATCH_SIGNALS
#if defined(DEB) && !defined(TAKE_TIMES)
#ifdef OCCT_DEBUG
TCollection_ExtendedString aMessage ("PasteDocument");
aMsgDriver -> Write (aMessage.ToExtString());
#endif

View File

@@ -191,7 +191,7 @@ Standard_Boolean XmlLDrivers_DocumentStorageDriver::WriteToDomDocument
aResourceDir += "/src/XmlOcafResource" ;
aToSetCSFVariable = Standard_True; //CSF variable to be set later
}
#ifdef DEB
#ifdef OCCT_DEBUG
else {
TCollection_ExtendedString aWarn = FAILSTR "Neither ";
aWarn = (aWarn + aCSFVariable[0] + ", nor " + aCSFVariable[1]
@@ -209,7 +209,7 @@ Standard_Boolean XmlLDrivers_DocumentStorageDriver::WriteToDomDocument
if (aToSetCSFVariable) {
OSD_Environment aCSFVarEnv ( aCSFVariable[0], aResourceDir );
aCSFVarEnv.Build();
#ifdef DEB
#ifdef OCCT_DEBUG
TCollection_ExtendedString aWarn1 = "Variable ";
aWarn1 = (aWarn1 + aCSFVariable[0]
+ " has not been explicitly defined. Set to " + aResourceDir);
@@ -222,7 +222,7 @@ Standard_Boolean XmlLDrivers_DocumentStorageDriver::WriteToDomDocument
}
}
}
#ifdef DEB
#ifdef OCCT_DEBUG
else {
TCollection_ExtendedString aWarn = FAILSTR "Schema definition file ";
aWarn += (aResourceFileName + " was not found");
@@ -349,13 +349,13 @@ Standard_Integer XmlLDrivers_DocumentStorageDriver::MakeDocument
// Retrieve from DOM_Document
XmlMDF::FromTo (aTDF, theElement, myRelocTable, myDrivers);
#if defined(DEB) && !defined(TAKE_TIMES)
#ifdef OCCT_DEBUG
aMessage = "First step successfull";
aMessageDriver -> Write (aMessage.ToExtString());
#endif
return myRelocTable.Extent();
}
#ifdef XMLLDRIVERS_DEB
#ifdef OCCT_DEBUG
cout << "First step failed" << endl; // No MessageDriver available
#endif
return -1; // error