X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FSMESH_I%2FSMESH_NoteBook.cxx;h=29b6d0060f58e988eb1d0a59acd1b32fa473c4ca;hb=HEAD;hp=75297f2dbfa217a62c1151882b93175399515e62;hpb=f6e2eed4240c426f1e65b40d1bd7e8d109a4d4b5;p=modules%2Fsmesh.git diff --git a/src/SMESH_I/SMESH_NoteBook.cxx b/src/SMESH_I/SMESH_NoteBook.cxx index 75297f2db..6576b5d5e 100644 --- a/src/SMESH_I/SMESH_NoteBook.cxx +++ b/src/SMESH_I/SMESH_NoteBook.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -36,12 +36,6 @@ #include #include -#ifdef _DEBUG_ -static int MYDEBUG = 0; -#else -static int MYDEBUG = 0; -#endif - using namespace std; @@ -231,7 +225,7 @@ SMESH_NoteBook::~SMESH_NoteBook() /*! * \brief Replace parameters of the functions on the Salome NoteBook Variables * \param theString - Input string - * \retval TCollection_AsciiString - Convertion result + * \retval TCollection_AsciiString - Conversion result */ //================================================================================ void SMESH_NoteBook::ReplaceVariables() @@ -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)<GetCurrentStudy(); - SALOMEDS::SObject_wrap sobj = aStudy->FindObjectID( (*it).first.ToCString() ); + SALOMEDS::SObject_wrap sobj = SMESH_Gen_i::GetSMESHGen()->getStudyServant()->FindObjectID( (*it).first.ToCString() ); CORBA::Object_var obj = aGen->SObjectToObject( sobj ); if ( SMESH_Hypothesis_i* h = SMESH::DownCast< SMESH_Hypothesis_i*>( obj )) { @@ -724,10 +717,10 @@ void SMESH_NoteBook::ReplaceVariables() } } else { - if(MYDEBUG) + if(SALOME::VerbosityActivated()) cout << "Object not found" << endl; } - if(MYDEBUG) { + if(SALOME::VerbosityActivated()) { cout<<"Command after: "<< aCmd->GetString()<GetCurrentStudy(); + SALOMEDS::Study_var aStudy = SMESH_Gen_i::GetSMESHGen()->getStudyServant(); if(aStudy->_is_nil()) return; @@ -767,7 +760,7 @@ void SMESH_NoteBook::InitObjectMap() 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<_is_nil() ) { anObjType = "Mesh"; } - if(MYDEBUG) + if(SALOME::VerbosityActivated()) cout<<"The object Type : "<GetCurrentStudy(); + SALOMEDS::Study_ptr aStudy = SMESH_Gen_i::GetSMESHGen()->getStudyServant(); if(aStudy->_is_nil()) return ok;