Home | History | Annotate | Download | only in src

Lines Matching full:locale

21 #include <locale>
34 locale* _Stl_get_classic_locale();
35 locale* _Stl_get_global_locale();
39 # define locale _STLP_NO_MEM_T_NAME(loc)
42 locale::facet::~facet() {}
46 bool locale::operator()(const string& __x,
51 bool locale::operator()(const wstring& __x,
57 void _STLP_CALL locale::_M_throw_on_null_name()
58 { _STLP_THROW(runtime_error("Invalid null locale name")); }
60 void _STLP_CALL locale::_M_throw_on_combine_error(const string& name) {
64 what += " locale";
68 void _STLP_CALL locale::_M_throw_on_creation_failure(int __err_code,
77 what += " locale";
82 what += " locale";
100 // Takes a reference to a locale::id, assign a numeric index if not already
102 static const locale::id& _Stl_loc_get_index(locale::id& id) {
105 static _STLP_VOLATILE __stl_atomic_t _S_index = __STATIC_CAST(__stl_atomic_t, locale::id::_S_max);
110 size_t new_index = locale::id::_S_max++;
117 // Default constructor: create a copy of the global locale.
118 locale::locale() _STLP_NOTHROW
123 locale::locale(const locale& L) _STLP_NOTHROW
127 void locale::_M_insert(facet* f, locale::id& n) {
132 locale::locale( _Locale_impl* impl ) :
136 // Create a locale from a name.
137 locale::locale(const char* name)
143 _M_impl = _get_Locale_impl( locale::classic()._M_impl );
149 impl = new _Locale_impl(locale::id::_S_max, name);
172 // Try to use a normalize locale name in order to have the == operator
193 locale::category c) {
198 L->name = string("LC_CTYPE=") + _Locale_extract_ctype_name((c & locale::ctype) ? ctype_name : name, buf, 0, &__err_code) + ";";
199 L->name += string("LC_TIME=") + _Locale_extract_time_name((c & locale::time) ? time_name : name, buf, 0, &__err_code) + ";";
200 L->name += string("LC_NUMERIC=") + _Locale_extract_numeric_name((c & locale::numeric) ? numeric_name : name, buf, 0, &__err_code) + ";";
201 L->name += string("LC_COLLATE=") + _Locale_extract_collate_name((c & locale::collate) ? collate_name : name, buf, 0, &__err_code) + ";";
202 L->name += string("LC_MONETARY=") + _Locale_extract_monetary_name((c & locale::monetary) ? monetary_name : name, buf, 0, &__err_code) + ";";
203 L->name += string("LC_MESSAGES=") + _Locale_extract_messages_name((c & locale::messages) ? messages_name : name, buf, 0, &__err_code);
210 locale::category c) {
211 if ((c & locale::all) == 0 || strcmp(name1, name1) == 0)
213 else if ((c & locale::all) == locale::all)
224 locale::category c) {
225 if ((c & locale::all) == 0 || (strcmp(name, ctype_name) == 0 &&
232 else if ((c & locale::all) == locale::all && strcmp(ctype_name, time_name) == 0 &&
244 // Create a locale that's a copy of L, except that all of the facets
246 locale::locale(const locale& L, const char* name, locale::category c)
252 _STLP_THROW(runtime_error((string("Invalid locale name '") + _Nameless + "'").c_str()));
272 if (c & locale::ctype)
274 if (c & locale::numeric)
276 if (c & locale::time)
278 if (c & locale::collate)
280 if (c & locale::monetary)
282 if (c & locale::messages)
293 // Contruct a new locale where all facets that aren't in category c
295 locale::locale(const locale& L1, const locale& L2, category c)
361 locale::~locale() _STLP_NOTHROW {
368 const locale& locale::operator=(const locale& L) _STLP_NOTHROW {
377 locale::facet* locale::_M_get_facet(const locale::id& n) const {
381 locale::facet* locale::_M_use_facet(const locale::id& n) const {
382 locale::facet* f = (n._M_index < _M_impl->size() ? _M_impl->facets_vec[n._M_index] : 0);
388 string locale::name() const {
393 bool locale::operator==(const locale& L) const {
398 bool locale::operator!=(const locale& L) const {
404 const locale& _STLP_CALL locale::classic() {
409 locale _STLP_CALL locale::global(const locale& L) {
411 _Locale_impl* _STLP_CALL locale::global(const locale& L) {
413 locale old(_Stl_get_global_locale()->_M_impl);
419 // Set the global C locale, if appropriate.
434 const locale::category locale::none;
435 const locale::category locale::collate;
436 const locale::category locale::ctype;
437 const localelocale::monetary;
438 const locale::category locale::numeric;
439 const locale::category locale::time;
440 const locale::category locale::messages;
441 const locale::category locale::all;