From: ouv Date: Mon, 2 Nov 2009 12:25:42 +0000 (+0000) Subject: Kernel_Utils::Localizer - common interface to solve problems with non-"C" locales X-Git-Tag: V5_1_3rc2~30 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f17fbdcfdb0caea49729712d472cafbc7429db6f;p=modules%2Fsmesh.git Kernel_Utils::Localizer - common interface to solve problems with non-"C" locales --- diff --git a/src/DriverDAT/DriverDAT_R_SMDS_Mesh.cxx b/src/DriverDAT/DriverDAT_R_SMDS_Mesh.cxx index 6c0abb730..bb35dd479 100644 --- a/src/DriverDAT/DriverDAT_R_SMDS_Mesh.cxx +++ b/src/DriverDAT/DriverDAT_R_SMDS_Mesh.cxx @@ -26,10 +26,13 @@ #include "utilities.h" +#include + using namespace std; Driver_Mesh::Status DriverDAT_R_SMDS_Mesh::Perform() { + Kernel_Utils::Localizer loc; Status aResult = DRS_OK; int i, j; diff --git a/src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx b/src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx index 91b06d6b1..54741eac3 100644 --- a/src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx +++ b/src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx @@ -27,10 +27,13 @@ #include "utilities.h" +#include + using namespace std; Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform() { + Kernel_Utils::Localizer loc; Status aResult = DRS_OK; int nbNodes, nbCells; diff --git a/src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx b/src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx index c3a682e21..617cb6dfb 100644 --- a/src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx +++ b/src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx @@ -30,6 +30,8 @@ #include "UNV2417_Structure.hxx" #include "UNV_Utilities.hxx" +#include + using namespace std; @@ -49,7 +51,7 @@ DriverUNV_R_SMDS_Mesh::~DriverUNV_R_SMDS_Mesh() Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform() { - UNV::Localizer loc; + Kernel_Utils::Localizer loc; Status aResult = DRS_OK; std::ifstream in_stream(myFile.c_str()); try{ diff --git a/src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx b/src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx index 7b011a930..7b3a4d22b 100644 --- a/src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx +++ b/src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx @@ -36,6 +36,8 @@ #include "UNV2417_Structure.hxx" #include "UNV_Utilities.hxx" +#include + using namespace std; using namespace UNV; @@ -57,7 +59,7 @@ namespace{ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform() { - UNV::Localizer loc; + Kernel_Utils::Localizer loc; Status aResult = DRS_OK; std::ofstream out_stream(myFile.c_str()); try{ diff --git a/src/DriverUNV/UNV_Utilities.hxx b/src/DriverUNV/UNV_Utilities.hxx index 5e9239f82..e53f75d95 100644 --- a/src/DriverUNV/UNV_Utilities.hxx +++ b/src/DriverUNV/UNV_Utilities.hxx @@ -35,22 +35,6 @@ namespace UNV{ using namespace std; - class MESHDRIVERUNV_EXPORT Localizer - { - public: - Localizer() - { - myCurLocale = setlocale(LC_NUMERIC, 0); - setlocale(LC_NUMERIC, "C"); - } - ~Localizer() - { - setlocale(LC_NUMERIC, myCurLocale.c_str()); - } - private: - std::string myCurLocale; - }; - class MESHDRIVERUNV_EXPORT PrefixPrinter{ static int myCounter; public: