39 #ifdef _GLIBCXX_SYSHDR 40 #pragma GCC system_header 46 #pragma GCC diagnostic push 47 #pragma GCC diagnostic ignored "-Wc++11-extensions" // extern template 49 namespace std _GLIBCXX_VISIBILITY(default)
51 _GLIBCXX_BEGIN_NAMESPACE_VERSION
75 template<
typename _InternT,
typename _ExternT,
typename _StateT>
81 typedef codecvt_base::result result;
82 typedef _InternT intern_type;
83 typedef _ExternT extern_type;
84 typedef _StateT state_type;
124 out(state_type& __state,
const intern_type* __from,
125 const intern_type* __from_end,
const intern_type*& __from_next,
126 extern_type* __to, extern_type* __to_end,
127 extern_type*& __to_next)
const 129 return this->do_out(__state, __from, __from_end, __from_next,
130 __to, __to_end, __to_next);
163 unshift(state_type& __state, extern_type* __to, extern_type* __to_end,
164 extern_type*& __to_next)
const 165 {
return this->do_unshift(__state, __to,__to_end,__to_next); }
204 in(state_type& __state,
const extern_type* __from,
205 const extern_type* __from_end,
const extern_type*& __from_next,
206 intern_type* __to, intern_type* __to_end,
207 intern_type*& __to_next)
const 209 return this->do_in(__state, __from, __from_end, __from_next,
210 __to, __to_end, __to_next);
214 encoding()
const throw()
215 {
return this->do_encoding(); }
218 always_noconv()
const throw()
219 {
return this->do_always_noconv(); }
222 length(state_type& __state,
const extern_type* __from,
223 const extern_type* __end,
size_t __max)
const 224 {
return this->do_length(__state, __from, __end, __max); }
227 max_length()
const throw()
228 {
return this->do_max_length(); }
245 do_out(state_type& __state,
const intern_type* __from,
246 const intern_type* __from_end,
const intern_type*& __from_next,
247 extern_type* __to, extern_type* __to_end,
248 extern_type*& __to_next)
const = 0;
251 do_unshift(state_type& __state, extern_type* __to,
252 extern_type* __to_end, extern_type*& __to_next)
const = 0;
255 do_in(state_type& __state,
const extern_type* __from,
256 const extern_type* __from_end,
const extern_type*& __from_next,
257 intern_type* __to, intern_type* __to_end,
258 intern_type*& __to_next)
const = 0;
261 do_encoding()
const throw() = 0;
264 do_always_noconv()
const throw() = 0;
267 do_length(state_type&,
const extern_type* __from,
268 const extern_type* __end,
size_t __max)
const = 0;
271 do_max_length()
const throw() = 0;
281 template<
typename _InternT,
typename _ExternT,
typename _StateT>
287 typedef codecvt_base::result result;
288 typedef _InternT intern_type;
289 typedef _ExternT extern_type;
290 typedef _StateT state_type;
293 __c_locale _M_c_locale_codecvt;
301 _M_c_locale_codecvt(0)
305 codecvt(__c_locale __cloc,
size_t __refs = 0);
312 do_out(state_type& __state,
const intern_type* __from,
313 const intern_type* __from_end,
const intern_type*& __from_next,
314 extern_type* __to, extern_type* __to_end,
315 extern_type*& __to_next)
const;
318 do_unshift(state_type& __state, extern_type* __to,
319 extern_type* __to_end, extern_type*& __to_next)
const;
322 do_in(state_type& __state,
const extern_type* __from,
323 const extern_type* __from_end,
const extern_type*& __from_next,
324 intern_type* __to, intern_type* __to_end,
325 intern_type*& __to_next)
const;
328 do_encoding()
const throw();
331 do_always_noconv()
const throw();
334 do_length(state_type&,
const extern_type* __from,
335 const extern_type* __end,
size_t __max)
const;
338 do_max_length()
const throw();
341 template<
typename _InternT,
typename _ExternT,
typename _StateT>
353 typedef char intern_type;
354 typedef char extern_type;
355 typedef mbstate_t state_type;
358 __c_locale _M_c_locale_codecvt;
367 codecvt(__c_locale __cloc,
size_t __refs = 0);
374 do_out(state_type& __state,
const intern_type* __from,
375 const intern_type* __from_end,
const intern_type*& __from_next,
376 extern_type* __to, extern_type* __to_end,
377 extern_type*& __to_next)
const;
380 do_unshift(state_type& __state, extern_type* __to,
381 extern_type* __to_end, extern_type*& __to_next)
const;
384 do_in(state_type& __state,
const extern_type* __from,
385 const extern_type* __from_end,
const extern_type*& __from_next,
386 intern_type* __to, intern_type* __to_end,
387 intern_type*& __to_next)
const;
390 do_encoding()
const throw();
393 do_always_noconv()
const throw();
396 do_length(state_type&,
const extern_type* __from,
397 const extern_type* __end,
size_t __max)
const;
400 do_max_length()
const throw();
403 #ifdef _GLIBCXX_USE_WCHAR_T 416 typedef wchar_t intern_type;
417 typedef char extern_type;
418 typedef mbstate_t state_type;
421 __c_locale _M_c_locale_codecvt;
430 codecvt(__c_locale __cloc,
size_t __refs = 0);
437 do_out(state_type& __state,
const intern_type* __from,
438 const intern_type* __from_end,
const intern_type*& __from_next,
439 extern_type* __to, extern_type* __to_end,
440 extern_type*& __to_next)
const;
443 do_unshift(state_type& __state,
444 extern_type* __to, extern_type* __to_end,
445 extern_type*& __to_next)
const;
448 do_in(state_type& __state,
449 const extern_type* __from,
const extern_type* __from_end,
450 const extern_type*& __from_next,
451 intern_type* __to, intern_type* __to_end,
452 intern_type*& __to_next)
const;
455 int do_encoding()
const throw();
458 bool do_always_noconv()
const throw();
461 int do_length(state_type&,
const extern_type* __from,
462 const extern_type* __end,
size_t __max)
const;
465 do_max_length()
const throw();
467 #endif //_GLIBCXX_USE_WCHAR_T 469 #if __cplusplus >= 201103L 480 typedef char16_t intern_type;
481 typedef char extern_type;
482 typedef mbstate_t state_type;
496 do_out(state_type& __state,
const intern_type* __from,
497 const intern_type* __from_end,
const intern_type*& __from_next,
498 extern_type* __to, extern_type* __to_end,
499 extern_type*& __to_next)
const;
502 do_unshift(state_type& __state,
503 extern_type* __to, extern_type* __to_end,
504 extern_type*& __to_next)
const;
507 do_in(state_type& __state,
508 const extern_type* __from,
const extern_type* __from_end,
509 const extern_type*& __from_next,
510 intern_type* __to, intern_type* __to_end,
511 intern_type*& __to_next)
const;
514 int do_encoding()
const throw();
517 bool do_always_noconv()
const throw();
520 int do_length(state_type&,
const extern_type* __from,
521 const extern_type* __end,
size_t __max)
const;
524 do_max_length()
const throw();
537 typedef char32_t intern_type;
538 typedef char extern_type;
539 typedef mbstate_t state_type;
553 do_out(state_type& __state,
const intern_type* __from,
554 const intern_type* __from_end,
const intern_type*& __from_next,
555 extern_type* __to, extern_type* __to_end,
556 extern_type*& __to_next)
const;
559 do_unshift(state_type& __state,
560 extern_type* __to, extern_type* __to_end,
561 extern_type*& __to_next)
const;
564 do_in(state_type& __state,
565 const extern_type* __from,
const extern_type* __from_end,
566 const extern_type*& __from_next,
567 intern_type* __to, intern_type* __to_end,
568 intern_type*& __to_next)
const;
571 int do_encoding()
const throw();
574 bool do_always_noconv()
const throw();
577 int do_length(state_type&,
const extern_type* __from,
578 const extern_type* __end,
size_t __max)
const;
581 do_max_length()
const throw();
584 #ifdef _GLIBCXX_USE_CHAR8_T 590 class codecvt<char16_t, char8_t, mbstate_t>
595 typedef char16_t intern_type;
596 typedef char8_t extern_type;
597 typedef mbstate_t state_type;
611 do_out(state_type& __state,
const intern_type* __from,
612 const intern_type* __from_end,
const intern_type*& __from_next,
613 extern_type* __to, extern_type* __to_end,
614 extern_type*& __to_next)
const;
617 do_unshift(state_type& __state,
618 extern_type* __to, extern_type* __to_end,
619 extern_type*& __to_next)
const;
622 do_in(state_type& __state,
623 const extern_type* __from,
const extern_type* __from_end,
624 const extern_type*& __from_next,
625 intern_type* __to, intern_type* __to_end,
626 intern_type*& __to_next)
const;
629 int do_encoding()
const throw();
632 bool do_always_noconv()
const throw();
635 int do_length(state_type&,
const extern_type* __from,
636 const extern_type* __end,
size_t __max)
const;
639 do_max_length()
const throw();
647 class codecvt<char32_t, char8_t, mbstate_t>
652 typedef char32_t intern_type;
653 typedef char8_t extern_type;
654 typedef mbstate_t state_type;
668 do_out(state_type& __state,
const intern_type* __from,
669 const intern_type* __from_end,
const intern_type*& __from_next,
670 extern_type* __to, extern_type* __to_end,
671 extern_type*& __to_next)
const;
674 do_unshift(state_type& __state,
675 extern_type* __to, extern_type* __to_end,
676 extern_type*& __to_next)
const;
679 do_in(state_type& __state,
680 const extern_type* __from,
const extern_type* __from_end,
681 const extern_type*& __from_next,
682 intern_type* __to, intern_type* __to_end,
683 intern_type*& __to_next)
const;
686 int do_encoding()
const throw();
689 bool do_always_noconv()
const throw();
692 int do_length(state_type&,
const extern_type* __from,
693 const extern_type* __end,
size_t __max)
const;
696 do_max_length()
const throw();
698 #endif // _GLIBCXX_USE_CHAR8_T 703 template<
typename _InternT,
typename _ExternT,
typename _StateT>
711 if (__builtin_strcmp(__s,
"C") != 0
712 && __builtin_strcmp(__s,
"POSIX") != 0)
714 this->_S_destroy_c_locale(this->_M_c_locale_codecvt);
715 this->_S_create_c_locale(this->_M_c_locale_codecvt, __s);
719 #if __cplusplus >= 201103L 730 #if __cplusplus >= 201103L 733 :
public codecvt<char16_t, char, mbstate_t>
751 :
public codecvt<char32_t, char, mbstate_t>
767 #if defined(_GLIBCXX_USE_CHAR8_T) 770 :
public codecvt<char16_t, char8_t, mbstate_t>
788 :
public codecvt<char32_t, char8_t, mbstate_t>
809 #if _GLIBCXX_EXTERN_TEMPLATE 814 use_facet<codecvt<char, char, mbstate_t> >(
const locale&);
818 has_facet<codecvt<char, char, mbstate_t> >(
const locale&);
820 #ifdef _GLIBCXX_USE_WCHAR_T 825 use_facet<codecvt<wchar_t, char, mbstate_t> >(
const locale&);
829 has_facet<codecvt<wchar_t, char, mbstate_t> >(
const locale&);
832 #if __cplusplus >= 201103L 836 #if defined(_GLIBCXX_USE_CHAR8_T) 845 _GLIBCXX_END_NAMESPACE_VERSION
848 #pragma GCC diagnostic pop result unshift(state_type &__state, extern_type *__to, extern_type *__to_end, extern_type *&__to_next) const
Reset conversion state.
const _CharT * c_str() const noexcept
Return const pointer to null-terminated contents.
Localization functionality base class.The facet class is the base class for a localization feature...
ISO C++ entities toplevel namespace is std.
Common base for codecvt functions.
Container class for localization functionality.The locale class is first a class wrapper for C librar...
Class codecvt<char32_t, char, mbstate_t> specialization.
Facet ID class.The ID class provides facets with an index used to identify them. Every facet class mu...
Primary class template messages.This facet encapsulates the code to retrieve messages from message ca...
class codecvt<char, char, mbstate_t> specialization.
Empty base class for codecvt facet [22.2.1.5].
result in(state_type &__state, const extern_type *__from, const extern_type *__from_end, const extern_type *&__from_next, intern_type *__to, intern_type *__to_end, intern_type *&__to_next) const
Convert from external to internal character set.
Class codecvt<char16_t, char, mbstate_t> specialization.
Primary class template codecvt.NB: Generic, mostly useless implementation.
result out(state_type &__state, const intern_type *__from, const intern_type *__from_end, const intern_type *&__from_next, extern_type *__to, extern_type *__to_end, extern_type *&__to_next) const
Convert from internal to external character set.
class codecvt_byname [22.2.1.6].
Class codecvt<wchar_t, char, mbstate_t> specialization.