39 #pragma GCC system_header 
   41 namespace std _GLIBCXX_VISIBILITY(default)
 
   43 _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
   67   template<
typename _InternT, 
typename _ExternT, 
typename _StateT>
 
   73       typedef codecvt_base::result  result;
 
   74       typedef _InternT          intern_type;
 
   75       typedef _ExternT          extern_type;
 
   76       typedef _StateT           state_type;
 
  117       const intern_type* __from_end, 
const intern_type*& __from_next,
 
  118       extern_type* __to, extern_type* __to_end,
 
  119       extern_type*& __to_next)
 const 
  121     return this->
do_out(__state, __from, __from_end, __from_next,
 
  122                 __to, __to_end, __to_next);
 
  156           extern_type*& __to_next)
 const 
  157       { 
return this->do_unshift(__state, __to,__to_end,__to_next); }
 
  197      const extern_type* __from_end, 
const extern_type*& __from_next,
 
  198      intern_type* __to, intern_type* __to_end,
 
  199      intern_type*& __to_next)
 const 
  201     return this->do_in(__state, __from, __from_end, __from_next,
 
  202                __to, __to_end, __to_next);
 
  206       encoding() 
const throw()
 
  207       { 
return this->do_encoding(); }
 
  210       always_noconv() 
const throw()
 
  211       { 
return this->do_always_noconv(); }
 
  214       length(state_type& __state, 
const extern_type* __from,
 
  215          const extern_type* __end, 
size_t __max)
 const 
  216       { 
return this->do_length(__state, __from, __end, __max); }
 
  219       max_length() 
const throw()
 
  220       { 
return this->do_max_length(); }
 
  224       __codecvt_abstract_base(
size_t __refs = 0) : locale::
facet(__refs) { }
 
  227       ~__codecvt_abstract_base() { }
 
  237       do_out(state_type& __state, 
const intern_type* __from,
 
  238          const intern_type* __from_end, 
const intern_type*& __from_next,
 
  239          extern_type* __to, extern_type* __to_end,
 
  240          extern_type*& __to_next) 
const = 0;
 
  243       do_unshift(state_type& __state, extern_type* __to,
 
  244          extern_type* __to_end, extern_type*& __to_next) 
const = 0;
 
  247       do_in(state_type& __state, 
const extern_type* __from,
 
  248         const extern_type* __from_end, 
const extern_type*& __from_next,
 
  249         intern_type* __to, intern_type* __to_end,
 
  250         intern_type*& __to_next) 
const = 0;
 
  253       do_encoding() 
const throw() = 0;
 
  256       do_always_noconv() const throw() = 0;
 
  259       do_length(state_type&, const extern_type* __from,
 
  260         const extern_type* __end, 
size_t __max) const = 0;
 
  263       do_max_length() const throw() = 0;
 
  275    template<typename _InternT, typename _ExternT, typename _StateT>
 
  281       typedef codecvt_base::result  result;
 
  282       typedef _InternT          intern_type;
 
  283       typedef _ExternT          extern_type;
 
  284       typedef _StateT           state_type;
 
  287       __c_locale            _M_c_locale_codecvt;
 
  295     _M_c_locale_codecvt(0)
 
  299       codecvt(__c_locale __cloc, 
size_t __refs = 0);
 
  306       do_out(state_type& __state, 
const intern_type* __from,
 
  307          const intern_type* __from_end, 
const intern_type*& __from_next,
 
  308          extern_type* __to, extern_type* __to_end,
 
  309          extern_type*& __to_next) 
const;
 
  312       do_unshift(state_type& __state, extern_type* __to,
 
  313          extern_type* __to_end, extern_type*& __to_next) 
const;
 
  316       do_in(state_type& __state, 
const extern_type* __from,
 
  317         const extern_type* __from_end, 
const extern_type*& __from_next,
 
  318         intern_type* __to, intern_type* __to_end,
 
  319         intern_type*& __to_next) 
const;
 
  322       do_encoding() 
const throw();
 
  325       do_always_noconv() 
const throw();
 
  328       do_length(state_type&, 
const extern_type* __from,
 
  329         const extern_type* __end, 
size_t __max) 
const;
 
  332       do_max_length() 
const throw();
 
  335   template<
