mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-15 10:08:34 +05:00
Kernel_Utils::Localizer - common interface to solve problems with non-"C" locales
This commit is contained in:
parent
905b855999
commit
f17fbdcfdb
@ -26,10 +26,13 @@
|
|||||||
|
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
|
#include <Basics_Utils.hxx>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
Driver_Mesh::Status DriverDAT_R_SMDS_Mesh::Perform()
|
Driver_Mesh::Status DriverDAT_R_SMDS_Mesh::Perform()
|
||||||
{
|
{
|
||||||
|
Kernel_Utils::Localizer loc;
|
||||||
Status aResult = DRS_OK;
|
Status aResult = DRS_OK;
|
||||||
|
|
||||||
int i, j;
|
int i, j;
|
||||||
|
@ -27,10 +27,13 @@
|
|||||||
|
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
|
#include <Basics_Utils.hxx>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
|
Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
|
||||||
{
|
{
|
||||||
|
Kernel_Utils::Localizer loc;
|
||||||
Status aResult = DRS_OK;
|
Status aResult = DRS_OK;
|
||||||
|
|
||||||
int nbNodes, nbCells;
|
int nbNodes, nbCells;
|
||||||
|
@ -30,6 +30,8 @@
|
|||||||
#include "UNV2417_Structure.hxx"
|
#include "UNV2417_Structure.hxx"
|
||||||
#include "UNV_Utilities.hxx"
|
#include "UNV_Utilities.hxx"
|
||||||
|
|
||||||
|
#include <Basics_Utils.hxx>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
@ -49,7 +51,7 @@ DriverUNV_R_SMDS_Mesh::~DriverUNV_R_SMDS_Mesh()
|
|||||||
|
|
||||||
Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
|
Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
|
||||||
{
|
{
|
||||||
UNV::Localizer loc;
|
Kernel_Utils::Localizer loc;
|
||||||
Status aResult = DRS_OK;
|
Status aResult = DRS_OK;
|
||||||
std::ifstream in_stream(myFile.c_str());
|
std::ifstream in_stream(myFile.c_str());
|
||||||
try{
|
try{
|
||||||
|
@ -36,6 +36,8 @@
|
|||||||
#include "UNV2417_Structure.hxx"
|
#include "UNV2417_Structure.hxx"
|
||||||
#include "UNV_Utilities.hxx"
|
#include "UNV_Utilities.hxx"
|
||||||
|
|
||||||
|
#include <Basics_Utils.hxx>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace UNV;
|
using namespace UNV;
|
||||||
|
|
||||||
@ -57,7 +59,7 @@ namespace{
|
|||||||
|
|
||||||
Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
|
Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
|
||||||
{
|
{
|
||||||
UNV::Localizer loc;
|
Kernel_Utils::Localizer loc;
|
||||||
Status aResult = DRS_OK;
|
Status aResult = DRS_OK;
|
||||||
std::ofstream out_stream(myFile.c_str());
|
std::ofstream out_stream(myFile.c_str());
|
||||||
try{
|
try{
|
||||||
|
@ -35,22 +35,6 @@
|
|||||||
namespace UNV{
|
namespace UNV{
|
||||||
using namespace std;
|
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{
|
class MESHDRIVERUNV_EXPORT PrefixPrinter{
|
||||||
static int myCounter;
|
static int myCounter;
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user