MaxLocaleHandler handles Globalization.
This is a helper class that switches the Locale settings to a temporary value and restores the previous locale setting in the destructor. To use this class simply instanciate a variable of it's class at the beginning of a method. The given locale setting will be set until the method is left and the destructor of the class is called automatically.
#include <winutil.h>

Public Member Functions |
|
| CoreExport | MaxLocaleHandler (int category=LC_ALL, const MCHAR *localeSetting=_M("C")) |
| Constructor. |
|
| CoreExport | ~MaxLocaleHandler () |
| Destructor, resets locale setting to
original value. |
|
| CoreExport void | RestoreLocale () |
| Resets locale setting to original value,
before the object goes out of scope. |
|
| CoreExport MaxLocaleHandler | ( | int | category = LC_ALL, |
| const MCHAR * | localeSetting =
_M("C") |
||
| ) |
Constructor.
| [in] | category | - The category affected by locale. See _tsetlocale in MSDN help for more info |
| [in] | localeSetting | - The locale name. See _tsetlocale in MSDN help for more info |
| CoreExport ~MaxLocaleHandler | ( | ) |
Destructor, resets locale setting to original value.
| CoreExport void RestoreLocale | ( | ) |
Resets locale setting to original value, before the object goes out of scope.