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

@@ -173,7 +173,7 @@
#include <StepShape_HArray1OfOrientedEdge.hxx>
#include <StepShape_HArray1OfShell.hxx>
#ifdef DEB
#ifdef OCCT_DEBUG
//! Converts address of the passed shape (TShape) to string.
//! \param theShape [in] Shape to dump.
//! \return corresponding string.
@@ -498,26 +498,26 @@ Standard_Boolean STEPCAFControl_Reader::Transfer (STEPControl_Reader &reader,
static Handle(TCollection_HAsciiString) ap214 = new TCollection_HAsciiString ( "STEP AP214" );
if ( ! format->IsSameString ( ap203, Standard_False ) &&
! format->IsSameString ( ap214, Standard_False ) ) {
#ifdef STEPCAFCONTROL_DEB
#ifdef OCCT_DEBUG
cout << "Warning: STEPCAFControl_Reader::Transfer: Extern document is neither STEP AP203 nor AP214" << endl;
#else
continue;
#endif
}
}
#ifdef STEPCAFCONTROL_DEB
#ifdef OCCT_DEBUG
else cout << "Warning: STEPCAFControl_Reader::Transfer: Extern document format not defined" << endl;
#endif
// get and check filename of the current extern ref
const Standard_CString filename = ExtRefs.FileName(i);
#ifdef STEPCAFCONTROL_DEB
#ifdef OCCT_DEBUG
cout<<"filename="<<filename<<endl;
#endif
if ( ! filename || ! filename[0] ) {
#ifdef STEPCAFCONTROL_DEB
#ifdef OCCT_DEBUG
cout << "Warning: STEPCAFControl_Reader::Transfer: Extern reference file name is empty" << endl;
#endif
continue; // not a valid extern ref
@@ -660,7 +660,7 @@ TDF_Label STEPCAFControl_Reader::AddShape (const TopoDS_Shape &S,
return EF->GetLabel();
}
}
#ifdef STEPCAFCONTROL_DEB
#ifdef OCCT_DEBUG
if ( ! EF->GetLabel().IsNull() )
cout << "Warning: STEPCAFControl_Reader::AddShape: Non-empty shape with external ref; ref is ignored" << endl;
else if ( nbComponents <=0 )
@@ -709,7 +709,7 @@ Handle(STEPCAFControl_ExternFile) STEPCAFControl_Reader::ReadExternFile (const S
return myFiles->Item ( file );
}
#ifdef STEPCAFCONTROL_DEB
#ifdef OCCT_DEBUG
cout << "Reading extern file: " << fullname << endl;
#endif
@@ -790,7 +790,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadColors (const Handle(XSControl_WorkS
{
STEPConstruct_Styles Styles ( WS );
if ( ! Styles.LoadStyles() ) {
#ifdef STEPCAFCONTROL_DEB
#ifdef OCCT_DEBUG
cout << "Warning: no styles are found in the model" << endl;
#endif
return Standard_False;
@@ -965,7 +965,7 @@ TDF_Label STEPCAFControl_Reader::FindInstance (const Handle(StepRepr_NextAssembl
Handle(Transfer_TransientProcess) TP = Tool.TransientProcess();
Handle(Transfer_Binder) binder = TP->Find(NAUO);
if ( binder.IsNull() || ! binder->HasResult() ) {
#ifdef STEPCAFCONTROL_DEB
#ifdef OCCT_DEBUG
cout << "Error: STEPCAFControl_Reader::FindInstance: NAUO is not mapped to shape" << endl;
#endif
return L;
@@ -973,7 +973,7 @@ TDF_Label STEPCAFControl_Reader::FindInstance (const Handle(StepRepr_NextAssembl
TopoDS_Shape S = TransferBRep::ShapeResult ( TP, binder );
if ( S.IsNull() ) {
#ifdef STEPCAFCONTROL_DEB
#ifdef OCCT_DEBUG
cout << "Error: STEPCAFControl_Reader::FindInstance: NAUO is not mapped to shape" << endl;
#endif
return L;
@@ -1151,7 +1151,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadValProps (const Handle(XSControl_Wor
TColStd_SequenceOfTransient props;
STEPConstruct_ValidationProps Props ( WS );
if ( ! Props.LoadProps ( props ) ) {
#ifdef STEPCAFCONTROL_DEB
#ifdef OCCT_DEBUG
cout << "Warning: no validation props found in the model" << endl;
#endif
return Standard_False;
@@ -1312,7 +1312,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadLayers (const Handle(XSControl_WorkS
Interface_EntityIterator subs = WS->Graph().Sharings(SVPLA);
for (subs.Start(); subs.More(); subs.Next()) {
if ( ! subs.Value()->IsKind(STANDARD_TYPE(StepVisual_Invisibility)) ) continue;
#ifdef STEPCAFCONTROL_DEB
#ifdef OCCT_DEBUG
cout<< "\tLayer \"" << aLayerName << "\" is invisible"<<endl;
#endif
//TDF_Label InvLayerLab = LTool->FindLayer(aLayerName);
@@ -1389,7 +1389,7 @@ static TDF_Label setSHUOintoDoc (const Handle(XSControl_WorkSession) &WS,
Handle(StepRepr_NextAssemblyUsageOccurrence) NUNAUO =
Handle(StepRepr_NextAssemblyUsageOccurrence)::DownCast(SHUO->NextUsage());
if ( UUNAUO.IsNull() || NUNAUO.IsNull() ) {
#ifdef STEPCAFCONTROL_DEB
#ifdef OCCT_DEBUG
cout << "Warning: " << __FILE__ <<": Upper_usage or Next_usage of styled SHUO is null. Skip it" << endl;
#endif
return aMainLabel;
@@ -1448,7 +1448,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadSHUOs (const Handle(XSControl_WorkSe
STEPConstruct_Styles Styles ( WS );
if ( ! Styles.LoadStyles() ) {
#ifdef STEPCAFCONTROL_DEB
#ifdef OCCT_DEBUG
cout << "Warning: no styles are found in the model" << endl;
#endif
return Standard_False;
@@ -1468,7 +1468,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadSHUOs (const Handle(XSControl_WorkSe
if ( style != aHSeqOfInvisStyle->Value( si ) )
continue;
// found that current style is invisible.
#ifdef STEPCAFCONTROL_DEB
#ifdef OCCT_DEBUG
cout << "Warning: item No " << i << "(" << style->Item()->DynamicType()->Name() << ") is invisible" << endl;
#endif
IsVisible = Standard_False;
@@ -1507,7 +1507,7 @@ Standard_Boolean STEPCAFControl_Reader::ReadSHUOs (const Handle(XSControl_WorkSe
// set the SHUO structure to the document
TDF_Label aLabelForStyle = setSHUOintoDoc( WS, SHUO, STool, PDFileMap, ShapeLabelMap );
if ( aLabelForStyle.IsNull() ) {
#ifdef STEPCAFCONTROL_DEB
#ifdef OCCT_DEBUG
cout << "Warning: " << __FILE__ <<": coudnot create SHUO structure in the document" << endl;
#endif
continue;