39#pragma GCC system_header
44namespace std _GLIBCXX_VISIBILITY(default)
46_GLIBCXX_BEGIN_NAMESPACE_VERSION
70 template<
typename _InternT,
typename _ExternT,
typename _StateT>
76 typedef codecvt_base::result result;
79 typedef _StateT state_type;
209 encoding()
const throw()
210 {
return this->do_encoding(); }
213 always_noconv()
const throw()
214 {
return this->do_always_noconv(); }
217 length(state_type& __state,
const extern_type* __from,
218 const extern_type* __end,
size_t __max)
const
219 {
return this->do_length(__state, __from, __end, __max); }
222 max_length()
const throw()
223 {
return this->do_max_length(); }
227 __codecvt_abstract_base(
size_t __refs = 0) : locale::
facet(__refs) { }
230 ~__codecvt_abstract_base() { }
256 do_encoding()
const throw() = 0;
259 do_always_noconv() const
throw() = 0;
262 do_length(state_type&, const extern_type*
__from,
263 const extern_type* __end,
size_t __max) const = 0;
266 do_max_length() const
throw() = 0;
282 typedef codecvt_base::result result;
285 typedef _StateT state_type;
288 __c_locale _M_c_locale_codecvt;
296 _M_c_locale_codecvt(0)
323 do_encoding()
const throw();
326 do_always_noconv() const
throw();
329 do_length(state_type&, const extern_type*
__from,
330 const extern_type* __end,
size_t __max) const;
333 do_max_length() const
throw();
348 typedef char intern_type;
349 typedef char extern_type;
350 typedef mbstate_t state_type;
353 __c_locale _M_c_locale_codecvt;
385 do_encoding()
const throw();
388 do_always_noconv() const
throw();
391 do_length(state_type&, const extern_type*
__from,
392 const extern_type* __end,
size_t __max) const;
395 do_max_length() const
throw();
398#ifdef _GLIBCXX_USE_WCHAR_T
411 typedef wchar_t intern_type;
412 typedef char extern_type;
413 typedef mbstate_t state_type;
416 __c_locale _M_c_locale_codecvt;
438 do_unshift(state_type&
__state,
450 int do_encoding()
const throw();
453 bool do_always_noconv() const
throw();
456 int do_length(state_type&, const extern_type*
__from,
457 const extern_type* __end,
size_t __max) const;
460 do_max_length() const
throw();
464#if __cplusplus >= 201103L
475 typedef char16_t intern_type;
476 typedef char extern_type;
477 typedef mbstate_t state_type;
497 do_unshift(state_type&
__state,
509 int do_encoding()
const throw();
512 bool do_always_noconv() const
throw();
515 int do_length(state_type&, const extern_type*
__from,
516 const extern_type* __end,
size_t __max) const;
519 do_max_length() const
throw();
532 typedef char32_t intern_type;
533 typedef char extern_type;
534 typedef mbstate_t state_type;
554 do_unshift(state_type&
__state,
566 int do_encoding()
const throw();
569 bool do_always_noconv() const
throw();
572 int do_length(state_type&, const extern_type*
__from,
573 const extern_type* __end,
size_t __max) const;
576 do_max_length() const
throw();
579#ifdef _GLIBCXX_USE_CHAR8_T
590 typedef char16_t intern_type;
591 typedef char8_t extern_type;
592 typedef mbstate_t state_type;
612 do_unshift(state_type&
__state,
624 int do_encoding()
const throw();
627 bool do_always_noconv() const
throw();
630 int do_length(state_type&, const extern_type*
__from,
631 const extern_type* __end,
size_t __max) const;
634 do_max_length() const
throw();
647 typedef char32_t intern_type;
648 typedef char8_t extern_type;
649 typedef mbstate_t state_type;
663 do_out(state_type& __state,
const intern_type* __from,
664 const intern_type* __from_end,
const intern_type*& __from_next,
665 extern_type* __to, extern_type* __to_end,
666 extern_type*& __to_next)
const;
669 do_unshift(state_type& __state,
670 extern_type* __to, extern_type* __to_end,
671 extern_type*& __to_next)
const;
674 do_in(state_type& __state,
675 const extern_type* __from,
const extern_type* __from_end,
676 const extern_type*& __from_next,
677 intern_type* __to, intern_type* __to_end,
678 intern_type*& __to_next)
const;
681 int do_encoding()
const throw();
684 bool do_always_noconv() const throw();
687 int do_length(state_type&, const extern_type* __from,
688 const extern_type* __end,
size_t __max) const;
691 do_max_length() const throw();
698 template<
typename _InternT,
typename _ExternT,
typename _StateT>
709 this->_S_destroy_c_locale(this->_M_c_locale_codecvt);
710 this->_S_create_c_locale(this->_M_c_locale_codecvt,
__s);
714#if __cplusplus >= 201103L
725#if __cplusplus >= 201103L
728 :
public codecvt<char16_t, char, mbstate_t>
736 codecvt_byname(
const string& __s,
size_t __refs = 0)
737 : codecvt_byname(__s.c_str(), __refs) { }
741 ~codecvt_byname() { }
745 class codecvt_byname<char32_t, char, mbstate_t>
746 :
public codecvt<char32_t, char, mbstate_t>
750 codecvt_byname(
const char*,
size_t __refs = 0)
751 : codecvt<char32_t, char, mbstate_t>(__refs) { }
754 codecvt_byname(
const string& __s,
size_t __refs = 0)
755 : codecvt_byname(__s.c_str(), __refs) { }
759 ~codecvt_byname() { }
762#if defined(_GLIBCXX_USE_CHAR8_T)
764 class codecvt_byname<char16_t, char8_t, mbstate_t>
765 :
public codecvt<char16_t, char8_t, mbstate_t>
769 codecvt_byname(
const char*,
size_t __refs = 0)
770 : codecvt<char16_t, char8_t, mbstate_t>(__refs) { }
773 codecvt_byname(
const string& __s,
size_t __refs = 0)
774 : codecvt_byname(__s.c_str(), __refs) { }
778 ~codecvt_byname() { }
782 class codecvt_byname<char32_t, char8_t, mbstate_t>
783 :
public codecvt<char32_t, char8_t, mbstate_t>
787 codecvt_byname(
const char*,
size_t __refs = 0)
788 : codecvt<char32_t, char8_t, mbstate_t>(__refs) { }
791 codecvt_byname(
const string& __s,
size_t __refs = 0)
792 : codecvt_byname(__s.c_str(), __refs) { }
796 ~codecvt_byname() { }
804#if _GLIBCXX_EXTERN_TEMPLATE
805 extern template class codecvt_byname<char, char, mbstate_t>;
808 const codecvt<char, char, mbstate_t>&
809 use_facet<codecvt<char, char, mbstate_t> >(
const locale&);
813 has_facet<codecvt<char, char, mbstate_t> >(
const locale&);
815#ifdef _GLIBCXX_USE_WCHAR_T
816 extern template class codecvt_byname<wchar_t, char, mbstate_t>;
819 const codecvt<wchar_t, char, mbstate_t>&
820 use_facet<codecvt<wchar_t, char, mbstate_t> >(
const locale&);
824 has_facet<codecvt<wchar_t, char, mbstate_t> >(
const locale&);
827#if __cplusplus >= 201103L
828 extern template class codecvt_byname<char16_t, char, mbstate_t>;
829 extern template class codecvt_byname<char32_t, char, mbstate_t>;
831#if defined(_GLIBCXX_USE_CHAR8_T)
832 extern template class codecvt_byname<char16_t, char8_t, mbstate_t>;
833 extern template class codecvt_byname<char32_t, char8_t, mbstate_t>;
840_GLIBCXX_END_NAMESPACE_VERSION
ISO C++ entities toplevel namespace is std.
Empty base class for codecvt facet [22.2.1.5].
Common base for codecvt functions.
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.
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.
result unshift(state_type &__state, extern_type *__to, extern_type *__to_end, extern_type *&__to_next) const
Reset conversion state.
virtual result do_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 =0
Convert from internal to external character set.
Primary class template codecvt.
virtual result do_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.
virtual result do_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.
virtual result do_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.
virtual result do_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.
virtual result do_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].
Container class for localization functionality.
Localization functionality base class.
facet(size_t __refs=0)
Facet constructor.
Primary class template messages.