From 6dced30a43379d2117baa3444f17d1f7b8312fd5 Mon Sep 17 00:00:00 2001 From: rnv Date: Tue, 12 Mar 2019 13:30:07 +0300 Subject: [PATCH] [CEA 13302] Policy for c++ files ? using namespaces in c++ header files. boost_ptr / shared_ptr --- src/MEDCalc/cmp/MEDCalculator_i.cxx | 12 +++++------ src/MEDCalc/cmp/MEDDataManager_i.hxx | 31 ++++++++++++++-------------- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/src/MEDCalc/cmp/MEDCalculator_i.cxx b/src/MEDCalc/cmp/MEDCalculator_i.cxx index 3c431588a..740ec5a3f 100644 --- a/src/MEDCalc/cmp/MEDCalculator_i.cxx +++ b/src/MEDCalc/cmp/MEDCalculator_i.cxx @@ -247,7 +247,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::pow(const MEDCALC::FieldHandler & f_hdl MEDCouplingFieldDouble* field_result; try { field_result = field->clone(true); - string functionToApply = "u^"+ToString(power); + std::string functionToApply = "u^"+ToString(power); field_result->applyFunc(functionToApply.c_str()); } catch (INTERP_KERNEL::Exception &ex) { @@ -255,7 +255,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::pow(const MEDCALC::FieldHandler & f_hdl } // Set the name (the default is the same as the original field) - string name(field_result->getName()); + std::string name(field_result->getName()); name.append("^"); name.append(ToString(power)); field_result->setName(name.c_str()); @@ -286,7 +286,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::lin(const MEDCALC::FieldHandler & f_hdl MEDCouplingFieldDouble* field_result; try { field_result = field->clone(true); - string functionToApply = "u*"+ToString(factor)+"+"+ToString(offset); + std::string functionToApply = "u*"+ToString(factor)+"+"+ToString(offset); field_result->applyFunc(functionToApply.c_str()); } catch (INTERP_KERNEL::Exception &ex) { @@ -294,7 +294,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::lin(const MEDCALC::FieldHandler & f_hdl } // Set the name (the default is the same as the original field) - string name = string("lin("); + std::string name = std::string("lin("); name.append(field->getName()); name.append(",factor="); name.append(ToString(factor)); @@ -333,7 +333,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::dup(const MEDCALC::FieldHandler & f_hdl } // Set the name (the default is the same as the original field) - string name = string("dup("); + std::string name = std::string("dup("); name.append(field->getName()); name.append(")"); field_result->setName(name.c_str()); @@ -376,7 +376,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::fct(const MEDCALC::FieldHandler & f_hdl throw KERNEL::createSalomeException(ex.what()); } - string name = string("fct("); name.append(field->getName()); + std::string name = std::string("fct("); name.append(field->getName()); name.append(",\""); name.append(function); name.append(",\""); name.append(ToString(nbResComponents)); name.append("\")"); field_result->setName(name.c_str()); diff --git a/src/MEDCalc/cmp/MEDDataManager_i.hxx b/src/MEDCalc/cmp/MEDDataManager_i.hxx index 7a3c2306e..dfec82390 100644 --- a/src/MEDCalc/cmp/MEDDataManager_i.hxx +++ b/src/MEDCalc/cmp/MEDDataManager_i.hxx @@ -34,27 +34,26 @@ using namespace MEDCoupling; /*! This map is used for lifecycle management of fields used in this operator */ #include #include -using namespace std; -typedef map DatasourceHandlerMap; -typedef map::iterator DatasourceHandlerMapIterator; +typedef std::map DatasourceHandlerMap; +typedef std::map::iterator DatasourceHandlerMapIterator; -typedef map MeshHandlerMap; -typedef map::iterator MeshHandlerMapIterator; +typedef std::map MeshHandlerMap; +typedef std::map::iterator MeshHandlerMapIterator; -typedef map FieldseriesHandlerMap; -typedef map::iterator FieldseriesHandlerMapIterator; +typedef std::map FieldseriesHandlerMap; +typedef std::map::iterator FieldseriesHandlerMapIterator; -typedef map FieldHandlerMap; -typedef map::iterator FieldHandlerMapIterator; -typedef map FieldPersistencyMap; -typedef map::iterator FieldPersistencyMapIterator; +typedef std::map FieldHandlerMap; +typedef std::map::iterator FieldHandlerMapIterator; +typedef std::map FieldPersistencyMap; +typedef std::map::iterator FieldPersistencyMapIterator; -typedef map FieldDoubleMap; -typedef map::iterator FieldDoubleMapIterator; +typedef std::map FieldDoubleMap; +typedef std::map::iterator FieldDoubleMapIterator; -typedef map MeshMap; -typedef map::iterator MeshMapIterator; +typedef std::map MeshMap; +typedef std::map::iterator MeshMapIterator; #include "MEDCALC.hxx" class MEDDataManager_i: public POA_MEDCALC::MEDDataManager, @@ -140,7 +139,7 @@ private: MeshMap _meshMap; FieldPersistencyMap _fieldPersistencyMap; - string _medEventListenerIOR; + std::string _medEventListenerIOR; MEDCALC::FieldHandler * newFieldHandler(const char * fieldname, const char * meshname, -- 2.39.2