#include <itkNumericLocale.h>
RAII class for thread-safe temporary setting of LC_NUMERIC locale to "C".
This class provides a thread-safe mechanism to temporarily set the LC_NUMERIC locale to "C" for locale-independent parsing and formatting of floating-point numbers. The original locale is automatically restored when the object goes out of scope.
This is particularly useful when parsing file formats that use dot as decimal separator (like NRRD, VTK, etc.) regardless of the system locale setting.
Thread safety:
Example usage:
Definition at line 58 of file itkNumericLocale.h.
Collaboration diagram for itk::NumericLocale:Public Member Functions | |
| NumericLocale () | |
| NumericLocale (const NumericLocale &)=delete | |
| NumericLocale (NumericLocale &&)=delete | |
| NumericLocale & | operator= (const NumericLocale &)=delete |
| NumericLocale & | operator= (NumericLocale &&)=delete |
| ~NumericLocale () | |
Private Attributes | |
| std::unique_ptr< Impl > | m_Impl |
| itk::NumericLocale::NumericLocale | ( | ) |
Constructor: Saves current LC_NUMERIC locale and sets it to "C"
Referenced by NumericLocale(), NumericLocale(), operator=(), and operator=().
| itk::NumericLocale::~NumericLocale | ( | ) |
Destructor: Restores the original LC_NUMERIC locale
|
delete |
References NumericLocale().
|
delete |
References NumericLocale().
|
delete |
References NumericLocale().
|
delete |
References NumericLocale().
|
private |
Definition at line 79 of file itkNumericLocale.h.