#include <ut_locale.h>
Public Member Functions | |
| UT_LocaleTransactor (int category, const char *locale) | |
| Class serves to make rolling back exceptions simple, automatic, and transparent. | |
| ~UT_LocaleTransactor () | |
Private Member Functions | |
| UT_LocaleTransactor () | |
| UT_LocaleTransactor (const UT_LocaleTransactor &rhs) | |
| UT_LocaleTransactor & | operator= (const UT_LocaleTransactor &rhs) |
Private Attributes | |
| int | mCategory |
| char * | mOldLocale |
| UT_LocaleTransactor::UT_LocaleTransactor | ( | int | category, | |
| const char * | locale | |||
| ) |
Class serves to make rolling back exceptions simple, automatic, and transparent.
USAGE: UT_LocaleTransactor t(LC_NUMERIC, "C"); sprintf(); sprintf(); return; // <-- old locale gets reset transparently for you at the end of // the block
SEE ALSO: man setlocale
References mOldLocale.
| UT_LocaleTransactor::~UT_LocaleTransactor | ( | ) |
References FREEP, mCategory, and mOldLocale.
| UT_LocaleTransactor::UT_LocaleTransactor | ( | ) | [private] |
| UT_LocaleTransactor::UT_LocaleTransactor | ( | const UT_LocaleTransactor & | rhs | ) | [private] |
| UT_LocaleTransactor& UT_LocaleTransactor::operator= | ( | const UT_LocaleTransactor & | rhs | ) | [private] |
int UT_LocaleTransactor::mCategory [private] |
Referenced by ~UT_LocaleTransactor().
char* UT_LocaleTransactor::mOldLocale [private] |
Referenced by UT_LocaleTransactor(), and ~UT_LocaleTransactor().
1.7.1