]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Kernel_Utils::Localizer - common interface to solve problems with non-"C" locales
authorouv <ouv@opencascade.com>
Mon, 2 Nov 2009 12:25:42 +0000 (12:25 +0000)
committerouv <ouv@opencascade.com>
Mon, 2 Nov 2009 12:25:42 +0000 (12:25 +0000)
src/DriverDAT/DriverDAT_R_SMDS_Mesh.cxx
src/DriverDAT/DriverDAT_W_SMDS_Mesh.cxx
src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx
src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx
src/DriverUNV/UNV_Utilities.hxx

index 6c0abb7303d5a80aa483e4b987456412cfe8db41..bb35dd4796ee4eef5bdf5e606e6adbc262bd32de 100644 (file)
 
 #include "utilities.h"
 
+#include <Basics_Utils.hxx>
+
 using namespace std;
 
 Driver_Mesh::Status DriverDAT_R_SMDS_Mesh::Perform()
 {
+  Kernel_Utils::Localizer loc;
   Status aResult = DRS_OK;
 
   int i, j;
index 91b06d6b1d895edc3bdd3adc1aec9214b6d3d2da..54741eac3c85d886d93bb34a484b3efbf7335ae4 100644 (file)
 
 #include "utilities.h"
 
+#include <Basics_Utils.hxx>
+
 using namespace std;
 
 Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
 {
+  Kernel_Utils::Localizer loc;
   Status aResult = DRS_OK;
 
   int nbNodes, nbCells;
index c3a682e214b029e584dab94c95f914426548bccb..617cb6dfb2cf437c518976dff43a13ee01b5316c 100644 (file)
@@ -30,6 +30,8 @@
 #include "UNV2417_Structure.hxx"
 #include "UNV_Utilities.hxx"
 
+#include <Basics_Utils.hxx>
+
 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{
index 7b011a9304eb3382241ea98b4ae09da8f361cafc..7b3a4d22ba4fd1d2439af5ae88f725f4407dab1f 100644 (file)
@@ -36,6 +36,8 @@
 #include "UNV2417_Structure.hxx"
 #include "UNV_Utilities.hxx"
 
+#include <Basics_Utils.hxx>
+
 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{
index 5e9239f82a37bd0f062b84f0f2509d2858e6aa2b..e53f75d95da120a9dd3cff3c5cb87e9117a0e313 100644 (file)
 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: