From: Christophe Bourcier Date: Wed, 5 Jun 2024 12:02:19 +0000 (+0200) Subject: Use MESSAGE instead of cout X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f98f0e292cd820cd165e717fc32185f6a939eeb7;p=plugins%2Fhybridplugin.git Use MESSAGE instead of cout --- diff --git a/src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.cxx b/src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.cxx index 5deb73a..98009ed 100644 --- a/src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.cxx +++ b/src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.cxx @@ -2267,7 +2267,7 @@ std::string HYBRIDPlugin_Hypothesis::GetOptionValue(const std::string& optionNam if (op_val == _customOption2value.end()) { std::string msg = "Unknown MG-Hybrid option: <" + optionName + ">"; - std::cout << msg << std::endl; + MESSAGE(msg); throw std::invalid_argument(msg); } } @@ -2280,7 +2280,7 @@ std::string HYBRIDPlugin_Hypothesis::GetOptionValue(const std::string& optionNam if (op_val != _defaultOptionValues.end()) val = op_val->second; } - std::cout << "GetOptionValue " << optionName << " = " << val << std::endl; + MESSAGE("GetOptionValue " << optionName << " = " << val); return val; } diff --git a/src/HYBRIDPlugin/MG_HYBRID_API.cxx b/src/HYBRIDPlugin/MG_HYBRID_API.cxx index 38c778a..41124a8 100644 --- a/src/HYBRIDPlugin/MG_HYBRID_API.cxx +++ b/src/HYBRIDPlugin/MG_HYBRID_API.cxx @@ -126,7 +126,7 @@ struct MG_HYBRID_API::LibData bool SetParam( const std::string& param, const std::string& value ) { status_t ret = hybrid_set_param( _session, param.c_str(), value.c_str() ); - std::cout << param << " = " << value << std::endl; + MESSAGE(param << " = " << value); return ( ret == STATUS_OK ); } @@ -153,21 +153,21 @@ struct MG_HYBRID_API::LibData if ( param=="boundary_layer_imprinting_tags" ) { ret = hybrid_set_boundary_layer_imprinting_tag(_session, tag); - std::cout << "imprinting_tag " << tag << std::endl; + MESSAGE("imprinting " << tag); } else if ( param=="boundary_layer_snapping_tags" ) { ret = hybrid_set_boundary_layer_snapping_tag(_session, tag); - std::cout << "snapping_tag " << tag << std::endl; + MESSAGE("snapping " << tag); } else if ( param=="boundary_layer_surface_tags" ) { ret = hybrid_set_initial_height_on_surface_tag(_session, tag, stod(size)); - std::cout << "surface_tag: " << tag << " , hegith: " << stod(size) << std::endl; + MESSAGE("height " << tag << " = " << stod(size)); } if ( ret != STATUS_OK ) { - std::cout << "PBBBBBBBBBBBBBBBBBBBBBB STATUS not OK "; + MESSAGE("PBBBBBBBBBBBBBBBBBBBBBB STATUS not OK "); return false; } }