//#include <stdlib.h>
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-//#define _DEXCEPT_
-#else
-static int MYDEBUG = 0;
-#endif
-
#define _EDF_NODE_IDS_
using namespace MED;
try {
#endif
myFamilies.clear();
- if(MYDEBUG) MESSAGE("Perform - myFile : "<<myFile);
+ MESSAGE("Perform - myFile : "<<myFile);
PWrapper aMed = CrWrapperR(myFile);
aResult = DRS_EMPTY;
if (myMeshId != -1) aMeshName = SMESH_Comment( myMeshId );
else aMeshName = myMeshName;
- if(MYDEBUG) MESSAGE("Perform - aMeshName : "<<aMeshName<<"; "<<aMeshInfo->GetName());
+ MESSAGE("Perform - aMeshName : "<<aMeshName<<"; "<<aMeshInfo->GetName());
if ( aMeshName != aMeshInfo->GetName() ) continue;
aResult = DRS_OK;
//------------------------------------------------
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;
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 ));
}
EBooleen anIsNodeNum = aNodeInfo->IsElemNum();
TInt aNbElems = aNodeInfo->GetNbElem();
- if(MYDEBUG) MESSAGE("Perform - aNodeInfo->GetNbElem() = "<<aNbElems<<"; anIsNodeNum = "<<anIsNodeNum);
+ MESSAGE("Perform - aNodeInfo->GetNbElem() = "<<aNbElems<<"; anIsNodeNum = "<<anIsNodeNum);
DriverMED_FamilyPtr aFamily;
for ( TInt iElem = 0; iElem < aNbElems; iElem++ )
{
PCellInfo aCellInfo = aMed->GetPCellInfo(aMeshInfo,anEntity,aGeom);
EBooleen anIsElemNum = takeNumbers ? aCellInfo->IsElemNum() : eFAUX;
TInt aNbElems = aCellInfo->GetNbElem();
- if(MYDEBUG) MESSAGE("Perform - anEntity = "<<anEntity<<"; anIsElemNum = "<<anIsElemNum);
- if(MYDEBUG) MESSAGE("Perform - aGeom = "<<aGeom<<"; aNbElems = "<<aNbElems);
+ MESSAGE("Perform - anEntity = "<<anEntity<<"; anIsElemNum = "<<anIsElemNum);
+ MESSAGE("Perform - aGeom = "<<aGeom<<"; aNbElems = "<<aNbElems);
TInt aNbNodes = -1;
switch(aGeom){
aResult = DRS_WARN_DESCENDING;
}
- if(MYDEBUG) MESSAGE("Perform - aResult status = "<<aResult);
+ MESSAGE("Perform - aResult status = "<<aResult);
return aResult;
}
list<string> aMeshNames;
try {
- if(MYDEBUG) MESSAGE("GetMeshNames - myFile : " << myFile);
+ MESSAGE("GetMeshNames - myFile : " << myFile);
theStatus = DRS_OK;
PWrapper aMed = CrWrapperR(myFile);
}
const char* aGroupName = theGroup->GetStoreName();
- if(MYDEBUG) MESSAGE("Get Group " << aGroupName);
+ MESSAGE("Get Group " << aGroupName);
if (( famVecPtr = myGroups2FamiliesMap.ChangeSeek( aGroupName )))
{
using namespace std;
-
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
namespace
{
/*!
using namespace UNV2411;
TDataSet aDataSet2411;
UNV2411::Read(in_stream,aDataSet2411);
- if(MYDEBUG) MESSAGE("Perform - aDataSet2411.size() = "<<aDataSet2411.size());
+ MESSAGE("Perform - aDataSet2411.size() = "<<aDataSet2411.size());
// Move nodes in a global CS
if ( !aCoordSysDataSet.empty() )
TDataSet aDataSet2412;
UNV2412::Read(in_stream,aDataSet2412);
TDataSet::const_iterator anIter = aDataSet2412.begin();
- if(MYDEBUG) MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size());
+ MESSAGE("Perform - aDataSet2412.size() = "<<aDataSet2412.size());
for(; anIter != aDataSet2412.end(); anIter++)
{
SMDS_MeshElement* anElement = NULL;
using namespace UNV2417;
TDataSet aDataSet2417;
UNV2417::Read(in_stream,aDataSet2417);
- if(MYDEBUG) MESSAGE("Perform - aDataSet2417.size() = "<<aDataSet2417.size());
+ MESSAGE("Perform - aDataSet2417.size() = "<<aDataSet2417.size());
if (aDataSet2417.size() > 0)
{
TDataSet::const_iterator anIter = aDataSet2417.begin();
#include "MED_Wrapper.hxx"
#include "MED_Utilities.hxx"
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-static int MYVALUEDEBUG = 0;
-#else
-// static int MYDEBUG = 0;
-// static int MYVALUEDEBUG = 0;
-#endif
-
namespace MED
{
//---------------------------------------------------------------
const PMeshInfo& theMeshInfo,
const MED::TEntityInfo& theEntityInfo)
{
- MSG(MYDEBUG,"GetElemsByEntity(...)");
+ MSG("GetElemsByEntity(...)");
TEntity2TGeom2ElemInfo anEntity2TGeom2ElemInfo;
MED::TEntityInfo::const_iterator anIter = theEntityInfo.begin();
PElemInfo anElemInfo;
aGeom2ElemInfo[aGeom] = theWrapper->GetPElemInfo(theMeshInfo,anEntity,aGeom,MED::eNOD,&anErr);
}
}
- ADDMSG(MYDEBUG,"\n");
+ ADDMSG("\n");
return anEntity2TGeom2ElemInfo;
}
GetFamilyInfoSet(const PWrapper& theWrapper,
const PMeshInfo& theMeshInfo)
{
- MSG(MYDEBUG,"GetFamilies(...)");
+ MSG("GetFamilies(...)");
TErr anErr;
TFamilyInfoSet aFamilyInfoSet;
TInt aNbFam = theWrapper->GetNbFamilies(*theMeshInfo);
- INITMSG(MYDEBUG,"GetNbFamilies() = "<<aNbFam<<"\n");
+ INITMSG("GetNbFamilies() = "<<aNbFam<<"\n");
for(TInt iFam = 1; iFam <= aNbFam; iFam++){
PFamilyInfo aFamilyInfo = theWrapper->GetPFamilyInfo(theMeshInfo,iFam,&anErr);
if(anErr >= 0)
aFamilyInfoSet.insert(aFamilyInfo);
}
- ADDMSG(MYDEBUG,"\n");
+ ADDMSG("\n");
return aFamilyInfoSet;
}
TGroupInfo
GetGroupInfo(const TFamilyInfoSet& theFamilyInfoSet)
{
- MSG(MYDEBUG,"GetFamiliesByGroup(...)");
+ MSG("GetFamiliesByGroup(...)");
TGroupInfo aGroup;
TFamilyInfoSet::const_iterator anIter = theFamilyInfoSet.begin();
for(; anIter != theFamilyInfoSet.end(); anIter++){
}
}
-#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 = '"<<aName<<"'\n");
+ INITMSG("aGroupName = '"<<aName<<"'\n");
const TFamilyInfoSet& aFamilyInfoSet = anIter->second;
TFamilyInfoSet::const_iterator anFamIter = aFamilyInfoSet.begin();
for(; anFamIter != aFamilyInfoSet.end(); anFamIter++){
const PFamilyInfo& aFamilyInfo = *anFamIter;
- INITMSG(MYDEBUG,"aFamilyName = '"<<aFamilyInfo->GetName()<<"'\n");
+ INITMSG("aFamilyName = '"<<aFamilyInfo->GetName()<<"'\n");
}
}
- ADDMSG(MYDEBUG,"\n");
+ ADDMSG("\n");
}
-#endif
return aGroup;
}
const PMeshInfo& theMeshInfo,
const MED::TEntityInfo& theEntityInfo)
{
- MSG(MYDEBUG,"GetFieldsByEntity(...)");
+ MSG("GetFieldsByEntity(...)");
TFieldInfo2TimeStampInfoSet aFieldInfo2TimeStampInfoSet;
TInt aNbFields = theWrapper->GetNbFields();
- INITMSG(MYDEBUG,"GetNbFields() = "<<aNbFields<<"\n");
+ INITMSG("GetNbFields() = "<<aNbFields<<"\n");
for(TInt iField = 1; iField <= aNbFields; iField++){
PFieldInfo aFieldInfo = theWrapper->GetPFieldInfo(theMeshInfo,iField);
- INITMSG(MYDEBUG,"aFieldName = '"<<aFieldInfo->GetName()<<
+ INITMSG("aFieldName = '"<<aFieldInfo->GetName()<<
"'; aNbComp = "<<aFieldInfo->GetNbComp()<<"; ");
TGeom2Size aGeom2Size;
EEntiteMaillage anEntity = EEntiteMaillage(-1);
TInt aNbTimeStamps = theWrapper->GetNbTimeStamps(aFieldInfo,theEntityInfo,anEntity,aGeom2Size);
- ADDMSG(MYDEBUG,"anEntity = "<<anEntity<<"; GetNbTimeStamps = "<<aNbTimeStamps<<"\n");
+ ADDMSG("anEntity = "<<anEntity<<"; GetNbTimeStamps = "<<aNbTimeStamps<<"\n");
for(TInt iTimeStamp = 1; iTimeStamp <= aNbTimeStamps; iTimeStamp++){
PTimeStampInfo aTimeStamp =
theWrapper->GetPTimeStampInfo(aFieldInfo,anEntity,aGeom2Size,iTimeStamp);
aFieldInfo2TimeStampInfoSet[aFieldInfo].insert(aTimeStamp);
- INITMSG(MYDEBUG,
- "aDt = "<<aTimeStamp->GetDt()<<
- ", Unit = \'"<<aTimeStamp->GetUnitDt()<<"\n");
+ INITMSG("aDt = "<<aTimeStamp->GetDt()<<", Unit = \'"<<aTimeStamp->GetUnitDt()<<"\n");
}
}
- ADDMSG(MYDEBUG,"\n");
+ ADDMSG("\n");
return aFieldInfo2TimeStampInfoSet;
}
const TEntity2TGeom2ElemInfo& theEntity2TGeom2ElemInfo,
const TFamilyInfoSet& theFamilyInfoSet)
{
- MSG(MYDEBUG,"GetFamiliesByEntity(...)");
+ MSG("GetFamiliesByEntity(...)");
TEntity2FamilySet anEntity2FamilySet;
typedef std::map<TInt,PFamilyInfo> TId2Family;
TEntity2FamilyID::const_iterator anIter = anEntity2FamilyID.begin();
for(; anIter != anEntity2FamilyID.end(); anIter++){
const EEntiteMaillage& anEntity = anIter->first;
- INITMSG(MYDEBUG,"anEntity = "<<anEntity<<":\n");
+ INITMSG("anEntity = "<<anEntity<<":\n");
const TFamilyID2Size& aFamilyID2Size = anIter->second;
TFamilyID2Size::const_iterator anIter2 = aFamilyID2Size.begin();
for(; anIter2 != aFamilyID2Size.end(); anIter2++){
if(anIter3 != anId2Family.end()){
const PFamilyInfo& aFamilyInfo = anIter3->second;
anEntity2FamilySet[anEntity].insert(TFamilyTSize(aFamilyInfo,aSize));
- INITMSG(MYDEBUG,
- "aFamilyName = '"<<aFamilyInfo->GetName()<<
+ INITMSG("aFamilyName = '"<<aFamilyInfo->GetName()<<
"' anId = "<<aFamilyInfo->GetId()<<"\n");
}
}
}
}
}
- ADDMSG(MYDEBUG,"\n");
+ ADDMSG("\n");
return anEntity2FamilySet;
}
TErr* theErr,
EModeSwitch theMode)
{
- INITMSG(MYDEBUG,"GetKey2Gauss - theMode = "<<theMode<<std::endl);
+ INITMSG("GetKey2Gauss - theMode = "<<theMode<<std::endl);
TKey2Gauss aKey2Gauss;
TInt aNbGauss = theWrapper->GetNbGauss(theErr);
for(TInt anId = 1; anId <= aNbGauss; anId++){
#ifdef _DEBUG_
const EGeometrieElement& aGeom = boost::get<0>(aKey);
const std::string& aName = boost::get<1>(aKey);
- INITMSG(MYDEBUG,
- "- aGeom = "<<aGeom<<
- "; aName = '"<<aName<<"'"<<
- std::endl);
+ INITMSG("- aGeom = "<<aGeom<<"; aName = '"<<aName<<"'"<<std::endl);
#endif
}
TErr* theErr,
EModeProfil theMode)
{
- INITMSG(MYDEBUG,"GetMKey2Profile - theMode = "<<theMode<<std::endl);
+ INITMSG("GetMKey2Profile - theMode = "<<theMode<<std::endl);
TKey2Profile aKey2Profile;
TInt aNbProfiles = theWrapper->GetNbProfiles(theErr);
for(TInt anId = 1; anId <= aNbProfiles; anId++){
const std::string& aName = boost::get<0>(aPreInfo);
aKey2Profile[aName] = anInfo;
-#ifdef _DEBUG_
- INITMSG(MYDEBUG,
- "- aName = '"<<aName<<"'"<<
- " : "<<
- std::endl);
- TInt aNbElem = anInfo->GetSize();
- for(TInt iElem = 0; iElem < aNbElem; iElem++){
- ADDMSG(MYVALUEDEBUG,anInfo->GetElemNum(iElem)<<", ");
- }
- ADDMSG(MYVALUEDEBUG, std::endl);
-#endif
+ if(SALOME::VerbosityActivated()){
+ INITMSG("- aName = '"<<aName<<"'"<<" : "<<std::endl);
+ TInt aNbElem = anInfo->GetSize();
+ for(TInt iElem = 0; iElem < aNbElem; iElem++){
+ ADDMSG(anInfo->GetElemNum(iElem)<<", ");
+ }
+
+ ADDMSG(std::endl);
+ }
}
return TMKey2Profile(theMode,aKey2Profile);
}
#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
{
//---------------------------------------------------------------
{
TInt aNbRef = theRefCoord.size();
TInt aNbRef2 = GetNbRef();
- INITMSG(MYDEBUG,"TShapeFun::IsSatisfy "<<
+ INITMSG("TShapeFun::IsSatisfy "<<
"- aNbRef("<<aNbRef<<")"<<
"; aNbRef2("<<aNbRef2<<")\n");
bool anIsSatisfy = (aNbRef == aNbRef2);
}
}
if(!anIsEqual){
-#ifdef _DEBUG_
- TCCoordSlice aCoord = GetCoord(aRefId);
- INITMSG(MYDEBUG,aRefId + 1<<": aCoord = {");
- TInt aDim = aCoord.size();
- for(TInt anId = 0; anId < aDim; anId++)
- ADDMSG(MYDEBUG,"\t"<<aCoord[anId]);
- const TCCoordSlice& aCoord2 = theRefCoord[aRefId];
- ADDMSG(MYDEBUG,"}\t!=\taCoord2 = {");
- for(TInt anId = 0; anId < aDim; anId++)
- ADDMSG(MYDEBUG,"\t"<<aCoord2[anId]);
- ADDMSG(MYDEBUG,"}\n");
-#endif
-#ifndef _DEBUG_
- BEGMSG(MYDEBUG,"anIsSatisfy = "<<anIsSatisfy<<"\n");
+ if(SALOME::VerbosityActivated()){
+ TCCoordSlice aCoord = GetCoord(aRefId);
+ INITMSG(aRefId + 1<<": aCoord = {");
+ TInt aDim = aCoord.size();
+ for(TInt anId = 0; anId < aDim; anId++)
+ ADDMSG("\t"<<aCoord[anId]);
+ const TCCoordSlice& aCoord2 = theRefCoord[aRefId];
+ ADDMSG("}\t!=\taCoord2 = {");
+ for(TInt anId = 0; anId < aDim; anId++)
+ ADDMSG("\t"<<aCoord2[anId]);
+ ADDMSG("}\n");
+ }
+
+ BEGMSG("anIsSatisfy = "<<anIsSatisfy<<"\n");
return anIsSatisfy;
-#endif
}
}
}
- BEGMSG(MYDEBUG,"anIsSatisfy = "<<anIsSatisfy<<"\n");
+ BEGMSG("anIsSatisfy = "<<anIsSatisfy<<"\n");
return anIsSatisfy;
}
TGaussCoord& theGaussCoord,
EModeSwitch theMode)
{
- INITMSG(MYDEBUG,"TShapeFun::Eval"<<std::endl);
+ INITMSG("TShapeFun::Eval"<<std::endl);
if(IsSatisfy(theRef)){
const PMeshInfo& aMeshInfo = theCellInfo.GetMeshInfo();
InitFun(theRef,theGauss,aFun);
TInt aConnDim = theCellInfo.GetConnDim();
- INITMSG(MYDEBUG,"aDim = "<<aDim<<
+ INITMSG("aDim = "<<aDim<<
"; aNbGauss = "<<aNbGauss<<
"; aNbElem = "<<aNbElem<<
"; aNbNodes = "<<theNodeInfo.GetNbElem()<<
#ifdef _DEBUG_
{
- INITMSG(MYVALUEDEBUG,"theGauss: ");
+ INITMSG("theGauss: ");
for(TInt aGaussId = 0; aGaussId < aNbGauss; aGaussId++){
TCCoordSlice aCoordSlice = theGauss[aGaussId];
- ADDMSG(MYVALUEDEBUG,"{");
+ ADDMSG("{");
for(TInt aDimId = 0; aDimId < aDim; aDimId++){
- ADDMSG(MYVALUEDEBUG,aCoordSlice[aDimId]<<" ");
+ ADDMSG(aCoordSlice[aDimId]<<" ");
}
- ADDMSG(MYVALUEDEBUG,"} ");
+ ADDMSG("} ");
}
- ADDMSG(MYVALUEDEBUG,std::endl);
+ ADDMSG(std::endl);
}
for(TInt anElemId = 0; anElemId < aNbElem; anElemId++){
TCCoordSliceArr aCoordSliceArr = theGaussCoord.GetCoordSliceArr(anElemId);
- INITMSG(MYVALUEDEBUG,"");
+ INITMSG("");
for(TInt aGaussId = 0; aGaussId < aNbGauss; aGaussId++){
TCCoordSlice aCoordSlice = aCoordSliceArr[aGaussId];
- ADDMSG(MYVALUEDEBUG,"{");
+ ADDMSG("{");
for(TInt aDimId = 0; aDimId < aDim; aDimId++){
- ADDMSG(MYVALUEDEBUG,aCoordSlice[aDimId]<<" ");
+ ADDMSG(aCoordSlice[aDimId]<<" ");
}
- ADDMSG(MYVALUEDEBUG,"} ");
+ ADDMSG("} ");
}
- ADDMSG(MYVALUEDEBUG,std::endl);
+ ADDMSG(std::endl);
}
#endif
return true;
const TElemNum& theElemNum,
EModeSwitch theMode)
{
- INITMSG(MYDEBUG,"GetGaussCoord3D\n");
+ INITMSG("GetGaussCoord3D\n");
if(theGaussInfo.myGeom == theCellInfo.myGeom){
EGeometrieElement aGeom = theGaussInfo.myGeom;
switch(aGeom){
case eSEG2: {
- INITMSG(MYDEBUG,"eSEG2"<<std::endl);
+ INITMSG("eSEG2"<<std::endl);
if(TSeg2a().Eval(theCellInfo,theNodeInfo,theElemNum,aRefSlice,aGaussSlice,theGaussCoord,theMode))
return true;
break;
}
case eSEG3: {
- INITMSG(MYDEBUG,"eSEG3"<<std::endl);
+ INITMSG("eSEG3"<<std::endl);
if(TSeg3a().Eval(theCellInfo,theNodeInfo,theElemNum,aRefSlice,aGaussSlice,theGaussCoord,theMode))
return true;
break;
}
case eTRIA3: {
- INITMSG(MYDEBUG,"eTRIA3"<<std::endl);
+ INITMSG("eTRIA3"<<std::endl);
if(TTria3a().Eval(theCellInfo,theNodeInfo,theElemNum,aRefSlice,aGaussSlice,theGaussCoord,theMode))
return true;
break;
}
case eTRIA6: {
- INITMSG(MYDEBUG,"eTRIA6"<<std::endl);
+ INITMSG("eTRIA6"<<std::endl);
if(TTria6a().Eval(theCellInfo,theNodeInfo,theElemNum,aRefSlice,aGaussSlice,theGaussCoord,theMode))
return true;
break;
}
case eQUAD4: {
- INITMSG(MYDEBUG,"eQUAD4"<<std::endl);
+ INITMSG("eQUAD4"<<std::endl);
if(TQuad4a().Eval(theCellInfo,theNodeInfo,theElemNum,aRefSlice,aGaussSlice,theGaussCoord,theMode))
return true;
break;
}
case eQUAD8: {
- INITMSG(MYDEBUG,"eQUAD8"<<std::endl);
+ INITMSG("eQUAD8"<<std::endl);
if(TQuad8a().Eval(theCellInfo,theNodeInfo,theElemNum,aRefSlice,aGaussSlice,theGaussCoord,theMode))
return true;
break;
}
case eQUAD9: {
- INITMSG(MYDEBUG,"eQUAD9"<<std::endl);
+ INITMSG("eQUAD9"<<std::endl);
if(TQuad9a().Eval(theCellInfo,theNodeInfo,theElemNum,aRefSlice,aGaussSlice,theGaussCoord,theMode))
return true;
break;
}
case eTETRA4: {
- INITMSG(MYDEBUG,"eTETRA4"<<std::endl);
+ INITMSG("eTETRA4"<<std::endl);
if(TTetra4a().Eval(theCellInfo,theNodeInfo,theElemNum,aRefSlice,aGaussSlice,theGaussCoord,theMode))
return true;
break;
}
case ePYRA5: {
- INITMSG(MYDEBUG,"ePYRA5"<<std::endl);
+ INITMSG("ePYRA5"<<std::endl);
if(TPyra5a().Eval(theCellInfo,theNodeInfo,theElemNum,aRefSlice,aGaussSlice,theGaussCoord,theMode))
return true;
break;
}
case ePENTA6: {
- INITMSG(MYDEBUG,"ePENTA6"<<std::endl);
+ INITMSG("ePENTA6"<<std::endl);
if(TPenta6a().Eval(theCellInfo,theNodeInfo,theElemNum,aRefSlice,aGaussSlice,theGaussCoord,theMode))
return true;
break;
}
case eHEXA8: {
- INITMSG(MYDEBUG,"eHEXA8"<<std::endl);
+ INITMSG("eHEXA8"<<std::endl);
if(THexa8a().Eval(theCellInfo,theNodeInfo,theElemNum,aRefSlice,aGaussSlice,theGaussCoord,theMode))
return true;
break;
}
case eTETRA10: {
- INITMSG(MYDEBUG,"eTETRA10"<<std::endl);
+ INITMSG("eTETRA10"<<std::endl);
if(TTetra10a().Eval(theCellInfo,theNodeInfo,theElemNum,aRefSlice,aGaussSlice,theGaussCoord,theMode))
return true;
break;
}
case ePYRA13: {
- INITMSG(MYDEBUG,"ePYRA13"<<std::endl);
+ INITMSG("ePYRA13"<<std::endl);
if(TPyra13a().Eval(theCellInfo,theNodeInfo,theElemNum,aRefSlice,aGaussSlice,theGaussCoord,theMode))
return true;
break;
}
case ePENTA15: {
- INITMSG(MYDEBUG,"ePENTA15"<<std::endl);
+ INITMSG("ePENTA15"<<std::endl);
if(TPenta15a().Eval(theCellInfo,theNodeInfo,theElemNum,aRefSlice,aGaussSlice,theGaussCoord,theMode))
return true;
break;
}
case eHEXA20: {
- INITMSG(MYDEBUG,"eHEXA20"<<std::endl);
+ INITMSG("eHEXA20"<<std::endl);
if(THexa20a().Eval(theCellInfo,theNodeInfo,theElemNum,aRefSlice,aGaussSlice,theGaussCoord,theMode))
return true;
break;
}
default:
- INITMSG(MYDEBUG,"eNONE"<<std::endl);
+ INITMSG("eNONE"<<std::endl);
return false;
}
}
const TElemNum& theElemNum,
EModeSwitch theMode)
{
- INITMSG(MYDEBUG,"GetBaryCenter\n");
+ INITMSG("GetBaryCenter\n");
const PMeshInfo& aMeshInfo = theCellInfo.GetMeshInfo();
TInt aDim = aMeshInfo->GetDim();
static TInt aNbGauss = 1;
TInt aConnDim = theCellInfo.GetConnDim();
- INITMSGA(MYDEBUG,0,
+ INITMSGA(0,
"- aDim = "<<aDim<<
"; aNbGauss = "<<aNbGauss<<
"; aNbElem = "<<aNbElem<<
#ifdef _DEBUG_
for(TInt anElemId = 0; anElemId < aNbElem; anElemId++){
TCoordSliceArr aCoordSliceArr = theGaussCoord.GetCoordSliceArr(anElemId);
- INITMSG(MYVALUEDEBUG,"");
+ INITMSG("");
for(TInt aGaussId = 0; aGaussId < aNbGauss; aGaussId++){
TCoordSlice& aCoordSlice = aCoordSliceArr[aGaussId];
- ADDMSG(MYVALUEDEBUG,"{");
+ ADDMSG("{");
for(TInt aDimId = 0; aDimId < aDim; aDimId++){
- ADDMSG(MYVALUEDEBUG,aCoordSlice[aDimId]<<" ");
+ ADDMSG(aCoordSlice[aDimId]<<" ");
}
- ADDMSG(MYVALUEDEBUG,"} ");
+ ADDMSG("} ");
}
- ADDMSG(MYVALUEDEBUG,std::endl);
+ ADDMSG(std::endl);
}
#endif
const TElemNum& theElemNum,
EModeSwitch theMode)
{
- INITMSG(MYDEBUG,"GetBaryCenter\n");
+ INITMSG("GetBaryCenter\n");
const PMeshInfo& aMeshInfo = thePolygoneInfo.GetMeshInfo();
TInt aDim = aMeshInfo->GetDim();
static TInt aNbGauss = 1;
theGaussCoord.Init(aNbElem,aNbGauss,aDim,theMode);
- INITMSGA(MYDEBUG,0,
+ INITMSGA(0,
"- aDim = "<<aDim<<
"; aNbGauss = "<<aNbGauss<<
"; aNbElem = "<<aNbElem<<
const TElemNum& theElemNum,
EModeSwitch theMode)
{
- INITMSG(MYDEBUG,"GetBaryCenter\n");
+ INITMSG("GetBaryCenter\n");
const PMeshInfo& aMeshInfo = thePolyedreInfo.GetMeshInfo();
TInt aDim = aMeshInfo->GetDim();
static TInt aNbGauss = 1;
theGaussCoord.Init(aNbElem,aNbGauss,aDim,theMode);
- INITMSGA(MYDEBUG,0,
+ INITMSGA(0,
"- aDim = "<<aDim<<
"; aNbGauss = "<<aNbGauss<<
"; aNbElem = "<<aNbElem<<
#include "MED_Utilities.hxx"
#include "MED_Common.hxx"
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-//static int MYDEBUG = 0; // unused in release mode
-#endif
-
int MED::PrefixPrinter::myCounter = 0;
MED::PrefixPrinter::PrefixPrinter(bool theIsActive):
{
if(myIsActive)
myCounter++;
- MSG(MYDEBUG,"MED::PrefixPrinter::PrefixPrinter(...)- "<<myCounter);
+
+ MSG("MED::PrefixPrinter::PrefixPrinter(...)- "<<myCounter);
}
MED::PrefixPrinter::~PrefixPrinter() noexcept(false)
#define MED_Utilities_HeaderFile
#include "MED_WrapperDef.hxx"
+#include "utilities.h"
#include <iostream>
#include <sstream>
};
}
-#ifdef _DEBUG_
- #define MSG(deb,msg) if(deb) std::cout<<MED::PrefixPrinter::GetPrefix()<<msg<<" ("<<__FILE__<<" ["<<__LINE__<<"])\n"
- #define BEGMSG(deb,msg) if(deb) std::cout<<MED::PrefixPrinter::GetPrefix()<<msg
- #define INITMSGA(deb,lev,msg) MED::PrefixPrinter aPrefixPrinter_##lev(deb); BEGMSG(deb,msg)
- #define INITMSG(deb,msg) INITMSGA(deb,,msg)
- #define ADDMSG(deb,msg) if(deb) std::cout<<msg
-#else // _DEBUG_
- #define MSG(deb,msg)
- #define BEGMSG(deb,msg)
- #define INITMSGA(deb,lev,msg)
- #define INITMSG(deb,msg)
- #define ADDMSG(deb,msg)
-#endif // _DEBUG_
+#define MSG(msg) if(SALOME::VerbosityActivated()) std::cout<<MED::PrefixPrinter::GetPrefix()<<msg<<" ("<<__FILE__<<" ["<<__LINE__<<"])\n"; else (void)0
+#define BEGMSG(msg) if(SALOME::VerbosityActivated()) std::cout<<MED::PrefixPrinter::GetPrefix()<<msg; else (void)0
+#define INITMSGA(lev,msg) if(SALOME::VerbosityActivated()) { MED::PrefixPrinter aPrefixPrinter_##lev(true); BEGMSG(msg); } else (void)0
+#define INITMSG(msg) INITMSGA(,msg)
+#define ADDMSG(msg) if(SALOME::VerbosityActivated()) std::cout<<msg; else (void)0
#ifndef EXCEPTION
#include <boost/version.hpp>
-#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
{
//---------------------------------------------------------------
#else
boost::detail::thread::lock_ops<TWrapper::TMutex>::lock(myWrapper->myMutex);
#endif
- INITMSG(MYDEBUG, "TLockProxy() - this -"<<this<<"; myWrapper = "<<myWrapper<<std::endl);
+ INITMSG("TLockProxy() - this -"<<this<<"; myWrapper = "<<myWrapper<<std::endl);
}
TLockProxy
::~TLockProxy()
{
- INITMSG(MYDEBUG, "~TLockProxy() - this -"<<this<<"; myWrapper = "<<myWrapper<<std::endl);
+ INITMSG("~TLockProxy() - this -"<<this<<"; myWrapper = "<<myWrapper<<std::endl);
#if BOOST_VERSION >= 103500
myWrapper->myMutex.unlock();
#else
void
Print(SharedPtr<TimeStampValueType> theTimeStampValue)
{
- INITMSG(MYDEBUG,"Print - TimeStampValue\n");
+ INITMSG("Print - TimeStampValue\n");
typename TimeStampValueType::TTGeom2Value& aGeom2Value = theTimeStampValue->myGeom2Value;
typename TimeStampValueType::TTGeom2Value::const_iterator anIter = aGeom2Value.begin();
for (; anIter != aGeom2Value.end(); anIter++) {
TInt aNbElem = aMeshValue.myNbElem;
TInt aNbGauss = aMeshValue.myNbGauss;
TInt aNbComp = aMeshValue.myNbComp;
- INITMSG(MYDEBUG, "aGeom = "<<aGeom<<" - "<<aNbElem<<": ");
+ INITMSG("aGeom = "<<aGeom<<" - "<<aNbElem<<": ");
for (TInt iElem = 0; iElem < aNbElem; iElem++) {
typename TimeStampValueType::TTMeshValue::TCValueSliceArr aValueSliceArr =
aMeshValue.GetGaussValueSliceArr(iElem);
- ADDMSG(MYVALUEDEBUG, "{");
+ ADDMSG("{");
for (TInt iGauss = 0; iGauss < aNbGauss; iGauss++) {
const typename TimeStampValueType::TTMeshValue::TCValueSlice& aValueSlice =
aValueSliceArr[iGauss];
for (TInt iComp = 0; iComp < aNbComp; iComp++) {
- ADDMSG(MYVALUEDEBUG, aValueSlice[iComp]<<" ");
+ ADDMSG(aValueSlice[iComp]<<" ");
}
- ADDMSG(MYVALUEDEBUG, "| ");
+ ADDMSG("| ");
}
- ADDMSG(MYVALUEDEBUG, "} ");
+ ADDMSG("} ");
}
- ADDMSG(MYDEBUG, "\n");
+ ADDMSG("\n");
}
}
//if (aRet == 0)
// aRet = MEDunvCr(myFile->Id(),&aMeshName);
- INITMSG(MYDEBUG, "TWrapper::SetMeshInfo - MED_MODE_ACCES = "<<theMode<<"; aRet = "<<aRet<<std::endl);
+ INITMSG("TWrapper::SetMeshInfo - MED_MODE_ACCES = "<<theMode<<"; aRet = "<<aRet<<std::endl);
if (theErr)
*theErr = aRet;
aNbGroup,
&aGroupNames);
- INITMSG(MYDEBUG, "TWrapper::SetFamilyInfo - MED_MODE_ACCES = "<<theMode<<"; aRet = "<<aRet<<std::endl);
+ INITMSG("TWrapper::SetFamilyInfo - MED_MODE_ACCES = "<<theMode<<"; aRet = "<<aRet<<std::endl);
if (theErr)
*theErr = aRet;
#ifdef _DEBUG_
std::string aName = anInfo->GetName();
- INITMSG(MYDEBUG, "GetPFamilyInfo - aFamilyName = '"<<aName<<
+ INITMSG("GetPFamilyInfo - aFamilyName = '"<<aName<<
"'; andId = "<<anInfo->GetId()<<
"; aNbAttr = "<<aNbAttr<<
"; aNbGroup = "<<aNbGroup<<"\n");
for (TInt iGroup = 0; iGroup < aNbGroup; iGroup++) {
aName = anInfo->GetGroupName(iGroup);
- INITMSG(MYDEBUG, "aGroupName = '"<<aName<<"'\n");
+ INITMSG("aGroupName = '"<<aName<<"'\n");
}
#endif
#ifdef _DEBUG_
TInt aDim = theMeshInfo->myDim;
TInt aNbElem = anInfo->GetNbElem();
- INITMSG(MYDEBUG, "GetPNodeInfo: ");
+ INITMSG("GetPNodeInfo: ");
{
- INITMSG(MYDEBUG, "aCoords: "<<aNbElem<<": ");
+ INITMSG("aCoords: "<<aNbElem<<": ");
TNodeCoord& aCoord = anInfo->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;
GetPolygoneInfo(anInfo);
#ifdef _DEBUG_
- INITMSG(MYDEBUG, "GetPPolygoneInfo"<<
+ INITMSG("GetPPolygoneInfo"<<
" - theGeom = "<<theGeom<<
"; aNbElem = "<<aNbElem<<": ");
for (TInt iElem = 1; iElem < aNbElem; iElem++) {
TCConnSlice aConnSlice = anInfo->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;
GetPolyedreInfo(anInfo);
#ifdef _DEBUG_
- INITMSG(MYDEBUG, "GetPPolyedreInfo"<<
+ INITMSG("GetPPolyedreInfo"<<
" - theGeom = "<<theGeom<<
"; aNbElem = "<<aNbElem<<": ");
for (TInt iElem = 0; iElem < aNbElem; iElem++) {
TCConnSliceArr aConnSliceArr = anInfo->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;
#ifdef _DEBUG_
TInt aConnDim = anInfo->GetConnDim();
- INITMSG(MYDEBUG, "GetPCellInfo - theEntity = "<<theEntity<<"; theGeom = "<<theGeom<<"; aConnDim: "<<aConnDim<<"\n");
- BEGMSG(MYDEBUG, "GetPCellInfo - aNbElem: "<<aNbElem<<": ");
+ INITMSG("GetPCellInfo - theEntity = "<<theEntity<<"; theGeom = "<<theGeom<<"; aConnDim: "<<aConnDim<<"\n");
+ BEGMSG("GetPCellInfo - aNbElem: "<<aNbElem<<": ");
for (TInt iElem = 0; iElem < aNbElem; iElem++) {
TCConnSlice aConnSlice = anInfo->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;
GetFieldInfo(theId, *anInfo, theErr);
#ifdef _DEBUG_
- INITMSG(MYDEBUG,
- "GetPFieldInfo "<<
+ INITMSG("GetPFieldInfo "<<
"- aName = '"<<anInfo->GetName()<<"'"<<
"; aType = "<<anInfo->GetType()<<
"; aNbComp = "<<aNbComp<<
}
bool anIsSatisfied =(nval > 0);
if (anIsSatisfied) {
- INITMSG(MYDEBUG,
- "GetNbTimeStamps aNbTimeStamps = "<<aNbStamps<<
+ INITMSG("GetNbTimeStamps aNbTimeStamps = "<<aNbStamps<<
"; aGeom = "<<aGeom<<"; anEntity = "<<anEntity<<"\n");
if (anIsPerformAdditionalCheck) {
anIsSatisfied = !strcmp(&aMeshName[0], &aMeshInfo.myName[0]);
if (!anIsSatisfied) {
- INITMSG(MYDEBUG,
- "GetNbTimeStamps aMeshName = '"<<&aMeshName[0]<<"' != "<<
+ INITMSG("GetNbTimeStamps aMeshName = '"<<&aMeshName[0]<<"' != "<<
"; aMeshInfo.myName = '"<<&aMeshInfo.myName[0]<<"'\n");
}
}
GetTimeStampInfo(theId, *anInfo, theErr);
#ifdef _DEBUG_
- INITMSG(MYDEBUG, "GetPTimeStampInfo - anEntity = "<<anInfo->GetEntity()<<"\n");
+ INITMSG("GetPTimeStampInfo - anEntity = "<<anInfo->GetEntity()<<"\n");
TGeom2NbGauss& aGeom2NbGauss = anInfo->myGeom2NbGauss;
TGeom2NbGauss::const_iterator anIter = aGeom2NbGauss.begin();
for (; anIter != aGeom2NbGauss.end(); anIter++) {
const EGeometrieElement& aGeom = anIter->first;
- INITMSG(MYDEBUG, "aGeom = "<<aGeom<<" - "<<aGeom2NbGauss[aGeom]<<";\n");
+ INITMSG("aGeom = "<<aGeom<<" - "<<aGeom2NbGauss[aGeom]<<";\n");
}
#endif
aNbComp);
TInt aValueSize = theTimeStampValue->GetValueSize(aGeom);
- INITMSG(MYDEBUG,
- "TWrapper::GetTimeStampValue - aGeom = "<<aGeom<<
+ INITMSG("TWrapper::GetTimeStampValue - aGeom = "<<aGeom<<
"; aNbVal = "<<aNbVal<<
"; aNbValue = "<<aNbValue<<
"; aNbGauss = "<<aNbGauss<<
}
- INITMSG(MYDEBUG, "TWrapper::SetTimeStampValue - MED_MODE_ACCES = "<<theMode<<"; aRet = "<<aRet<<std::endl);
+ INITMSG("TWrapper::SetTimeStampValue - MED_MODE_ACCES = "<<theMode<<"; aRet = "<<aRet<<std::endl);
}
//----------------------------------------------------------------------------
anInfo->SetGrilleType(type);
#ifdef _DEBUG_
- INITMSG(MYDEBUG, "GetPGrilleInfo: ");
+ INITMSG("GetPGrilleInfo: ");
{
TInt aNbElem = anInfo->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
#include "utilities.h"
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
SMESH_ActorDef* SMESH_ActorDef::New(){
return new SMESH_ActorDef();
SMESH_ActorDef::SMESH_ActorDef()
{
- if(MYDEBUG) MESSAGE("SMESH_ActorDef - "<<this);
+ MESSAGE("SMESH_ActorDef - "<<this);
SALOME_Actor::SetVisibility(false); // avoid update of pipelines
SMESH_ActorDef::~SMESH_ActorDef()
{
- if(MYDEBUG) MESSAGE("~SMESH_ActorDef - "<<this);
+ MESSAGE("~SMESH_ActorDef - "<<this);
// Please keep the order same as one in the header file
void SMESH_ActorDef::Update()
{
- if(MYDEBUG) MESSAGE("SMESH_ActorDef::Update");
+ MESSAGE("SMESH_ActorDef::Update");
myVisualObj->Update();
}
if ( GetVisibility() )
aFilter->Update();
- if (MYDEBUG) MESSAGE(aFilter->GetOutput()->GetNumberOfCells());
+ MESSAGE(aFilter->GetOutput()->GetNumberOfCells());
}
#ifndef DISABLE_PLOT2DVIEWER
#include <vtkUnstructuredGridWriter.h>
#include <vtkUnsignedCharArray.h>
-//#ifdef _DEBUG_
-//static int MYDEBUG = 1;
-//#else
-//static int MYDEBUG = 0;
-//#endif
namespace SMESH
{
#include "utilities.h"
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
using namespace std;
SMESH_DeviceActor
::SMESH_DeviceActor()
{
- if(MYDEBUG) MESSAGE("SMESH_DeviceActor - "<<this);
+ MESSAGE("SMESH_DeviceActor - "<<this);
myIsShrinkable = false;
myIsShrunk = false;
SMESH_DeviceActor
::~SMESH_DeviceActor()
{
- if(MYDEBUG) MESSAGE("~SMESH_DeviceActor - "<<this);
+ MESSAGE("~SMESH_DeviceActor - "<<this);
myMapper->Delete();
// myPlaneCollection->Delete(); -- it is vtkSmartPointer
anID = myExtractGeometry->GetNodeObjId(theVtkID);
vtkIdType aRetID = myVisualObj->GetNodeObjId(anID);
- if(MYDEBUG) MESSAGE("GetNodeObjId - theVtkID = "<<theVtkID<<"; anID = "<<anID<<"; aRetID = "<<aRetID);
+ MESSAGE("GetNodeObjId - theVtkID = "<<theVtkID<<"; anID = "<<anID<<"; aRetID = "<<aRetID);
return aRetID;
}
vtkDataSet* aDataSet = myMergeFilter->GetOutput();
vtkIdType anID = myVisualObj->GetNodeVTKId(theObjID);
double* aCoord = (anID >=0 && anID < aDataSet->GetNumberOfPoints()) ? aDataSet->GetPoint(anID) : NULL;
- if(MYDEBUG) MESSAGE("GetNodeCoord - theObjID = "<<theObjID<<"; anID = "<<anID);
+ MESSAGE("GetNodeCoord - theObjID = "<<theObjID<<"; anID = "<<anID);
return aCoord;
}
return -1;
vtkIdType aRetID = myVisualObj->GetElemObjId(anId3);
- if(MYDEBUG)
- MESSAGE("GetElemObjId - theVtkID = "<<theVtkID<<"; anId2 = "<<anId2<<"; anId3 = "<<anId3<<"; aRetID = "<<aRetID);
+
+ MESSAGE("GetElemObjId - theVtkID = "<<theVtkID<<"; anId2 = "<<anId2<<"; anId3 = "<<anId3<<"; aRetID = "<<aRetID);
return aRetID;
}
vtkDataSet* aDataSet = myVisualObj->GetUnstructuredGrid();
vtkIdType aGridID = myVisualObj->GetElemVTKId(theObjID);
vtkCell* aCell = (aGridID >= 0 ) ? aDataSet->GetCell(aGridID) : NULL;
- if(MYDEBUG)
- MESSAGE("GetElemCell - theObjID = "<<theObjID<<"; aGridID = "<<aGridID);
+
+ MESSAGE("GetElemCell - theObjID = "<<theObjID<<"; aGridID = "<<aGridID);
return aCell;
}
using namespace std;
-//#ifdef _DEBUG_
-//static int MYDEBUG = 0;
-//#else
-//static int MYDEBUG = 0;
-//#endif
-
#if defined __GNUC__
#if __GNUC__ == 2
#define __GNUC_2__
}
#endif
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
static int MYDEBUGWITHFILES = 0;//1;
-#else
-static int MYDEBUG = 0;
-static int MYDEBUGWITHFILES = 0;
-#endif
-
/*
Class : SMESH_VisualObjDef
//=================================================================================
SMESH_VisualObjDef::SMESH_VisualObjDef()
{
- if ( MYDEBUG ) MESSAGE("-------------------------------SMESH_VisualObjDef::SMESH_VisualObjDef");
+ MESSAGE("-------------------------------SMESH_VisualObjDef::SMESH_VisualObjDef");
myGrid = vtkUnstructuredGrid::New();
myLocalGrid = false;
ClearEntitiesFlags();
}
SMESH_VisualObjDef::~SMESH_VisualObjDef()
{
- if ( MYDEBUG ) MESSAGE("--------------------------------SMESH_VisualObjDef::~SMESH_VisualObjDef");
- if ( MYDEBUG ) MESSAGE( "myGrid->GetReferenceCount() = " << myGrid->GetReferenceCount() );
+ MESSAGE("--------------------------------SMESH_VisualObjDef::~SMESH_VisualObjDef");
+ MESSAGE( "myGrid->GetReferenceCount() = " << myGrid->GetReferenceCount() );
myGrid->Delete();
}
//=================================================================================
void SMESH_VisualObjDef::buildPrs(bool buildGrid)
{
- if ( MYDEBUG ) MESSAGE("---------------------------SMESH_VisualObjDef::buildPrs " << buildGrid);
+ MESSAGE("---------------------------SMESH_VisualObjDef::buildPrs " << buildGrid);
if (buildGrid)
{
myLocalGrid = true;
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<SMESHDS_Mesh*>( GetMesh() )) // IPAL53915
m->GetScript()->SetModified(false); // drop IsModified set in compactMesh()
myGrid->SetPoints( aPoints );
aPoints->Delete();
- if ( MYDEBUG )
- MESSAGE("Update - myGrid->GetNumberOfPoints() = "<<myGrid->GetNumberOfPoints());
+ MESSAGE("Update - myGrid->GetNumberOfPoints() = "<<myGrid->GetNumberOfPoints());
// Calculate cells size
}
}
}
- if ( MYDEBUG )
- MESSAGE( "Update - aNbCells = "<<aNbCells<<"; aCellsSize = "<<aCellsSize );
+
+ MESSAGE( "Update - aNbCells = "<<aNbCells<<"; aCellsSize = "<<aCellsSize );
// Create cells
myClient(SalomeApp_Application::orb(),theMesh)
{
myEmptyGrid = 0;
- if ( MYDEBUG )
- MESSAGE("SMESH_MeshObj - this = "<<this<<"; theMesh->_is_nil() = "<<theMesh->_is_nil());
+
+ MESSAGE("SMESH_MeshObj - this = "<<this<<"; theMesh->_is_nil() = "<<theMesh->_is_nil());
}
//=================================================================================
//=================================================================================
SMESH_MeshObj::~SMESH_MeshObj()
{
- if ( MYDEBUG )
- MESSAGE("SMESH_MeshObj - this = "<<this<<"\n");
+ MESSAGE("SMESH_MeshObj - this = "<<this<<"\n");
if ( myEmptyGrid )
myEmptyGrid->Delete();
}
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;
}
bool SMESH_MeshObj::NulData()
{
- if ( MYDEBUG ) MESSAGE ("SMESH_MeshObj::NulData() =============================================");
+ MESSAGE ("SMESH_MeshObj::NulData() =============================================");
if (!myEmptyGrid)
{
myEmptyGrid = SMDS_UnstructuredGrid::New();
//=================================================================================
SMESH_SubMeshObj::SMESH_SubMeshObj( SMESH_MeshObj* theMeshObj )
{
- if ( MYDEBUG ) MESSAGE( "SMESH_SubMeshObj - theMeshObj = " << theMeshObj );
+ MESSAGE( "SMESH_SubMeshObj - theMeshObj = " << theMeshObj );
myMeshObj = theMeshObj;
}
//=================================================================================
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;
: SMESH_SubMeshObj( theMeshObj ),
myGroupServer( SMESH::SMESH_GroupBase::_duplicate(theGroup) )
{
- if ( MYDEBUG ) MESSAGE("SMESH_GroupObj - theGroup->_is_nil() = "<<theGroup->_is_nil());
+ MESSAGE("SMESH_GroupObj - theGroup->_is_nil() = "<<theGroup->_is_nil());
myGroupServer->Register();
}
SMESH_GroupObj::~SMESH_GroupObj()
{
- if ( MYDEBUG ) MESSAGE("~SMESH_GroupObj");
+ MESSAGE("~SMESH_GroupObj");
myGroupServer->UnRegister();
}
: 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();
}
#include <SUIT_ResourceMgr.h>
#include <SUIT_Session.h>
-#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 - "<<this);
+ MESSAGE("SMESH_PreviewActorsCollection - "<<this);
}
SMESH_PreviewActorsCollection::~SMESH_PreviewActorsCollection()
{
- if(MYDEBUG) MESSAGE("~SMESH_PreviewActorsCollection - "<<this);
+ MESSAGE("~SMESH_PreviewActorsCollection - "<<this);
clearActors();
}
// maximum stored group name length in MED file
#define MAX_MED_GROUP_NAME_LENGTH 80
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
#define cSMESH_Hyp(h) static_cast<const SMESH_Hypothesis*>(h)
typedef SMESH_HypoFilter THypType;
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;
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 );
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
int anHypId,
std::string* anError )
{
- if(MYDEBUG) MESSAGE("SMESH_Mesh::AddHypothesis");
+ MESSAGE("SMESH_Mesh::AddHypothesis");
if ( anError )
anError->clear();
std::string hypName = anHyp->GetName();
if ( hypName == "NotConformAllowed" )
{
- if(MYDEBUG) MESSAGE( "Hypothesis <NotConformAllowed> can be only global" );
+ MESSAGE( "Hypothesis <NotConformAllowed> can be only global" );
return SMESH_Hypothesis::HYP_INCOMPATIBLE;
}
}
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;
}
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
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;
}
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 );
}
#endif
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
namespace
{
using std::runtime_error;
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<SMESH_Mesh*>(theMesh->GetMeshPtr());
CORBA::LongLong pointeur = theMesh->GetMeshPtr();
- if( MYDEBUG ) MESSAGE("SMESH_Client::SMESH_Client pointeur "<<pointeur);
+ MESSAGE("SMESH_Client::SMESH_Client pointeur "<<pointeur);
SMESH_Mesh* aMesh = reinterpret_cast<SMESH_Mesh*> (pointeur);
- if ( MYDEBUG ) MESSAGE("SMESH_Client::SMESH_Client aMesh "<<aMesh);
+ MESSAGE("SMESH_Client::SMESH_Client aMesh "<<aMesh);
//if(aMesh->GetMeshDS()->IsEmbeddedMode()){
if(anIsEmbeddedMode){
mySMESHDSMesh = aMesh->GetMeshDS();
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 "<<aLength );
+ MESSAGE( "Update: length of the script is "<<aLength );
if ( !anIsModified )
return false;
INFOS("Unknown exception was cought !!!");
}
- if ( MYDEBUG && mySMDSMesh )
+ if (mySMDSMesh )
{
MESSAGE("Update - mySMDSMesh->NbNodes() = "<<mySMDSMesh->NbNodes());
MESSAGE("Update - mySMDSMesh->Nb0DElements() = "<<mySMDSMesh->Nb0DElements());
#define env_sep ":"
#endif // WIN32
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
namespace SMESH
{
typedef IMap<QString,HypothesisData*> THypothesisDataMap;
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;
// 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];
}
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
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;
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;
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;
if (SO_Hypothesis) {
SObjectList listSO = SMESH::getStudy()->FindDependances(SO_Hypothesis);
- if(MYDEBUG) MESSAGE("SMESHGUI::GetMeshesUsingAlgoOrHypothesis(): dependency number ="<<listSO.size());
+ MESSAGE("SMESHGUI::GetMeshesUsingAlgoOrHypothesis(): dependency number ="<<listSO.size());
for (unsigned int i = 0; i < listSO.size(); i++) {
_PTR(SObject) SO = listSO[i];
if (SO) {
if (aFather) {
_PTR(SObject) SOfatherFather = aFather->GetFather();
if (SOfatherFather) {
- if(MYDEBUG) MESSAGE("SMESHGUI::GetMeshesUsingAlgoOrHypothesis(): dependency added to list");
+ MESSAGE("SMESHGUI::GetMeshesUsingAlgoOrHypothesis(): dependency added to list");
index++;
listSOmesh.resize(index);
listSOmesh[index - 1] = SOfatherFather;
}
}
}
- if (MYDEBUG) MESSAGE("SMESHGUI::GetMeshesUsingAlgoOrHypothesis(): completed");
+ MESSAGE("SMESHGUI::GetMeshesUsingAlgoOrHypothesis(): completed");
return listSOmesh;
}
#define NUM_TMP_FILES 2
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
// Static variables definition
GEOM::GEOM_Gen_var SMESH_Gen_i::myGeomGen;
CORBA::ORB_var SMESH_Gen_i::myOrb;
thePlatformLibName = aPlatformLibName;
Unexpect aCatch(SALOME_SalomeException);
- if(MYDEBUG) MESSAGE( "Create Hypothesis <" << theHypName << "> from " << aPlatformLibName);
+ MESSAGE( "Create Hypothesis <" << theHypName << "> from " << aPlatformLibName);
typedef GenericHypothesisCreator_i* (*GetHypothesisCreator)(const char* );
GenericHypothesisCreator_i* aCreator;
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);
}
// get method, returning hypothesis creator
- if(MYDEBUG) MESSAGE("Find GetHypothesisCreator() method ...");
+ MESSAGE("Find GetHypothesisCreator() method ...");
GetHypothesisCreator procHandle =
(GetHypothesisCreator)GetProc( libHandle, "GetHypothesisCreator" );
if (!procHandle)
}
// get hypothesis creator
- if(MYDEBUG) MESSAGE("Get Hypothesis Creator for " << theHypName);
+ MESSAGE("Get Hypothesis Creator for " << theHypName);
aCreator = procHandle(theHypName);
if (!aCreator)
{
// 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();
}
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) {
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
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();
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",
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 );
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 );
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 );
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<int> setId;
{
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());
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++;
}
}
{
//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",
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",
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 );
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();
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();
// --> 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;
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" );
}
}
}
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();
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();
// --> 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;
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" );
}
}
}
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<SMESH_Mesh_i*>( GetServant( myNewMesh ).in() );
if ( !myNewMeshImpl )
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 );
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
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();
char* SMESH_Gen_i::ComponentDataType()
{
- if(MYDEBUG) MESSAGE( "SMESH_Gen_i::ComponentDataType" );
+ MESSAGE( "SMESH_Gen_i::ComponentDataType" );
return CORBA::string_dup( "SMESH" );
}
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 );
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 );
#include <cctype>
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
using namespace std;
//=============================================================================
bool SMESH_Gen_i::CanPublishInStudy(CORBA::Object_ptr theIOR)
{
- if(MYDEBUG) MESSAGE("CanPublishInStudy - "<<!CORBA::is_nil(getStudyServant()));
+ MESSAGE("CanPublishInStudy - "<<!CORBA::is_nil(getStudyServant()));
if ( !myIsEnablePublish )
return false;
if( !aGroup->_is_nil() )
return true;
- if(MYDEBUG) MESSAGE("CanPublishInStudy--CANT");
+ MESSAGE("CanPublishInStudy--CANT");
return false;
}
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 );
aMesh = aGroup->GetMesh();
aSO = PublishGroup( aMesh, aGroup, aShapeObject, theName );
}
- if(MYDEBUG) MESSAGE("PublishInStudy_END");
+ MESSAGE("PublishInStudy_END");
return aSO._retn();
}
SALOMEDS::SComponent_ptr SMESH_Gen_i::PublishComponent()
{
- if(MYDEBUG) MESSAGE("PublishComponent");
+ MESSAGE("PublishComponent");
if ( !myIsEnablePublish )
return SALOMEDS::SComponent::_nil();
// (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();
}
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
}
}
- if(MYDEBUG) MESSAGE("PublishMesh_END");
+ MESSAGE("PublishMesh_END");
return aMeshSO._retn();
}
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())
SetName( aHypSO, theName, hypType.in() );
- if(MYDEBUG) MESSAGE("PublishHypothesis--END");
+ MESSAGE("PublishHypothesis--END");
return aHypSO._retn();
}
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();
aMeshOrSubMesh = ObjectToSObject( aSubMesh );
}
}
- if(MYDEBUG) MESSAGE("GetMeshOrSubmeshByShape--END");
+ MESSAGE("GetMeshOrSubmeshByShape--END");
return aMeshOrSubMesh._retn();
}
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()) )
addReference( AHR, theHyp );
- if(MYDEBUG) MESSAGE("AddHypothesisToShape--END");
+ MESSAGE("AddHypothesisToShape--END");
return true;
}
#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;
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( "
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);
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);
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);
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();
SMESH::ListOfGroups * SMESH_Mesh_i::GetGroups()
{
Unexpect aCatch(SALOME_SalomeException);
- if (MYDEBUG) MESSAGE("GetGroups");
+ MESSAGE("GetGroups");
SMESH::ListOfGroups_var aList = new SMESH::ListOfGroups();
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;
// 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 )
// 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() ) {
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 );
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));
::SMESH_Mesh & SMESH_Mesh_i::GetImpl()
{
- if(MYDEBUG) MESSAGE("SMESH_Mesh_i::GetImpl()");
+ MESSAGE("SMESH_Mesh_i::GetImpl()");
return *_impl;
}
_preMeshInfo->FullLoadFromFile();
CORBA::LongLong pointeur = CORBA::LongLong(_impl);
- if ( MYDEBUG ) MESSAGE("CORBA::LongLong SMESH_Mesh_i::GetMeshPtr() "<<pointeur);
+ MESSAGE("CORBA::LongLong SMESH_Mesh_i::GetMeshPtr() "<<pointeur);
return pointeur;
}
// register CORBA object for persistence
int nextId = _gen_i->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 );
#include <vector>
#include <string>
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
using namespace std;
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()<<endl;
cout<<"Method : "<< aMethod<<endl;
cout<<"Object : "<< aObject<<endl;
}
if(it != _objectMap.end()) {
- if(MYDEBUG)
+ if(SALOME::VerbosityActivated())
cout << "Found object : " << (*it).first << endl;
SMESH_ObjectStates *aStates = (*it).second;
// Case for LocalLength hypothesis
if(aMethod == "SetLayerDistribution"){
LayerDistributionStates* aLDStates = (LayerDistributionStates*)(aStates);
aLDStates->AddDistribution(aCmd->GetArg(1));
- if(MYDEBUG)
+ if(SALOME::VerbosityActivated())
cout<<"Add Distribution :"<<aCmd->GetArg(1)<<endl;
}
}
}
}
else {
- if(MYDEBUG)
+ if(SALOME::VerbosityActivated())
cout << "Object not found" << endl;
}
- if(MYDEBUG) {
+ if(SALOME::VerbosityActivated()) {
cout<<"Command after: "<< aCmd->GetString()<<endl;
}
}
std::vector< std::string > 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<<endl;
cout<<"aParameters : "<<aParameters<<endl;
}
else if (!aMesh->_is_nil() ) {
anObjType = "Mesh";
}
- if(MYDEBUG)
+ if(SALOME::VerbosityActivated())
cout<<"The object Type : "<<anObjType<<endl;
SMESH_ObjectStates *aState = NULL;
if(anObjType == "LayerDistribution")
aVar.InsertAfter(aVar.Length(), SMESH::TVar::Quote() );
}
aVars.push_back(aVar);
- if(MYDEBUG) {
+ if(SALOME::VerbosityActivated()) {
cout<<"Variable: '"<<aVar<<"'"<<endl;
}
}
//================================================================================
void SMESH_NoteBook::AddCommand(const TCollection_AsciiString& theString)
{
- if(MYDEBUG)
+ if(SALOME::VerbosityActivated())
cout<<theString<<endl;
Handle(_pyCommand) aCommand = new _pyCommand( theString, -1);
_commands.push_back(aCommand);
#include <cstring>
-#ifdef _DEBUG_
-static int MYDEBUG = 0;
-#else
-static int MYDEBUG = 0;
-#endif
-
#include "SMESH_TryCatch.hxx"
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(),"");
}