Version: 6.3.1
Public Member Functions | Private Attributes

Qtx.Localizer Class Reference

Localization helper. More...

#include <Qtx.h>

Public Member Functions

 Localizer ()
 Constructor. Forces "C" locale to be set.
 ~Localizer ()
 Destructor. Reverts back to the initial locale.

Private Attributes

QString myCurLocale

Detailed Description

This helper class can be used to solve the localization problems, usually related to the textual files reading/writing, namely when floating point values are read / written with API functions. The problem relates to such locale specific settings as decimal point separator, thousands separator, etc.

To use the Localizer class, just create a local variable in the beginning of the code where you need to read / write data from textual file(s). The constructor of the class forces setting "C" locale temporariy. The destructor switches back to the initial locale.

  Qtx::Localizer loc;
  readSomething();
  writeSomething();

Constructor & Destructor Documentation

Qtx.Localizer::Localizer ( )
Qtx.Localizer::~Localizer ( )

Field Documentation

QString Qtx.Localizer.myCurLocale [private]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS