Kernel_Utils::Localizer - common interface to solve problems with non-"C" locales

This commit is contained in:
ouv 2009-11-02 12:25:42 +00:00
parent 905b855999
commit f17fbdcfdb
5 changed files with 12 additions and 18 deletions

View File

@ -26,10 +26,13 @@
#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;

View File

@ -27,10 +27,13 @@
#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;

View 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{

View 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{

View File

@ -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: