From: Konstantin LEONTEV Date: Fri, 14 Oct 2022 09:44:56 +0000 (+0300) Subject: [bos #32517][EDF] Dynamic logging: Removed MYDEBUG. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f028e1d7bf48b6f5eab99a7b85488c2952fd5b55;p=modules%2Fsmesh.git [bos #32517][EDF] Dynamic logging: Removed MYDEBUG. --- diff --git a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx index 9936a7393..9eab4fc88 100644 --- a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx +++ b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx @@ -42,13 +42,6 @@ //#include -#ifdef _DEBUG_ -static int MYDEBUG = 0; -//#define _DEXCEPT_ -#else -static int MYDEBUG = 0; -#endif - #define _EDF_NODE_IDS_ using namespace MED; @@ -110,7 +103,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform() try { #endif myFamilies.clear(); - if(MYDEBUG) MESSAGE("Perform - myFile : "<GetName()); + MESSAGE("Perform - aMeshName : "<GetName()); if ( aMeshName != aMeshInfo->GetName() ) continue; aResult = DRS_OK; @@ -133,18 +126,18 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform() //------------------------------------------------ TErr anErr; TInt aNbFams = aMed->GetNbFamilies(aMeshInfo); - if(MYDEBUG) MESSAGE("Read " << aNbFams << " families"); + MESSAGE("Read " << aNbFams << " families"); for (TInt iFam = 0; iFam < aNbFams; iFam++) { PFamilyInfo aFamilyInfo = aMed->GetPFamilyInfo(aMeshInfo,iFam+1,&anErr); if(anErr >= 0){ TInt aFamId = aFamilyInfo->GetId(); - if(MYDEBUG) MESSAGE("Family " << aFamId << " :"); + MESSAGE("Family " << aFamId << " :"); DriverMED_FamilyPtr aFamily (new DriverMED_Family); TInt aNbGrp = aFamilyInfo->GetNbGroup(); - if(MYDEBUG) MESSAGE("belong to " << aNbGrp << " groups"); + MESSAGE("belong to " << aNbGrp << " groups"); bool isAttrOk = false; if(aFamilyInfo->GetNbAttr() == aNbGrp) isAttrOk = true; @@ -155,7 +148,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform() TInt anAttrVal = aFamilyInfo->GetAttrVal(iGr); aFamily->SetGroupAttributVal(anAttrVal); } - if(MYDEBUG) MESSAGE(aGroupName); + MESSAGE(aGroupName); if ( strncmp( aGroupName.c_str(), NIG_GROUP_PREFIX, strlen(NIG_GROUP_PREFIX) ) != 0 ) aFamily->AddGroupName( fixUTF8( aGroupName )); } @@ -182,7 +175,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform() EBooleen anIsNodeNum = aNodeInfo->IsElemNum(); TInt aNbElems = aNodeInfo->GetNbElem(); - if(MYDEBUG) MESSAGE("Perform - aNodeInfo->GetNbElem() = "<GetNbElem() = "<GetStoreName(); - if(MYDEBUG) MESSAGE("Get Group " << aGroupName); + MESSAGE("Get Group " << aGroupName); if (( famVecPtr = myGroups2FamiliesMap.ChangeSeek( aGroupName ))) { diff --git a/src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx b/src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx index 4b270fd00..cf1045e32 100644 --- a/src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx +++ b/src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx @@ -37,13 +37,6 @@ using namespace std; - -#ifdef _DEBUG_ -static int MYDEBUG = 0; -#else -static int MYDEBUG = 0; -#endif - namespace { /*! @@ -123,7 +116,7 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform() using namespace UNV2411; TDataSet aDataSet2411; UNV2411::Read(in_stream,aDataSet2411); - if(MYDEBUG) MESSAGE("Perform - aDataSet2411.size() = "<GetPElemInfo(theMeshInfo,anEntity,aGeom,MED::eNOD,&anErr); } } - ADDMSG(MYDEBUG,"\n"); + ADDMSG("\n"); return anEntity2TGeom2ElemInfo; } @@ -70,17 +62,17 @@ namespace MED GetFamilyInfoSet(const PWrapper& theWrapper, const PMeshInfo& theMeshInfo) { - MSG(MYDEBUG,"GetFamilies(...)"); + MSG("GetFamilies(...)"); TErr anErr; TFamilyInfoSet aFamilyInfoSet; TInt aNbFam = theWrapper->GetNbFamilies(*theMeshInfo); - INITMSG(MYDEBUG,"GetNbFamilies() = "<GetPFamilyInfo(theMeshInfo,iFam,&anErr); if(anErr >= 0) aFamilyInfoSet.insert(aFamilyInfo); } - ADDMSG(MYDEBUG,"\n"); + ADDMSG("\n"); return aFamilyInfoSet; } @@ -88,7 +80,7 @@ namespace MED TGroupInfo GetGroupInfo(const TFamilyInfoSet& theFamilyInfoSet) { - MSG(MYDEBUG,"GetFamiliesByGroup(...)"); + MSG("GetFamiliesByGroup(...)"); TGroupInfo aGroup; TFamilyInfoSet::const_iterator anIter = theFamilyInfoSet.begin(); for(; anIter != theFamilyInfoSet.end(); anIter++){ @@ -99,22 +91,20 @@ namespace MED } } -#ifdef _DEBUG_ - if(MYDEBUG){ + if(SALOME::VerbosityActivated()){ TGroupInfo::const_iterator anIter = aGroup.begin(); for(; anIter != aGroup.end(); anIter++){ const std::string& aName = anIter->first; - INITMSG(MYDEBUG,"aGroupName = '"<second; TFamilyInfoSet::const_iterator anFamIter = aFamilyInfoSet.begin(); for(; anFamIter != aFamilyInfoSet.end(); anFamIter++){ const PFamilyInfo& aFamilyInfo = *anFamIter; - INITMSG(MYDEBUG,"aFamilyName = '"<GetName()<<"'\n"); + INITMSG("aFamilyName = '"<GetName()<<"'\n"); } } - ADDMSG(MYDEBUG,"\n"); + ADDMSG("\n"); } -#endif return aGroup; } @@ -125,28 +115,26 @@ namespace MED const PMeshInfo& theMeshInfo, const MED::TEntityInfo& theEntityInfo) { - MSG(MYDEBUG,"GetFieldsByEntity(...)"); + MSG("GetFieldsByEntity(...)"); TFieldInfo2TimeStampInfoSet aFieldInfo2TimeStampInfoSet; TInt aNbFields = theWrapper->GetNbFields(); - INITMSG(MYDEBUG,"GetNbFields() = "<GetPFieldInfo(theMeshInfo,iField); - INITMSG(MYDEBUG,"aFieldName = '"<GetName()<< + INITMSG("aFieldName = '"<GetName()<< "'; aNbComp = "<GetNbComp()<<"; "); TGeom2Size aGeom2Size; EEntiteMaillage anEntity = EEntiteMaillage(-1); TInt aNbTimeStamps = theWrapper->GetNbTimeStamps(aFieldInfo,theEntityInfo,anEntity,aGeom2Size); - ADDMSG(MYDEBUG,"anEntity = "<GetPTimeStampInfo(aFieldInfo,anEntity,aGeom2Size,iTimeStamp); aFieldInfo2TimeStampInfoSet[aFieldInfo].insert(aTimeStamp); - INITMSG(MYDEBUG, - "aDt = "<GetDt()<< - ", Unit = \'"<GetUnitDt()<<"\n"); + INITMSG("aDt = "<GetDt()<<", Unit = \'"<GetUnitDt()<<"\n"); } } - ADDMSG(MYDEBUG,"\n"); + ADDMSG("\n"); return aFieldInfo2TimeStampInfoSet; } @@ -182,7 +170,7 @@ namespace MED const TEntity2TGeom2ElemInfo& theEntity2TGeom2ElemInfo, const TFamilyInfoSet& theFamilyInfoSet) { - MSG(MYDEBUG,"GetFamiliesByEntity(...)"); + MSG("GetFamiliesByEntity(...)"); TEntity2FamilySet anEntity2FamilySet; typedef std::map TId2Family; @@ -220,7 +208,7 @@ namespace MED TEntity2FamilyID::const_iterator anIter = anEntity2FamilyID.begin(); for(; anIter != anEntity2FamilyID.end(); anIter++){ const EEntiteMaillage& anEntity = anIter->first; - INITMSG(MYDEBUG,"anEntity = "<second; TFamilyID2Size::const_iterator anIter2 = aFamilyID2Size.begin(); for(; anIter2 != aFamilyID2Size.end(); anIter2++){ @@ -230,15 +218,14 @@ namespace MED if(anIter3 != anId2Family.end()){ const PFamilyInfo& aFamilyInfo = anIter3->second; anEntity2FamilySet[anEntity].insert(TFamilyTSize(aFamilyInfo,aSize)); - INITMSG(MYDEBUG, - "aFamilyName = '"<GetName()<< + INITMSG("aFamilyName = '"<GetName()<< "' anId = "<GetId()<<"\n"); } } } } } - ADDMSG(MYDEBUG,"\n"); + ADDMSG("\n"); return anEntity2FamilySet; } @@ -248,7 +235,7 @@ namespace MED TErr* theErr, EModeSwitch theMode) { - INITMSG(MYDEBUG,"GetKey2Gauss - theMode = "<GetSize(); - for(TInt iElem = 0; iElem < aNbElem; iElem++){ - ADDMSG(MYVALUEDEBUG,anInfo->GetElemNum(iElem)<<", "); - } - ADDMSG(MYVALUEDEBUG, std::endl); -#endif + if(SALOME::VerbosityActivated()){ + INITMSG("- aName = '"<GetSize(); + for(TInt iElem = 0; iElem < aNbElem; iElem++){ + ADDMSG(anInfo->GetElemNum(iElem)<<", "); + } + + ADDMSG(std::endl); + } } return TMKey2Profile(theMode,aKey2Profile); } diff --git a/src/MEDWrapper/MED_GaussUtils.cxx b/src/MEDWrapper/MED_GaussUtils.cxx index cecd61937..617bd46d0 100644 --- a/src/MEDWrapper/MED_GaussUtils.cxx +++ b/src/MEDWrapper/MED_GaussUtils.cxx @@ -23,14 +23,6 @@ #include "MED_GaussUtils.hxx" #include "MED_Utilities.hxx" -#ifdef _DEBUG_ -static int MYDEBUG = 0; -static int MYVALUEDEBUG = 0; -#else -// static int MYDEBUG = 0; // unused in release mode -// static int MYVALUEDEBUG = 0; // unused in release mode -#endif - namespace MED { //--------------------------------------------------------------- @@ -209,7 +201,7 @@ namespace MED { TInt aNbRef = theRefCoord.size(); TInt aNbRef2 = GetNbRef(); - INITMSG(MYDEBUG,"TShapeFun::IsSatisfy "<< + INITMSG("TShapeFun::IsSatisfy "<< "- aNbRef("<GetDim(); static TInt aNbGauss = 1; @@ -1935,7 +1926,7 @@ namespace MED TInt aConnDim = theCellInfo.GetConnDim(); - INITMSGA(MYDEBUG,0, + INITMSGA(0, "- aDim = "<GetDim(); static TInt aNbGauss = 1; @@ -2006,7 +1997,7 @@ namespace MED theGaussCoord.Init(aNbElem,aNbGauss,aDim,theMode); - INITMSGA(MYDEBUG,0, + INITMSGA(0, "- aDim = "<GetDim(); static TInt aNbGauss = 1; @@ -2064,7 +2055,7 @@ namespace MED theGaussCoord.Init(aNbElem,aNbGauss,aDim,theMode); - INITMSGA(MYDEBUG,0, + INITMSGA(0, "- aDim = "< #include @@ -45,19 +46,11 @@ namespace MED }; } -#ifdef _DEBUG_ - #define MSG(deb,msg) if(deb) std::cout< -#ifdef _DEBUG_ -static int MYDEBUG = 0; -static int MYVALUEDEBUG = 0; -#else -// static int MYDEBUG = 0; // unused in release mode -// static int MYVALUEDEBUG = 0; // unused in release mode -#endif - namespace MED { //--------------------------------------------------------------- @@ -56,13 +48,13 @@ namespace MED #else boost::detail::thread::lock_ops::lock(myWrapper->myMutex); #endif - INITMSG(MYDEBUG, "TLockProxy() - this -"<myGeom2Value; typename TimeStampValueType::TTGeom2Value::const_iterator anIter = aGeom2Value.begin(); for (; anIter != aGeom2Value.end(); anIter++) { @@ -177,22 +169,22 @@ namespace MED TInt aNbElem = aMeshValue.myNbElem; TInt aNbGauss = aMeshValue.myNbGauss; TInt aNbComp = aMeshValue.myNbComp; - INITMSG(MYDEBUG, "aGeom = "<Id(),&aMeshName); - INITMSG(MYDEBUG, "TWrapper::SetMeshInfo - MED_MODE_ACCES = "<GetGroupName(iGroup); - INITMSG(MYDEBUG, "aGroupName = '"<myDim; TInt aNbElem = anInfo->GetNbElem(); - INITMSG(MYDEBUG, "GetPNodeInfo: "); + INITMSG("GetPNodeInfo: "); { - INITMSG(MYDEBUG, "aCoords: "<myCoord; for (TInt iElem = 0; iElem < aNbElem; iElem++) { for (TInt iDim = 0, anId = iElem*aDim; iDim < aDim; iDim++, anId++) { - ADDMSG(MYVALUEDEBUG, aCoord[anId]<<","); + ADDMSG(aCoord[anId]<<","); } - ADDMSG(MYVALUEDEBUG, " "); + ADDMSG(" "); } - ADDMSG(MYDEBUG, std::endl); + ADDMSG(std::endl); - BEGMSG(MYVALUEDEBUG, "GetFamNum: "); + BEGMSG("GetFamNum: "); for (TInt iElem = 0; iElem < aNbElem; iElem++) { - ADDMSG(MYVALUEDEBUG, anInfo->GetFamNum(iElem)<<", "); + ADDMSG(anInfo->GetFamNum(iElem)<<", "); } - ADDMSG(MYVALUEDEBUG, std::endl); + ADDMSG(std::endl); if (anInfo->IsElemNum()) { - BEGMSG(MYVALUEDEBUG, "GetElemNum: "); + BEGMSG("GetElemNum: "); for (TInt iElem = 0; iElem < aNbElem; iElem++) { - ADDMSG(MYVALUEDEBUG, anInfo->GetElemNum(iElem)<<", "); + ADDMSG(anInfo->GetElemNum(iElem)<<", "); } - ADDMSG(MYVALUEDEBUG, std::endl); + ADDMSG(std::endl); } } - ADDMSG(MYDEBUG, std::endl); + ADDMSG(std::endl); #endif return anInfo; @@ -1549,18 +1541,18 @@ namespace MED GetPolygoneInfo(anInfo); #ifdef _DEBUG_ - INITMSG(MYDEBUG, "GetPPolygoneInfo"<< + INITMSG("GetPPolygoneInfo"<< " - theGeom = "<GetConnSlice(iElem); TInt aConnDim = aConnSlice.size(); for (TInt iConn = 0; iConn < aConnDim; iConn++) { - ADDMSG(MYVALUEDEBUG, aConnSlice[iConn]<<","); + ADDMSG(aConnSlice[iConn]<<","); } - ADDMSG(MYDEBUG, " "); + ADDMSG(" "); } - ADDMSG(MYDEBUG, std::endl); + ADDMSG(std::endl); #endif return anInfo; @@ -1859,25 +1851,25 @@ namespace MED GetPolyedreInfo(anInfo); #ifdef _DEBUG_ - INITMSG(MYDEBUG, "GetPPolyedreInfo"<< + INITMSG("GetPPolyedreInfo"<< " - theGeom = "<GetConnSliceArr(iElem); TInt aNbFaces = aConnSliceArr.size(); - ADDMSG(MYDEBUG, "{"); + ADDMSG("{"); for (TInt iFace = 0; iFace < aNbFaces; iFace++) { TCConnSlice aConnSlice = aConnSliceArr[iFace]; TInt aNbConn = aConnSlice.size(); - ADDMSG(MYDEBUG, "["); + ADDMSG("["); for (TInt iConn = 0; iConn < aNbConn; iConn++) { - ADDMSG(MYVALUEDEBUG, aConnSlice[iConn]<<","); + ADDMSG(aConnSlice[iConn]<<","); } - ADDMSG(MYDEBUG, "] "); + ADDMSG("] "); } - ADDMSG(MYDEBUG, "} "); + ADDMSG("} "); } - ADDMSG(MYDEBUG, std::endl); + ADDMSG(std::endl); #endif return anInfo; @@ -2281,31 +2273,31 @@ namespace MED #ifdef _DEBUG_ TInt aConnDim = anInfo->GetConnDim(); - INITMSG(MYDEBUG, "GetPCellInfo - theEntity = "<GetConnSlice(iElem); for (TInt iConn = 0; iConn < aConnDim; iConn++) { - ADDMSG(MYVALUEDEBUG, aConnSlice[iConn]<<","); + ADDMSG(aConnSlice[iConn]<<","); } - ADDMSG(MYVALUEDEBUG, " "); + ADDMSG(" "); } - ADDMSG(MYDEBUG, std::endl); + ADDMSG(std::endl); - BEGMSG(MYVALUEDEBUG, "GetPCellInfo - GetFamNum: "); + BEGMSG("GetPCellInfo - GetFamNum: "); for (TInt iElem = 0; iElem < aNbElem; iElem++) { - ADDMSG(MYVALUEDEBUG, anInfo->GetFamNum(iElem)<<", "); + ADDMSG(anInfo->GetFamNum(iElem)<<", "); } - ADDMSG(MYVALUEDEBUG, std::endl); + ADDMSG(std::endl); if (anInfo->IsElemNum()) { - BEGMSG(MYVALUEDEBUG, "GetPCellInfo - GetElemNum: "); + BEGMSG("GetPCellInfo - GetElemNum: "); for (TInt iElem = 0; iElem < aNbElem; iElem++) { - ADDMSG(MYVALUEDEBUG, anInfo->GetElemNum(iElem)<<", "); + ADDMSG(anInfo->GetElemNum(iElem)<<", "); } - ADDMSG(MYVALUEDEBUG, std::endl); + ADDMSG(std::endl); } - ADDMSG(MYDEBUG, std::endl); + ADDMSG(std::endl); #endif return anInfo; @@ -2688,8 +2680,7 @@ namespace MED GetFieldInfo(theId, *anInfo, theErr); #ifdef _DEBUG_ - INITMSG(MYDEBUG, - "GetPFieldInfo "<< + INITMSG("GetPFieldInfo "<< "- aName = '"<GetName()<<"'"<< "; aType = "<GetType()<< "; aNbComp = "< 0); if (anIsSatisfied) { - INITMSG(MYDEBUG, - "GetNbTimeStamps aNbTimeStamps = "<myGeom2NbGauss; TGeom2NbGauss::const_iterator anIter = aGeom2NbGauss.begin(); for (; anIter != aGeom2NbGauss.end(); anIter++) { const EGeometrieElement& aGeom = anIter->first; - INITMSG(MYDEBUG, "aGeom = "<GetValueSize(aGeom); - INITMSG(MYDEBUG, - "TWrapper::GetTimeStampValue - aGeom = "<GetNbNodes(); - BEGMSG(MYVALUEDEBUG, "GetFamNumNode: "); + BEGMSG("GetFamNumNode: "); for (TInt iElem = 0; iElem < aNbElem; iElem++) { - ADDMSG(MYVALUEDEBUG, anInfo->GetFamNumNode(iElem)<<", "); + ADDMSG(anInfo->GetFamNumNode(iElem)<<", "); } TInt aNbCells = anInfo->GetNbCells(); - BEGMSG(MYVALUEDEBUG, "GetFamNum: "); + BEGMSG("GetFamNum: "); for (TInt iElem = 0; iElem < aNbCells; iElem++) { - ADDMSG(MYVALUEDEBUG, anInfo->GetFamNum(iElem)<<", "); + ADDMSG(anInfo->GetFamNum(iElem)<<", "); } - ADDMSG(MYVALUEDEBUG, std::endl); - BEGMSG(MYVALUEDEBUG, "GetCoordName: "); + ADDMSG(std::endl); + BEGMSG("GetCoordName: "); for (TInt iElem = 0; iElem < theMeshInfo->GetDim(); iElem++) { - ADDMSG(MYVALUEDEBUG, anInfo->GetCoordName(iElem)<<", "); + ADDMSG(anInfo->GetCoordName(iElem)<<", "); } - ADDMSG(MYVALUEDEBUG, std::endl); - BEGMSG(MYVALUEDEBUG, "GetCoordUnit: "); + ADDMSG(std::endl); + BEGMSG("GetCoordUnit: "); for (TInt iElem = 0; iElem < theMeshInfo->GetDim(); iElem++) { - ADDMSG(MYVALUEDEBUG, anInfo->GetCoordUnit(iElem)<<", "); + ADDMSG(anInfo->GetCoordUnit(iElem)<<", "); } - ADDMSG(MYVALUEDEBUG, std::endl); + ADDMSG(std::endl); } #endif diff --git a/src/OBJECT/SMESH_Actor.cxx b/src/OBJECT/SMESH_Actor.cxx index 44d2747b7..1d0400ce2 100644 --- a/src/OBJECT/SMESH_Actor.cxx +++ b/src/OBJECT/SMESH_Actor.cxx @@ -82,11 +82,6 @@ #include "utilities.h" -#ifdef _DEBUG_ -static int MYDEBUG = 0; -#else -static int MYDEBUG = 0; -#endif SMESH_ActorDef* SMESH_ActorDef::New(){ return new SMESH_ActorDef(); @@ -114,7 +109,7 @@ SMESH_Actor* SMESH_Actor::New(TVisualObjPtr theVisualObj, SMESH_ActorDef::SMESH_ActorDef() { - if(MYDEBUG) MESSAGE("SMESH_ActorDef - "<Update(); @@ -2657,7 +2652,7 @@ void SMESH_ActorDef::UpdateFilter() } if ( GetVisibility() ) aFilter->Update(); - if (MYDEBUG) MESSAGE(aFilter->GetOutput()->GetNumberOfCells()); + MESSAGE(aFilter->GetOutput()->GetNumberOfCells()); } #ifndef DISABLE_PLOT2DVIEWER diff --git a/src/OBJECT/SMESH_ActorUtils.cxx b/src/OBJECT/SMESH_ActorUtils.cxx index d58acaa46..d8712a5b4 100644 --- a/src/OBJECT/SMESH_ActorUtils.cxx +++ b/src/OBJECT/SMESH_ActorUtils.cxx @@ -46,11 +46,6 @@ #include #include -//#ifdef _DEBUG_ -//static int MYDEBUG = 1; -//#else -//static int MYDEBUG = 0; -//#endif namespace SMESH { diff --git a/src/OBJECT/SMESH_DeviceActor.cxx b/src/OBJECT/SMESH_DeviceActor.cxx index 0012cf373..1c7331b78 100644 --- a/src/OBJECT/SMESH_DeviceActor.cxx +++ b/src/OBJECT/SMESH_DeviceActor.cxx @@ -68,11 +68,6 @@ #include "utilities.h" -#ifdef _DEBUG_ -static int MYDEBUG = 0; -#else -static int MYDEBUG = 0; -#endif using namespace std; @@ -83,7 +78,7 @@ vtkStandardNewMacro(SMESH_DeviceActor) SMESH_DeviceActor ::SMESH_DeviceActor() { - if(MYDEBUG) MESSAGE("SMESH_DeviceActor - "<Delete(); // myPlaneCollection->Delete(); -- it is vtkSmartPointer @@ -851,7 +846,7 @@ SMESH_DeviceActor anID = myExtractGeometry->GetNodeObjId(theVtkID); vtkIdType aRetID = myVisualObj->GetNodeObjId(anID); - if(MYDEBUG) MESSAGE("GetNodeObjId - theVtkID = "<GetReferenceCount() = " << myGrid->GetReferenceCount() ); + MESSAGE("--------------------------------SMESH_VisualObjDef::~SMESH_VisualObjDef"); + MESSAGE( "myGrid->GetReferenceCount() = " << myGrid->GetReferenceCount() ); myGrid->Delete(); } @@ -200,7 +193,7 @@ void SMESH_VisualObjDef::createPoints( vtkPoints* thePoints ) //================================================================================= void SMESH_VisualObjDef::buildPrs(bool buildGrid) { - if ( MYDEBUG ) MESSAGE("---------------------------SMESH_VisualObjDef::buildPrs " << buildGrid); + MESSAGE("---------------------------SMESH_VisualObjDef::buildPrs " << buildGrid); if (buildGrid) { myLocalGrid = true; @@ -234,7 +227,7 @@ void SMESH_VisualObjDef::buildPrs(bool buildGrid) if (!GetMesh()->IsCompacted()) { NulData(); // detach from the SMDS grid to allow immediate memory de-allocation in compactMesh() - if ( MYDEBUG ) MESSAGE("*** buildPrs ==> compactMesh!"); + MESSAGE("*** buildPrs ==> compactMesh!"); GetMesh()->CompactMesh(); if ( SMESHDS_Mesh* m = dynamic_cast( GetMesh() )) // IPAL53915 m->GetScript()->SetModified(false); // drop IsModified set in compactMesh() @@ -309,8 +302,7 @@ void SMESH_VisualObjDef::buildElemPrs() myGrid->SetPoints( aPoints ); aPoints->Delete(); - if ( MYDEBUG ) - MESSAGE("Update - myGrid->GetNumberOfPoints() = "<GetNumberOfPoints()); + MESSAGE("Update - myGrid->GetNumberOfPoints() = "<GetNumberOfPoints()); // Calculate cells size @@ -361,8 +353,8 @@ void SMESH_VisualObjDef::buildElemPrs() } } } - if ( MYDEBUG ) - MESSAGE( "Update - aNbCells = "<_is_nil() = "<_is_nil()); + + MESSAGE("SMESH_MeshObj - this = "<_is_nil() = "<_is_nil()); } //================================================================================= @@ -638,8 +630,7 @@ SMESH_MeshObj::SMESH_MeshObj(SMESH::SMESH_Mesh_ptr theMesh): //================================================================================= SMESH_MeshObj::~SMESH_MeshObj() { - if ( MYDEBUG ) - MESSAGE("SMESH_MeshObj - this = "<Delete(); } @@ -651,9 +642,9 @@ SMESH_MeshObj::~SMESH_MeshObj() bool SMESH_MeshObj::Update( int theIsClear ) { // Update SMDS_Mesh on client part - if ( MYDEBUG ) MESSAGE("SMESH_MeshObj::Update " << this); + MESSAGE("SMESH_MeshObj::Update " << this); if ( myClient.Update(theIsClear) || GetUnstructuredGrid()->GetNumberOfPoints()==0) { - if ( MYDEBUG ) MESSAGE("buildPrs"); + MESSAGE("buildPrs"); buildPrs(); // Fill unstructured grid return true; } @@ -662,7 +653,7 @@ bool SMESH_MeshObj::Update( int theIsClear ) bool SMESH_MeshObj::NulData() { - if ( MYDEBUG ) MESSAGE ("SMESH_MeshObj::NulData() ============================================="); + MESSAGE ("SMESH_MeshObj::NulData() ============================================="); if (!myEmptyGrid) { myEmptyGrid = SMDS_UnstructuredGrid::New(); @@ -821,7 +812,7 @@ bool SMESH_MeshObj::IsNodePrs() const //================================================================================= SMESH_SubMeshObj::SMESH_SubMeshObj( SMESH_MeshObj* theMeshObj ) { - if ( MYDEBUG ) MESSAGE( "SMESH_SubMeshObj - theMeshObj = " << theMeshObj ); + MESSAGE( "SMESH_SubMeshObj - theMeshObj = " << theMeshObj ); myMeshObj = theMeshObj; } @@ -855,7 +846,7 @@ void SMESH_SubMeshObj::UpdateFunctor( const SMESH::Controls::FunctorPtr& theFunc //================================================================================= bool SMESH_SubMeshObj::Update( int theIsClear ) { - if ( MYDEBUG ) MESSAGE("SMESH_SubMeshObj::Update " << this); + MESSAGE("SMESH_SubMeshObj::Update " << this); bool changed = myMeshObj->Update( theIsClear ); buildPrs(true); return changed; @@ -876,13 +867,13 @@ SMESH_GroupObj::SMESH_GroupObj( SMESH::SMESH_GroupBase_ptr theGroup, : SMESH_SubMeshObj( theMeshObj ), myGroupServer( SMESH::SMESH_GroupBase::_duplicate(theGroup) ) { - if ( MYDEBUG ) MESSAGE("SMESH_GroupObj - theGroup->_is_nil() = "<_is_nil()); + MESSAGE("SMESH_GroupObj - theGroup->_is_nil() = "<_is_nil()); myGroupServer->Register(); } SMESH_GroupObj::~SMESH_GroupObj() { - if ( MYDEBUG ) MESSAGE("~SMESH_GroupObj"); + MESSAGE("~SMESH_GroupObj"); myGroupServer->UnRegister(); } @@ -1011,14 +1002,14 @@ SMESH_subMeshObj::SMESH_subMeshObj( SMESH::SMESH_subMesh_ptr theSubMesh, : SMESH_SubMeshObj( theMeshObj ), mySubMeshServer( SMESH::SMESH_subMesh::_duplicate( theSubMesh ) ) { - if ( MYDEBUG ) MESSAGE( "SMESH_subMeshObj - theSubMesh->_is_nil() = " << theSubMesh->_is_nil() ); + MESSAGE( "SMESH_subMeshObj - theSubMesh->_is_nil() = " << theSubMesh->_is_nil() ); mySubMeshServer->Register(); } SMESH_subMeshObj::~SMESH_subMeshObj() { - if ( MYDEBUG ) MESSAGE( "~SMESH_subMeshObj" ); + MESSAGE( "~SMESH_subMeshObj" ); mySubMeshServer->UnRegister(); } diff --git a/src/OBJECT/SMESH_PreviewActorsCollection.cxx b/src/OBJECT/SMESH_PreviewActorsCollection.cxx index 1c346644f..b4d7cda41 100644 --- a/src/OBJECT/SMESH_PreviewActorsCollection.cxx +++ b/src/OBJECT/SMESH_PreviewActorsCollection.cxx @@ -44,23 +44,17 @@ #include #include -#ifdef _DEBUG_ -static int MYDEBUG = 0; -#else -static int MYDEBUG = 0; -#endif - SMESH_PreviewActorsCollection::SMESH_PreviewActorsCollection() : mySelector( 0 ), myRenderer( 0 ), myCurrentChunk( 0 ), myChunkSize( 0 ), myIsShown( true ) { - if(MYDEBUG) MESSAGE("SMESH_PreviewActorsCollection - "<(h) typedef SMESH_HypoFilter THypType; @@ -109,7 +103,7 @@ SMESH_Mesh::SMESH_Mesh(int theLocalId, SMESHDS_Document* theDocument): _groupId( 0 ), _nbSubShapes( 0 ) { - if(MYDEBUG) MESSAGE("SMESH_Mesh::SMESH_Mesh(int localId)"); + MESSAGE("SMESH_Mesh::SMESH_Mesh(int localId)"); _id = theLocalId; _gen = theGen; _document = theDocument; @@ -192,7 +186,7 @@ namespace SMESH_Mesh::~SMESH_Mesh() { - if(MYDEBUG) MESSAGE("SMESH_Mesh::~SMESH_Mesh"); + MESSAGE("SMESH_Mesh::~SMESH_Mesh"); if ( _document ) // avoid destructing _meshDS from ~SMESH_Gen() _document->RemoveMesh( _id ); @@ -276,7 +270,7 @@ SMESH_Mesh* SMESH_Mesh::FindMesh( int meshId ) const void SMESH_Mesh::ShapeToMesh(const TopoDS_Shape & aShape) { - if(MYDEBUG) MESSAGE("SMESH_Mesh::ShapeToMesh"); + MESSAGE("SMESH_Mesh::ShapeToMesh"); if ( !aShape.IsNull() && _isShapeToMesh ) { if ( aShape.ShapeType() != TopAbs_COMPOUND && // group contents is allowed to change @@ -638,7 +632,7 @@ SMESH_Mesh::AddHypothesis(const TopoDS_Shape & aSubShape, int anHypId, std::string* anError ) { - if(MYDEBUG) MESSAGE("SMESH_Mesh::AddHypothesis"); + MESSAGE("SMESH_Mesh::AddHypothesis"); if ( anError ) anError->clear(); @@ -662,7 +656,7 @@ SMESH_Mesh::AddHypothesis(const TopoDS_Shape & aSubShape, std::string hypName = anHyp->GetName(); if ( hypName == "NotConformAllowed" ) { - if(MYDEBUG) MESSAGE( "Hypothesis can be only global" ); + MESSAGE( "Hypothesis can be only global" ); return SMESH_Hypothesis::HYP_INCOMPATIBLE; } } @@ -717,8 +711,8 @@ SMESH_Mesh::AddHypothesis(const TopoDS_Shape & aSubShape, HasModificationsToDiscard(); // to reset _isModified flag if a mesh becomes empty GetMeshDS()->Modified(); - if(MYDEBUG) subMesh->DumpAlgoState(true); - if(MYDEBUG) SCRUTE(ret); + if(SALOME::VerbosityActivated()) subMesh->DumpAlgoState(true); + SCRUTE(ret); return ret; } @@ -732,14 +726,14 @@ SMESH_Hypothesis::Hypothesis_Status SMESH_Mesh::RemoveHypothesis(const TopoDS_Shape & aSubShape, int anHypId) { - if(MYDEBUG) MESSAGE("SMESH_Mesh::RemoveHypothesis"); + MESSAGE("SMESH_Mesh::RemoveHypothesis"); StudyContextStruct *sc = _gen->GetStudyContext(); if (sc->mapHypothesis.find(anHypId) == sc->mapHypothesis.end()) throw SALOME_Exception(LOCALIZED("hypothesis does not exist")); SMESH_Hypothesis *anHyp = sc->mapHypothesis[anHypId]; - if(MYDEBUG) { SCRUTE(anHyp->GetType()); } + SCRUTE(anHyp->GetType()); // shape @@ -787,8 +781,8 @@ SMESH_Mesh::RemoveHypothesis(const TopoDS_Shape & aSubShape, HasModificationsToDiscard(); // to reset _isModified flag if mesh become empty GetMeshDS()->Modified(); - if(MYDEBUG) subMesh->DumpAlgoState(true); - if(MYDEBUG) SCRUTE(ret); + if(SALOME::VerbosityActivated()) subMesh->DumpAlgoState(true); + SCRUTE(ret); return ret; } @@ -2027,7 +2021,7 @@ int SMESH_Mesh::NbMeshes() const // nb meshes in the Study bool SMESH_Mesh::IsNotConformAllowed() const { - if(MYDEBUG) MESSAGE("SMESH_Mesh::IsNotConformAllowed"); + MESSAGE("SMESH_Mesh::IsNotConformAllowed"); static SMESH_HypoFilter filter( SMESH_HypoFilter::HasName( "NotConformAllowed" )); return GetHypothesis( _meshDS->ShapeToMesh(), filter, false ); diff --git a/src/SMESHClient/SMESH_Client.cxx b/src/SMESHClient/SMESH_Client.cxx index 1cb045681..7f84e6555 100644 --- a/src/SMESHClient/SMESH_Client.cxx +++ b/src/SMESHClient/SMESH_Client.cxx @@ -59,12 +59,6 @@ } #endif -#ifdef _DEBUG_ -static int MYDEBUG = 0; -#else -static int MYDEBUG = 0; -#endif - namespace { using std::runtime_error; @@ -829,19 +823,19 @@ SMESH_Client::SMESH_Client(CORBA::ORB_ptr theORB, mySMESHDSMesh(NULL), mySMDSMesh(NULL) { - if ( MYDEBUG ) MESSAGE("SMESH_Client::SMESH_Client"); + MESSAGE("SMESH_Client::SMESH_Client"); myMeshServer->Register(); CORBA::Boolean anIsEmbeddedMode; GetSMESHGen(theORB,anIsEmbeddedMode); if(anIsEmbeddedMode){ - if ( MYDEBUG ) MESSAGE("Info: The same process, update mesh by pointer "); + MESSAGE("Info: The same process, update mesh by pointer "); // just set client mesh pointer to server mesh pointer //SMESH_Mesh* aMesh = reinterpret_cast(theMesh->GetMeshPtr()); CORBA::LongLong pointeur = theMesh->GetMeshPtr(); - if( MYDEBUG ) MESSAGE("SMESH_Client::SMESH_Client pointeur "< (pointeur); - if ( MYDEBUG ) MESSAGE("SMESH_Client::SMESH_Client aMesh "<GetMeshDS()->IsEmbeddedMode()){ if(anIsEmbeddedMode){ mySMESHDSMesh = aMesh->GetMeshDS(); @@ -899,18 +893,18 @@ SMESH_Client::Update(bool theIsClear) bool anIsModified = true; if(mySMESHDSMesh) { - if ( MYDEBUG ) MESSAGE("Update mySMESHDSMesh"); + MESSAGE("Update mySMESHDSMesh"); SMESHDS_Script* aScript = mySMESHDSMesh->GetScript(); anIsModified = aScript->IsModified(); aScript->SetModified(false); } else { - if ( MYDEBUG ) MESSAGE("Update CORBA"); + MESSAGE("Update CORBA"); SMESH::log_array_var aSeq = myMeshServer->GetLog( theIsClear ); CORBA::Long aLength = aSeq->length(); anIsModified = aLength > 0; - if ( MYDEBUG ) MESSAGE( "Update: length of the script is "<NbNodes() = "<NbNodes()); MESSAGE("Update - mySMDSMesh->Nb0DElements() = "<Nb0DElements()); diff --git a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx index b8e0277cc..1cece8d09 100644 --- a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx @@ -81,12 +81,6 @@ #define env_sep ":" #endif // WIN32 -#ifdef _DEBUG_ -static int MYDEBUG = 0; -#else -static int MYDEBUG = 0; -#endif - namespace SMESH { typedef IMap THypothesisDataMap; @@ -497,7 +491,7 @@ namespace SMESH SMESHGUI_GenericHypothesisCreator* GetHypothesisCreator(const QString& aHypType) { - if(MYDEBUG) MESSAGE("Get HypothesisCreator for " << aHypType.toLatin1().data()); + MESSAGE("Get HypothesisCreator for " << aHypType.toLatin1().data()); SMESHGUI_GenericHypothesisCreator* aCreator = 0; @@ -522,7 +516,7 @@ namespace SMESH // 3. Load Client Plugin Library try { // load plugin library - if(MYDEBUG) MESSAGE("Loading client meshers plugin library ..."); + MESSAGE("Loading client meshers plugin library ..."); #ifdef WIN32 #ifdef UNICODE LPTSTR path = new TCHAR[aClientLibName.length() + 1]; @@ -552,21 +546,21 @@ namespace SMESH } else { // get method, returning hypothesis creator - if(MYDEBUG) MESSAGE("Find GetHypothesisCreator() method ..."); + MESSAGE("Find GetHypothesisCreator() method ..."); typedef SMESHGUI_GenericHypothesisCreator* (*GetHypothesisCreator) \ ( const QString& ); GetHypothesisCreator procHandle = (GetHypothesisCreator)GetProc(libHandle, "GetHypothesisCreator"); if (!procHandle) { - if(MYDEBUG) MESSAGE("bad hypothesis client plugin library"); + MESSAGE("bad hypothesis client plugin library"); UnLoadLib(libHandle); } else { // get hypothesis creator - if(MYDEBUG) MESSAGE("Get Hypothesis Creator for " << aHypType.toLatin1().data()); + MESSAGE("Get Hypothesis Creator for " << aHypType.toLatin1().data()); aCreator = procHandle( aHypType ); if (!aCreator) { - if(MYDEBUG) MESSAGE("no such a hypothesis in this plugin"); + MESSAGE("no such a hypothesis in this plugin"); } else { // map hypothesis creator to a hypothesis name @@ -595,7 +589,7 @@ namespace SMESH const QString& aHypName, const bool /*isAlgo*/) { - if(MYDEBUG) MESSAGE("Create " << aHypType.toLatin1().data() << + MESSAGE("Create " << aHypType.toLatin1().data() << " with name " << aHypName.toLatin1().data()); HypothesisData* aHypData = GetHypothesisData(aHypType); QString aServLib = aHypData->ServerLibName; @@ -641,7 +635,7 @@ namespace SMESH bool AddHypothesisOnMesh (SMESH::SMESH_Mesh_ptr aMesh, SMESH::SMESH_Hypothesis_ptr aHyp) { - if(MYDEBUG) MESSAGE ("SMESHGUI::AddHypothesisOnMesh"); + MESSAGE ("SMESHGUI::AddHypothesisOnMesh"); int res = SMESH::HYP_UNKNOWN_FATAL; SUIT_OverrideCursor wc; @@ -669,7 +663,7 @@ namespace SMESH bool AddHypothesisOnSubMesh (SMESH::SMESH_subMesh_ptr aSubMesh, SMESH::SMESH_Hypothesis_ptr aHyp) { - if(MYDEBUG) MESSAGE("SMESHGUI::AddHypothesisOnSubMesh() "); + MESSAGE("SMESHGUI::AddHypothesisOnSubMesh() "); int res = SMESH::HYP_UNKNOWN_FATAL; SUIT_OverrideCursor wc; @@ -797,7 +791,7 @@ namespace SMESH if (SO_Hypothesis) { SObjectList listSO = SMESH::getStudy()->FindDependances(SO_Hypothesis); - if(MYDEBUG) MESSAGE("SMESHGUI::GetMeshesUsingAlgoOrHypothesis(): dependency number ="< from " << aPlatformLibName); + MESSAGE( "Create Hypothesis <" << theHypName << "> from " << aPlatformLibName); typedef GenericHypothesisCreator_i* (*GetHypothesisCreator)(const char* ); GenericHypothesisCreator_i* aCreator; @@ -458,7 +452,7 @@ GenericHypothesisCreator_i* SMESH_Gen_i::getHypothesisCreator(const char* theHyp if (myHypCreatorMap.find(string(theHypName)) == myHypCreatorMap.end()) { // load plugin library - if(MYDEBUG) MESSAGE("Loading server meshers plugin library ..."); + MESSAGE("Loading server meshers plugin library ..."); #ifdef WIN32 # ifdef UNICODE const wchar_t* path = Kernel_Utils::decode_s(aPlatformLibName); @@ -484,7 +478,7 @@ GenericHypothesisCreator_i* SMESH_Gen_i::getHypothesisCreator(const char* theHyp } // get method, returning hypothesis creator - if(MYDEBUG) MESSAGE("Find GetHypothesisCreator() method ..."); + MESSAGE("Find GetHypothesisCreator() method ..."); GetHypothesisCreator procHandle = (GetHypothesisCreator)GetProc( libHandle, "GetHypothesisCreator" ); if (!procHandle) @@ -495,7 +489,7 @@ GenericHypothesisCreator_i* SMESH_Gen_i::getHypothesisCreator(const char* theHyp } // get hypothesis creator - if(MYDEBUG) MESSAGE("Get Hypothesis Creator for " << theHypName); + MESSAGE("Get Hypothesis Creator for " << theHypName); aCreator = procHandle(theHypName); if (!aCreator) { @@ -546,8 +540,7 @@ SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName // activate the CORBA servant of hypothesis hypothesis_i = myHypothesis_i->_this(); int nextId = RegisterObject( hypothesis_i ); - if(MYDEBUG) { MESSAGE( "Add hypo to map with id = "<< nextId ); } - else { (void)nextId; } // avoid "unused variable" warning in release mode + MESSAGE( "Add hypo to map with id = "<< nextId ); } return hypothesis_i._retn(); } @@ -563,21 +556,21 @@ SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName SMESH::SMESH_Mesh_ptr SMESH_Gen_i::createMesh() { Unexpect aCatch(SALOME_SalomeException); - if(MYDEBUG) MESSAGE( "SMESH_Gen_i::createMesh" ); + MESSAGE( "SMESH_Gen_i::createMesh" ); // Get or create the GEOM_Client instance try { // create a new mesh object servant, store it in a map in study context SMESH_Mesh_i* meshServant = new SMESH_Mesh_i( GetPOA(), this ); // create a new mesh object - if(MYDEBUG) MESSAGE("myIsEmbeddedMode " << myIsEmbeddedMode); + MESSAGE("myIsEmbeddedMode " << myIsEmbeddedMode); meshServant->SetImpl( myGen.CreateMesh( myIsEmbeddedMode )); // activate the CORBA servant of Mesh SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( meshServant->_this() ); int nextId = RegisterObject( mesh ); - if(MYDEBUG) { MESSAGE( "Add mesh to map with id = "<< nextId); } - else { (void)nextId; } // avoid "unused variable" warning in release mode + MESSAGE( "Add mesh to map with id = "<< nextId); + return mesh._retn(); } catch (SALOME_Exception& S_ex) { @@ -1193,7 +1186,7 @@ char* SMESH_Gen_i::GetOption(const char* name) SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CreateMesh( GEOM::GEOM_Object_ptr theShapeObject ) { Unexpect aCatch(SALOME_SalomeException); - if(MYDEBUG) MESSAGE( "SMESH_Gen_i::CreateMesh" ); + MESSAGE( "SMESH_Gen_i::CreateMesh" ); // create mesh SMESH::SMESH_Mesh_var mesh = this->createMesh(); // set shape @@ -1227,7 +1220,7 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CreateMesh( GEOM::GEOM_Object_ptr theShapeObj SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CreateEmptyMesh() { Unexpect aCatch(SALOME_SalomeException); - if(MYDEBUG) MESSAGE( "SMESH_Gen_i::CreateMesh" ); + MESSAGE( "SMESH_Gen_i::CreateMesh" ); // create mesh SMESH::SMESH_Mesh_var mesh = this->createMesh(); @@ -1579,7 +1572,7 @@ CORBA::Boolean SMESH_Gen_i::IsReadyToCompute( SMESH::SMESH_Mesh_ptr theMesh, GEOM::GEOM_Object_ptr theShapeObject ) { Unexpect aCatch(SALOME_SalomeException); - if(MYDEBUG) MESSAGE( "SMESH_Gen_i::IsReadyToCompute" ); + MESSAGE( "SMESH_Gen_i::IsReadyToCompute" ); if ( CORBA::is_nil( theShapeObject ) ) THROW_SALOME_CORBA_EXCEPTION( "bad shape object reference", @@ -1653,7 +1646,7 @@ SMESH::compute_error_array* SMESH_Gen_i::GetComputeErrors( SMESH::SMESH_Mesh_ptr GEOM::GEOM_Object_ptr theSubObject ) { Unexpect aCatch(SALOME_SalomeException); - if(MYDEBUG) MESSAGE( "SMESH_Gen_i::GetComputeErrors()" ); + MESSAGE( "SMESH_Gen_i::GetComputeErrors()" ); if ( CORBA::is_nil( theSubObject ) && theMesh->HasShapeToMesh()) THROW_SALOME_CORBA_EXCEPTION( "bad shape object reference", SALOME::BAD_PARAM ); @@ -1727,7 +1720,7 @@ SMESH_Gen_i::GetBadInputElements( SMESH::SMESH_Mesh_ptr theMesh, CORBA::Short theSubShapeID ) { Unexpect aCatch(SALOME_SalomeException); - if(MYDEBUG) MESSAGE( "SMESH_Gen_i::GetBadInputElements()" ); + MESSAGE( "SMESH_Gen_i::GetBadInputElements()" ); if ( CORBA::is_nil( theMesh ) ) THROW_SALOME_CORBA_EXCEPTION( "bad Mesh reference",SALOME::BAD_PARAM ); @@ -1848,7 +1841,7 @@ SMESH::algo_error_array* SMESH_Gen_i::GetAlgoState( SMESH::SMESH_Mesh_ptr theMes GEOM::GEOM_Object_ptr theSubObject ) { Unexpect aCatch(SALOME_SalomeException); - if(MYDEBUG) MESSAGE( "SMESH_Gen_i::GetAlgoState()" ); + MESSAGE( "SMESH_Gen_i::GetAlgoState()" ); if ( CORBA::is_nil( theSubObject ) && theMesh->HasShapeToMesh()) THROW_SALOME_CORBA_EXCEPTION( "bad shape object reference", SALOME::BAD_PARAM ); @@ -1909,7 +1902,7 @@ SMESH_Gen_i::GetSubShapesId( GEOM::GEOM_Object_ptr theMainShapeObject, const SMESH::object_array& theListOfSubShapeObject ) { Unexpect aCatch(SALOME_SalomeException); - if(MYDEBUG) MESSAGE( "SMESH_Gen_i::GetSubShapesId" ); + MESSAGE( "SMESH_Gen_i::GetSubShapesId" ); SMESH::long_array_var shapesId = new SMESH::long_array; set setId; @@ -1936,19 +1929,19 @@ SMESH_Gen_i::GetSubShapesId( GEOM::GEOM_Object_ptr theMainShapeObject, { const TopoDS_Face& F = TopoDS::Face(exp.Current()); setId.insert(myIndexToShape.FindIndex(F)); - if(MYDEBUG) SCRUTE(myIndexToShape.FindIndex(F)); + SCRUTE(myIndexToShape.FindIndex(F)); } for (TopExp_Explorer exp(locShape,TopAbs_EDGE); exp.More(); exp.Next()) { const TopoDS_Edge& E = TopoDS::Edge(exp.Current()); setId.insert(myIndexToShape.FindIndex(E)); - if(MYDEBUG) SCRUTE(myIndexToShape.FindIndex(E)); + SCRUTE(myIndexToShape.FindIndex(E)); } for (TopExp_Explorer exp(locShape,TopAbs_VERTEX); exp.More(); exp.Next()) { const TopoDS_Vertex& V = TopoDS::Vertex(exp.Current()); setId.insert(myIndexToShape.FindIndex(V)); - if(MYDEBUG) SCRUTE(myIndexToShape.FindIndex(V)); + SCRUTE(myIndexToShape.FindIndex(V)); } } shapesId->length(setId.size()); @@ -1956,9 +1949,9 @@ SMESH_Gen_i::GetSubShapesId( GEOM::GEOM_Object_ptr theMainShapeObject, int i=0; for (iind = setId.begin(); iind != setId.end(); iind++) { - if(MYDEBUG) SCRUTE((*iind)); + SCRUTE((*iind)); shapesId[i] = (*iind); - if(MYDEBUG) SCRUTE(shapesId[i]); + SCRUTE(shapesId[i]); i++; } } @@ -1983,7 +1976,7 @@ CORBA::Boolean SMESH_Gen_i::Compute( SMESH::SMESH_Mesh_ptr theMesh, { //MEMOSTAT; Unexpect aCatch(SALOME_SalomeException); - if(MYDEBUG) MESSAGE( "SMESH_Gen_i::Compute" ); + MESSAGE( "SMESH_Gen_i::Compute" ); if ( CORBA::is_nil( theShapeObject ) && theMesh->HasShapeToMesh()) THROW_SALOME_CORBA_EXCEPTION( "bad shape object reference", @@ -2078,7 +2071,7 @@ SMESH::MeshPreviewStruct* SMESH_Gen_i::Precompute( SMESH::SMESH_Mesh_ptr theMesh SMESH::long_array& theShapesId) { Unexpect aCatch(SALOME_SalomeException); - if(MYDEBUG) MESSAGE( "SMESH_Gen_i::Precompute" ); + MESSAGE( "SMESH_Gen_i::Precompute" ); if ( CORBA::is_nil( theShapeObject ) && theMesh->HasShapeToMesh()) THROW_SALOME_CORBA_EXCEPTION( "bad shape object reference", @@ -2264,7 +2257,7 @@ SMESH::smIdType_array* SMESH_Gen_i::Evaluate(SMESH::SMESH_Mesh_ptr theMesh, GEOM::GEOM_Object_ptr theShapeObject) { Unexpect aCatch(SALOME_SalomeException); - if(MYDEBUG) MESSAGE( "SMESH_Gen_i::Evaluate" ); + MESSAGE( "SMESH_Gen_i::Evaluate" ); if ( CORBA::is_nil( theShapeObject ) && theMesh->HasShapeToMesh()) THROW_SALOME_CORBA_EXCEPTION( "bad shape object reference", SALOME::BAD_PARAM ); @@ -5087,7 +5080,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, SALOMEDS::TMPFile* SMESH_Gen_i::SaveASCII( SALOMEDS::SComponent_ptr theComponent, const char* theURL, bool isMultiFile ) { - if(MYDEBUG) MESSAGE( "SMESH_Gen_i::SaveASCII" ); + MESSAGE( "SMESH_Gen_i::SaveASCII" ); SALOMEDS::TMPFile_var aStreamFile = Save( theComponent, theURL, isMultiFile ); return aStreamFile._retn(); @@ -5227,7 +5220,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, size = aDataset->GetSize(); char* libname_str = new char[ size ]; aDataset->ReadFromDisk( libname_str ); - if(MYDEBUG) SCRUTE( libname_str ); + SCRUTE( libname_str ); libname = string( libname_str ); delete [] libname_str; aDataset->CloseOnDisk(); @@ -5249,7 +5242,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, // --> restore hypothesis from data if ( id > 0 && !hypname.empty()/* && !hypdata.empty()*/ ) { // VSR : persistent data can be empty - if(MYDEBUG) MESSAGE("VSR - load hypothesis : id = " << id << + MESSAGE("VSR - load hypothesis : id = " << id << ", name = " << hypname.c_str() << ", persistent string = " << hypdata.c_str()); SMESH::SMESH_Hypothesis_var myHyp; @@ -5269,7 +5262,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, myStudyContext->mapOldToNew( id, newId ); } else - if(MYDEBUG) MESSAGE( "VSR - SMESH_Gen::Load - can't get servant" ); + MESSAGE( "VSR - SMESH_Gen::Load - can't get servant" ); } } } @@ -5326,7 +5319,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, size = aDataset->GetSize(); char* libname_str = new char[ size ]; aDataset->ReadFromDisk( libname_str ); - if(MYDEBUG) SCRUTE( libname_str ); + SCRUTE( libname_str ); libname = string( libname_str ); delete [] libname_str; aDataset->CloseOnDisk(); @@ -5338,7 +5331,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, size = aDataset->GetSize(); char* hypdata_str = new char[ size ]; aDataset->ReadFromDisk( hypdata_str ); - if(MYDEBUG) SCRUTE( hypdata_str ); + SCRUTE( hypdata_str ); hypdata = string( hypdata_str ); delete [] hypdata_str; aDataset->CloseOnDisk(); @@ -5349,7 +5342,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, // --> restore algorithm from data if ( id > 0 && !hypname.empty()/* && !hypdata.empty()*/ ) { // VSR : persistent data can be empty - if(MYDEBUG) MESSAGE("VSR - load algo : id = " << id << + MESSAGE("VSR - load algo : id = " << id << ", name = " << hypname.c_str() << ", persistent string = " << hypdata.c_str()); SMESH::SMESH_Hypothesis_var myHyp; @@ -5373,7 +5366,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, myStudyContext->mapOldToNew( id, newId ); } else - if(MYDEBUG) MESSAGE( "VSR - SMESH_Gen::Load - can't get servant" ); + MESSAGE( "VSR - SMESH_Gen::Load - can't get servant" ); } } } @@ -5402,7 +5395,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, int aNbObjects = aTopGroup->nInternalObjects(); if ( aNbObjects > 0 ) { // create mesh - if(MYDEBUG) MESSAGE( "VSR - load mesh : id = " << id ); + MESSAGE( "VSR - load mesh : id = " << id ); SMESH::SMESH_Mesh_var myNewMesh = this->createMesh(); SMESH_Mesh_i* myNewMeshImpl = dynamic_cast( GetServant( myNewMesh ).in() ); if ( !myNewMeshImpl ) @@ -5538,7 +5531,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, aGroup->OpenOnDisk(); // get number of applied algorithms int aNbSubObjects = aGroup->nInternalObjects(); - if(MYDEBUG) MESSAGE( "VSR - number of applied algos " << aNbSubObjects ); + MESSAGE( "VSR - number of applied algos " << aNbSubObjects ); for ( int j = 0; j < aNbSubObjects; j++ ) { char name_dataset[ HDF_NAME_MAX_LEN+1 ]; aGroup->InternalObjectIndentify( j, name_dataset ); @@ -6041,7 +6034,7 @@ bool SMESH_Gen_i::LoadASCII( SALOMEDS::SComponent_ptr theComponent, const SALOMEDS::TMPFile& theStream, const char* theURL, bool isMultiFile ) { - if(MYDEBUG) MESSAGE( "SMESH_Gen_i::LoadASCII" ); + MESSAGE( "SMESH_Gen_i::LoadASCII" ); return Load( theComponent, theStream, theURL, isMultiFile ); //before call main ::Load method it's need for decipher text format to @@ -6078,7 +6071,7 @@ bool SMESH_Gen_i::LoadASCII( SALOMEDS::SComponent_ptr theComponent, void SMESH_Gen_i::Close( SALOMEDS::SComponent_ptr theComponent ) { - if(MYDEBUG) MESSAGE( "SMESH_Gen_i::Close" ); + MESSAGE( "SMESH_Gen_i::Close" ); // Clear study contexts data myStudyContext->Clear(); @@ -6102,7 +6095,7 @@ void SMESH_Gen_i::Close( SALOMEDS::SComponent_ptr theComponent ) char* SMESH_Gen_i::ComponentDataType() { - if(MYDEBUG) MESSAGE( "SMESH_Gen_i::ComponentDataType" ); + MESSAGE( "SMESH_Gen_i::ComponentDataType" ); return CORBA::string_dup( "SMESH" ); } @@ -6120,12 +6113,12 @@ char* SMESH_Gen_i::IORToLocalPersistentID( SALOMEDS::SObject_ptr /*theSObject*/, CORBA::Boolean /*isMultiFile*/, CORBA::Boolean /*isASCII*/ ) { - if(MYDEBUG) MESSAGE( "SMESH_Gen_i::IORToLocalPersistentID" ); + MESSAGE( "SMESH_Gen_i::IORToLocalPersistentID" ); if ( myStudyContext && strcmp( IORString, "" ) != 0 ) { int anId = myStudyContext->findId( IORString ); if ( anId ) { - if(MYDEBUG) MESSAGE( "VSR " << anId ); + MESSAGE( "VSR " << anId ); char strId[ 20 ]; sprintf( strId, "%d", anId ); return CORBA::string_dup( strId ); @@ -6147,7 +6140,7 @@ char* SMESH_Gen_i::LocalPersistentIDToIOR( SALOMEDS::SObject_ptr /*theSObject*/, CORBA::Boolean /*isMultiFile*/, CORBA::Boolean /*isASCII*/ ) { - if(MYDEBUG) MESSAGE( "SMESH_Gen_i::LocalPersistentIDToIOR(): id = " << aLocalPersistentID ); + MESSAGE( "SMESH_Gen_i::LocalPersistentIDToIOR(): id = " << aLocalPersistentID ); if ( myStudyContext && strcmp( aLocalPersistentID, "" ) != 0 ) { int anId = atoi( aLocalPersistentID ); diff --git a/src/SMESH_I/SMESH_Gen_i_1.cxx b/src/SMESH_I/SMESH_Gen_i_1.cxx index aeb0879d8..bbf5d6d02 100644 --- a/src/SMESH_I/SMESH_Gen_i_1.cxx +++ b/src/SMESH_I/SMESH_Gen_i_1.cxx @@ -46,12 +46,6 @@ #include -#ifdef _DEBUG_ -static int MYDEBUG = 0; -#else -static int MYDEBUG = 0; -#endif - using namespace std; //============================================================================= @@ -162,7 +156,7 @@ long SMESH_Gen_i::GetBallElementsGroupsTag() bool SMESH_Gen_i::CanPublishInStudy(CORBA::Object_ptr theIOR) { - if(MYDEBUG) MESSAGE("CanPublishInStudy - "<_is_nil() ) return true; - if(MYDEBUG) MESSAGE("CanPublishInStudy--CANT"); + MESSAGE("CanPublishInStudy--CANT"); return false; } @@ -501,7 +495,7 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishInStudy(SALOMEDS::SObject_ptr /*theSOb return aSO._retn(); if ( CORBA::is_nil( theIOR )) return aSO._retn(); - if(MYDEBUG) MESSAGE("PublishInStudy"); + MESSAGE("PublishInStudy"); // Publishing a mesh SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow( theIOR ); @@ -528,7 +522,7 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishInStudy(SALOMEDS::SObject_ptr /*theSOb aMesh = aGroup->GetMesh(); aSO = PublishGroup( aMesh, aGroup, aShapeObject, theName ); } - if(MYDEBUG) MESSAGE("PublishInStudy_END"); + MESSAGE("PublishInStudy_END"); return aSO._retn(); } @@ -540,7 +534,7 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishInStudy(SALOMEDS::SObject_ptr /*theSOb SALOMEDS::SComponent_ptr SMESH_Gen_i::PublishComponent() { - if(MYDEBUG) MESSAGE("PublishComponent"); + MESSAGE("PublishComponent"); if ( !myIsEnablePublish ) return SALOMEDS::SComponent::_nil(); @@ -602,7 +596,7 @@ SALOMEDS::SComponent_ptr SMESH_Gen_i::PublishComponent() // (to support tree representation customization and drag-n-drop) useCaseBuilder->SetRootCurrent(); useCaseBuilder->Append( father ); // component object is added as the top level item - if(MYDEBUG) MESSAGE("PublishComponent--END"); + MESSAGE("PublishComponent--END"); return father._retn(); } @@ -619,7 +613,7 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishMesh (SMESH::SMESH_Mesh_ptr theMesh, return SALOMEDS::SObject::_nil(); if ( CORBA::is_nil( theMesh )) return SALOMEDS::SObject::_nil(); - if(MYDEBUG) MESSAGE("PublishMesh--IN"); + MESSAGE("PublishMesh--IN"); // find or publish a mesh @@ -690,7 +684,7 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishMesh (SMESH::SMESH_Mesh_ptr theMesh, } } - if(MYDEBUG) MESSAGE("PublishMesh_END"); + MESSAGE("PublishMesh_END"); return aMeshSO._retn(); } @@ -900,7 +894,7 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishHypothesis (SMESH::SMESH_Hypothesis_ptr theHyp, const char* theName) { - if(MYDEBUG) MESSAGE("PublishHypothesis"); + MESSAGE("PublishHypothesis"); if ( !myIsEnablePublish ) return SALOMEDS::SObject::_nil(); if (theHyp->_is_nil()) @@ -935,7 +929,7 @@ SMESH_Gen_i::PublishHypothesis (SMESH::SMESH_Hypothesis_ptr theHyp, SetName( aHypSO, theName, hypType.in() ); - if(MYDEBUG) MESSAGE("PublishHypothesis--END"); + MESSAGE("PublishHypothesis--END"); return aHypSO._retn(); } @@ -1097,7 +1091,7 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::GetMeshOrSubmeshByShape (SMESH::SMESH_Mesh_ptr theMesh, GEOM::GEOM_Object_ptr theShape) { - if(MYDEBUG) MESSAGE("GetMeshOrSubmeshByShape"); + MESSAGE("GetMeshOrSubmeshByShape"); SALOMEDS::SObject_wrap aMeshOrSubMesh; if (theMesh->_is_nil() || ( theShape->_is_nil() && theMesh->HasShapeToMesh())) return aMeshOrSubMesh._retn(); @@ -1121,7 +1115,7 @@ SMESH_Gen_i::GetMeshOrSubmeshByShape (SMESH::SMESH_Mesh_ptr theMesh, aMeshOrSubMesh = ObjectToSObject( aSubMesh ); } } - if(MYDEBUG) MESSAGE("GetMeshOrSubmeshByShape--END"); + MESSAGE("GetMeshOrSubmeshByShape--END"); return aMeshOrSubMesh._retn(); } @@ -1134,7 +1128,7 @@ bool SMESH_Gen_i::AddHypothesisToShape(SMESH::SMESH_Mesh_ptr theMesh, GEOM::GEOM_Object_ptr theShape, SMESH::SMESH_Hypothesis_ptr theHyp) { - if(MYDEBUG) MESSAGE("AddHypothesisToShape"); + MESSAGE("AddHypothesisToShape"); if (theMesh->_is_nil() || theHyp->_is_nil() || (theShape->_is_nil() && theMesh->HasShapeToMesh()) ) @@ -1175,7 +1169,7 @@ bool SMESH_Gen_i::AddHypothesisToShape(SMESH::SMESH_Mesh_ptr theMesh, addReference( AHR, theHyp ); - if(MYDEBUG) MESSAGE("AddHypothesisToShape--END"); + MESSAGE("AddHypothesisToShape--END"); return true; } diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index b307c7bbb..badd43640 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -96,12 +96,6 @@ #include "SMESH_TryCatch.hxx" // include after OCCT headers! -#ifdef _DEBUG_ -static int MYDEBUG = 0; -#else -static int MYDEBUG = 0; -#endif - using namespace std; using SMESH::TPythonDump; using SMESH::TVar; @@ -664,7 +658,7 @@ SMESH_Mesh_i::AddHypothesis(GEOM::GEOM_Object_ptr aSubShape, if ( prevNbMeshEnt > 0 /*newNbMeshEnt != prevNbMeshEnt*/ ) _gen_i->UpdateIcons( mesh ); } - if(MYDEBUG) MESSAGE( " AddHypothesis(): status = " << status ); + MESSAGE( " AddHypothesis(): status = " << status ); // Update Python script TPythonDump() << "status = " << mesh << ".AddHypothesis( " @@ -684,7 +678,7 @@ SMESH_Mesh_i::addHypothesis(GEOM::GEOM_Object_ptr aSubShape, SMESH::SMESH_Hypothesis_ptr anHyp, std::string* anErrorText) { - if(MYDEBUG) MESSAGE("addHypothesis"); + MESSAGE("addHypothesis"); if (CORBA::is_nil( aSubShape ) && HasShapeToMesh()) THROW_SALOME_CORBA_EXCEPTION("bad Sub-shape reference",SALOME::BAD_PARAM); @@ -770,7 +764,7 @@ SMESH_Hypothesis::Hypothesis_Status SMESH_Mesh_i::removeHypothesis(GEOM::GEOM_Object_ptr aSubShape, SMESH::SMESH_Hypothesis_ptr anHyp) { - if(MYDEBUG) MESSAGE("removeHypothesis()"); + MESSAGE("removeHypothesis()"); if (CORBA::is_nil( aSubShape ) && HasShapeToMesh()) THROW_SALOME_CORBA_EXCEPTION("bad Sub-shape reference", SALOME::BAD_PARAM); @@ -816,7 +810,7 @@ SMESH::ListOfHypothesis * SMESH_Mesh_i::GetHypothesisList(GEOM::GEOM_Object_ptr aSubShape) { Unexpect aCatch(SALOME_SalomeException); - if (MYDEBUG) MESSAGE("GetHypothesisList"); + MESSAGE("GetHypothesisList"); if (_impl->HasShapeToMesh() && CORBA::is_nil(aSubShape)) THROW_SALOME_CORBA_EXCEPTION("bad Sub-shape reference", SALOME::BAD_PARAM); @@ -856,7 +850,7 @@ SMESH_Mesh_i::GetHypothesisList(GEOM::GEOM_Object_ptr aSubShape) SMESH::submesh_array* SMESH_Mesh_i::GetSubMeshes() { Unexpect aCatch(SALOME_SalomeException); - if (MYDEBUG) MESSAGE("GetSubMeshes"); + MESSAGE("GetSubMeshes"); SMESH::submesh_array_var aList = new SMESH::submesh_array(); @@ -1220,7 +1214,7 @@ void SMESH_Mesh_i::RemoveGroupWithContents( SMESH::SMESH_GroupBase_ptr theGroup SMESH::ListOfGroups * SMESH_Mesh_i::GetGroups() { Unexpect aCatch(SALOME_SalomeException); - if (MYDEBUG) MESSAGE("GetGroups"); + MESSAGE("GetGroups"); SMESH::ListOfGroups_var aList = new SMESH::ListOfGroups(); @@ -3122,7 +3116,7 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::ConvertToStandalone( SMESH::SMESH_GroupBase SMESH::SMESH_subMesh_ptr SMESH_Mesh_i::createSubMesh( GEOM::GEOM_Object_ptr theSubShapeObject ) { - if(MYDEBUG) MESSAGE( "createSubMesh" ); + MESSAGE( "createSubMesh" ); TopoDS_Shape myLocSubShape = _gen_i->GeomObjectToShape(theSubShapeObject); ::SMESH_subMesh * mySubMesh = _impl->GetSubMesh(myLocSubShape); int subMeshId = 0; @@ -3154,8 +3148,7 @@ SMESH::SMESH_subMesh_ptr SMESH_Mesh_i::createSubMesh( GEOM::GEOM_Object_ptr theS // register CORBA object for persistence int nextId = _gen_i->RegisterObject( subMesh ); - if(MYDEBUG) { MESSAGE( "Add submesh to map with id = "<< nextId); } - else { (void)nextId; } // avoid "unused variable" warning + MESSAGE( "Add submesh to map with id = "<< nextId); // to track changes of GEOM groups if ( subMeshId > 0 ) @@ -3291,8 +3284,7 @@ SMESH::SMESH_GroupBase_ptr SMESH_Mesh_i::createGroup (SMESH::ElementType // register CORBA object for persistence int nextId = _gen_i->RegisterObject( aGroup ); - if(MYDEBUG) { MESSAGE( "Add group to map with id = "<< nextId); } - else { nextId = ( nextId > 0 ); } // avoid "unused variable" warning in release mode + MESSAGE( "Add group to map with id = "<< nextId); // to track changes of GEOM groups if ( !theShape.IsNull() ) { @@ -3313,7 +3305,7 @@ SMESH::SMESH_GroupBase_ptr SMESH_Mesh_i::createGroup (SMESH::ElementType void SMESH_Mesh_i::removeGroup( const int theId ) { - if(MYDEBUG) MESSAGE("SMESH_Mesh_i::removeGroup()" ); + MESSAGE("SMESH_Mesh_i::removeGroup()"); if ( _mapGroups.find( theId ) != _mapGroups.end() ) { SMESH::SMESH_GroupBase_var group = _mapGroups[theId]; _mapGroups.erase( theId ); @@ -3480,7 +3472,7 @@ void SMESH_Mesh_i::onHypothesisModified(int theHypID, bool theUpdateIcons) void SMESH_Mesh_i::SetImpl(::SMESH_Mesh * impl) { - if(MYDEBUG) MESSAGE("SMESH_Mesh_i::SetImpl"); + MESSAGE("SMESH_Mesh_i::SetImpl"); _impl = impl; if ( _impl ) _impl->SetCallUp( new TCallUp_i(this)); @@ -3494,7 +3486,7 @@ void SMESH_Mesh_i::SetImpl(::SMESH_Mesh * impl) ::SMESH_Mesh & SMESH_Mesh_i::GetImpl() { - if(MYDEBUG) MESSAGE("SMESH_Mesh_i::GetImpl()"); + MESSAGE("SMESH_Mesh_i::GetImpl()"); return *_impl; } @@ -5189,7 +5181,7 @@ CORBA::LongLong SMESH_Mesh_i::GetMeshPtr() _preMeshInfo->FullLoadFromFile(); CORBA::LongLong pointeur = CORBA::LongLong(_impl); - if ( MYDEBUG ) MESSAGE("CORBA::LongLong SMESH_Mesh_i::GetMeshPtr() "<RegisterObject( groupVar ); - if(MYDEBUG) { MESSAGE( "Add group to map with id = "<< nextId); } - else { (void)nextId; } // avoid "unused variable" warning in release mode + MESSAGE( "Add group to map with id = "<< nextId); // publishing the groups in the study GEOM::GEOM_Object_var shapeVar = _gen_i->ShapeToGeomObject( shape ); diff --git a/src/SMESH_I/SMESH_NoteBook.cxx b/src/SMESH_I/SMESH_NoteBook.cxx index fdc571e22..821276c4f 100644 --- a/src/SMESH_I/SMESH_NoteBook.cxx +++ b/src/SMESH_I/SMESH_NoteBook.cxx @@ -36,12 +36,6 @@ #include #include -#ifdef _DEBUG_ -static int MYDEBUG = 0; -#else -static int MYDEBUG = 0; -#endif - using namespace std; @@ -242,7 +236,7 @@ void SMESH_NoteBook::ReplaceVariables() TCollection_AsciiString aMethod = aCmd->GetMethod(); TCollection_AsciiString aObject = aCmd->GetObject(); TCollection_AsciiString aResultValue = aCmd->GetResultValue(); - if(MYDEBUG) { + if(SALOME::VerbosityActivated()) { cout<<"Command before : "<< aCmd->GetString()<AddDistribution(aCmd->GetArg(1)); - if(MYDEBUG) + if(SALOME::VerbosityActivated()) cout<<"Add Distribution :"<GetArg(1)<GetString()< allVars = aGen->GetAllParameters( anID.in() ); SALOMEDS::ListOfListOfStrings_var aSections = aStudy->ParseVariables(aParameters.in()); _entry2VarsMap[ TCollection_AsciiString( anID.in() )] = allVars; - if(MYDEBUG) { + if(SALOME::VerbosityActivated()) { cout<<"Entry : "<< anID<_is_nil() ) { anObjType = "Mesh"; } - if(MYDEBUG) + if(SALOME::VerbosityActivated()) cout<<"The object Type : "< -#ifdef _DEBUG_ -static int MYDEBUG = 0; -#else -static int MYDEBUG = 0; -#endif - #include "SMESH_TryCatch.hxx" namespace SMESH @@ -92,7 +86,7 @@ namespace SMESH if ( !objEntry.empty() ) aCollection += (TVar::ObjPrefix() + objEntry ).c_str(); aSMESHGen->AddToPythonScript(aCollection); - if(MYDEBUG) MESSAGE(aString); + MESSAGE(aString); // prevent misuse of already treated variables aSMESHGen->UpdateParameters(CORBA::Object_var().in(),""); }