Home | History | Annotate | Download | only in src

Lines Matching refs:locale

21 #include <locale>
35 locale* _Stl_get_classic_locale();
36 locale* _Stl_get_global_locale();
40 # define locale _STLP_NO_MEM_T_NAME(loc)
43 locale::facet::~facet() {}
47 bool locale::operator()(const string& __x,
52 bool locale::operator()(const wstring& __x,
58 void _STLP_CALL locale::_M_throw_on_null_name()
59 { _STLP_THROW(runtime_error("Invalid null locale name")); }
61 void _STLP_CALL locale::_M_throw_on_combine_error(const string& name) {
65 what += " locale";
69 void _STLP_CALL locale::_M_throw_on_creation_failure(int __err_code,
78 what += " locale";
83 what += " locale";
101 // Takes a reference to a locale::id, assign a numeric index if not already
103 static const locale::id& _Stl_loc_get_index(locale::id& id) {
106 static _STLP_VOLATILE __stl_atomic_t _S_index = __STATIC_CAST(__stl_atomic_t, locale::id::_S_max);
111 size_t new_index = locale::id::_S_max++;
118 // Default constructor: create a copy of the global locale.
119 locale::locale() _STLP_NOTHROW
124 locale::locale(const locale& L) _STLP_NOTHROW
128 void locale::_M_insert(facet* f, locale::id& n) {
133 locale::locale( _Locale_impl* impl ) :
137 // Create a locale from a name.
138 locale::locale(const char* name)
144 _M_impl = _get_Locale_impl( locale::classic()._M_impl );
150 impl = new _Locale_impl(locale::id::_S_max, name);
173 // Try to use a normalize locale name in order to have the == operator
194 locale::category c) {
199 L->name = string("LC_CTYPE=") + _Locale_extract_ctype_name((c & locale::ctype) ? ctype_name : name, buf, 0, &__err_code) + ";";
200 L->name += string("LC_TIME=") + _Locale_extract_time_name((c & locale::time) ? time_name : name, buf, 0, &__err_code) + ";";
201 L->name += string("LC_NUMERIC=") + _Locale_extract_numeric_name((c & locale::numeric) ? numeric_name : name, buf, 0, &__err_code) + ";";
202 L->name += string("LC_COLLATE=") + _Locale_extract_collate_name((c & locale::collate) ? collate_name : name, buf, 0, &__err_code) + ";";
203 L->name += string("LC_MONETARY=") + _Locale_extract_monetary_name((c & locale::monetary) ? monetary_name : name, buf, 0, &__err_code) + ";";
204 L->name += string("LC_MESSAGES=") + _Locale_extract_messages_name((c & locale::messages) ? messages_name : name, buf, 0, &__err_code);
211 locale::category c) {
212 if ((c & locale::all) == 0 || strcmp(name1, name1) == 0)
214 else if ((c & locale::all) == locale::all)
225 locale::category c) {
226 if ((c & locale::all) == 0 || (strcmp(name, ctype_name) == 0 &&
233 else if ((c & locale::all) == locale::all && strcmp(ctype_name, time_name) == 0 &&
245 // Create a locale that's a copy of L, except that all of the facets
247 locale::locale(const locale& L, const char* name, locale::category c)
253 _STLP_THROW(runtime_error("Invalid locale name '" _NAMELESS "'"));
273 if (c & locale::ctype)
275 if (c & locale::numeric)
277 if (c & locale::time)
279 if (c & locale::collate)
281 if (c & locale::monetary)
283 if (c & locale::messages)
294 // Contruct a new locale where all facets that aren't in category c
296 locale::locale(const locale& L1, const locale& L2, category c)
362 locale::~locale() _STLP_NOTHROW {
369 const locale& locale::operator=(const locale& L) _STLP_NOTHROW {
378 locale::facet* locale::_M_get_facet(const locale::id& n) const {
382 locale::facet* locale::_M_use_facet(const locale::id& n) const {
383 locale::facet* f = (n._M_index < _M_impl->size() ? _M_impl->facets_vec[n._M_index] : 0);
389 string locale::name() const {
394 bool locale::operator==(const locale& L) const {
399 bool locale::operator!=(const locale& L) const {
405 const locale& _STLP_CALL locale::classic() {
410 locale _STLP_CALL locale::global(const locale& L) {
412 _Locale_impl* _STLP_CALL locale::global(const locale& L) {
414 locale old(_Stl_get_global_locale()->_M_impl);
420 // Set the global C locale, if appropriate.
435 const locale::category locale::none;
436 const locale::category locale::collate;
437 const locale::category locale::ctype;
438 locale::category locale::monetary;
439 const locale::category locale::numeric;
440 const locale::category locale::time;
441 const locale::category locale::messages;
442 const locale::category locale::all;