typename _InternT, 
typename _ExternT, 
typename _StateT>
 
  345       typedef char          intern_type;
 
  346       typedef char          extern_type;
 
  347       typedef mbstate_t         state_type;
 
  350       __c_locale            _M_c_locale_codecvt;
 
  359       codecvt(__c_locale __cloc, 
size_t __refs = 0);
 
  366       do_out(state_type& __state, 
const intern_type* __from,
 
  367          const intern_type* __from_end, 
const intern_type*& __from_next,
 
  368          extern_type* __to, extern_type* __to_end,
 
  369          extern_type*& __to_next) 
const;
 
  372       do_unshift(state_type& __state, extern_type* __to,
 
  373          extern_type* __to_end, extern_type*& __to_next) 
const;
 
  376       do_in(state_type& __state, 
const extern_type* __from,
 
  377         const extern_type* __from_end, 
const extern_type*& __from_next,
 
  378         intern_type* __to, intern_type* __to_end,
 
  379         intern_type*& __to_next) 
const;
 
  382       do_encoding() 
const throw();
 
  385       do_always_noconv() 
const throw();
 
  388       do_length(state_type&, 
const extern_type* __from,
 
  389         const extern_type* __end, 
size_t __max) 
const;
 
  392       do_max_length() 
const throw();
 
  395 #ifdef _GLIBCXX_USE_WCHAR_T 
  403       typedef wchar_t           intern_type;
 
  404       typedef char          extern_type;
 
  405       typedef mbstate_t         state_type;
 
  408       __c_locale            _M_c_locale_codecvt;
 
  417       codecvt(__c_locale __cloc, 
size_t __refs = 0);
 
  424       do_out(state_type& __state, 
const intern_type* __from,
 
  425          const intern_type* __from_end, 
const intern_type*& __from_next,
 
  426          extern_type* __to, extern_type* __to_end,
 
  427          extern_type*& __to_next) 
const;
 
  430       do_unshift(state_type& __state,
 
  431          extern_type* __to, extern_type* __to_end,
 
  432          extern_type*& __to_next) 
const;
 
  435       do_in(state_type& __state,
 
  436          const extern_type* __from, 
const extern_type* __from_end,
 
  437          const extern_type*& __from_next,
 
  438          intern_type* __to, intern_type* __to_end,
 
  439          intern_type*& __to_next) 
const;
 
  442       int do_encoding() 
const throw();
 
  445       bool do_always_noconv() 
const throw();
 
  448       int do_length(state_type&, 
const extern_type* __from,
 
  449             const extern_type* __end, 
size_t __max) 
const;
 
  452       do_max_length() 
const throw();
 
  454 #endif //_GLIBCXX_USE_WCHAR_T 
  457   template<
typename _InternT, 
typename _ExternT, 
typename _StateT>
 
  465     if (__builtin_strcmp(__s, 
"C") != 0
 
  466         && __builtin_strcmp(__s, 
"POSIX") != 0)
 
  468         this->_S_destroy_c_locale(this->_M_c_locale_codecvt);
 
  469         this->_S_create_c_locale(this->_M_c_locale_codecvt, __s);
 
  480 #if _GLIBCXX_EXTERN_TEMPLATE 
  485     use_facet<codecvt<char, char, mbstate_t> >(
const locale&);
 
  489     has_facet<codecvt<char, char, mbstate_t> >(
const locale&);
 
  491 #ifdef _GLIBCXX_USE_WCHAR_T 
  496     use_facet<codecvt<wchar_t, char, mbstate_t> >(
const locale&);
 
  500     has_facet<codecvt<wchar_t, char, mbstate_t> >(
const locale&);
 
  504 _GLIBCXX_END_NAMESPACE_VERSION
 
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. 
 
Common base for codecvt functions. 
 
class codecvt<char, char, mbstate_t> specialization. 
 
class codecvt_byname [22.2.1.6]. 
 
Localization functionality base class.The facet class is the base class for a localization feature...
 
Empty base class for codecvt facet [22.2.1.5]. 
 
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. 
 
Container class for localization functionality.The locale class is first a class wrapper for C librar...
 
facet(size_t __refs=0)
Facet constructor. 
 
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.NB: Generic, mostly useless implementation. 
 
Extension to use iconv for dealing with character encodings. 
 
class codecvt<wchar_t, char, mbstate_t> specialization. 
 
result unshift(state_type &__state, extern_type *__to, extern_type *__to_end, extern_type *&__to_next) const 
Reset conversion state. 
 
Facet ID class.The ID class provides facets with an index used to identify them. Every facet class mu...