40 #pragma GCC system_header
42 namespace std _GLIBCXX_VISIBILITY(default)
44 _GLIBCXX_BEGIN_NAMESPACE_VERSION
68 template<
typename _InternT,
typename _ExternT,
typename _StateT>
74 typedef codecvt_base::result result;
75 typedef _InternT intern_type;
76 typedef _ExternT extern_type;
77 typedef _StateT state_type;
118 const intern_type* __from_end,
const intern_type*& __from_next,
119 extern_type* __to, extern_type* __to_end,
120 extern_type*& __to_next)
const
122 return this->
do_out(__state, __from, __from_end, __from_next,
123 __to, __to_end, __to_next);
157 extern_type*& __to_next)
const
158 {
return this->do_unshift(__state, __to,__to_end,__to_next); }
198 const extern_type* __from_end,
const extern_type*& __from_next,
199 intern_type* __to, intern_type* __to_end,
200 intern_type*& __to_next)
const
202 return this->do_in(__state, __from, __from_end, __from_next,
203 __to, __to_end, __to_next);
207 encoding()
const throw()
208 {
return this->do_encoding(); }
211 always_noconv()
const throw()
212 {
return this->do_always_noconv(); }
215 length(state_type& __state,
const extern_type* __from,
216 const extern_type* __end,
size_t __max)
const
217 {
return this->do_length(__state, __from, __end, __max); }
220 max_length()
const throw()
221 {
return this->do_max_length(); }
225 __codecvt_abstract_base(
size_t __refs = 0) : locale::
facet(__refs) { }
228 ~__codecvt_abstract_base() { }
238 do_out(state_type& __state,
const intern_type* __from,
239 const intern_type* __from_end,
const intern_type*& __from_next,
240 extern_type* __to, extern_type* __to_end,
241 extern_type*& __to_next)
const = 0;
244 do_unshift(state_type& __state, extern_type* __to,
245 extern_type* __to_end, extern_type*& __to_next)
const = 0;
248 do_in(state_type& __state,
const extern_type* __from,
249 const extern_type* __from_end,
const extern_type*& __from_next,
250 intern_type* __to, intern_type* __to_end,
251 intern_type*& __to_next)
const = 0;
254 do_encoding()
const throw() = 0;
257 do_always_noconv() const throw() = 0;
260 do_length(state_type&, const extern_type* __from,
261 const extern_type* __end,
size_t __max) const = 0;
264 do_max_length() const throw() = 0;
276 template<typename _InternT, typename _ExternT, typename _StateT>
282 typedef codecvt_base::result result;
283 typedef _InternT intern_type;
284 typedef _ExternT extern_type;
285 typedef _StateT state_type;
288 __c_locale _M_c_locale_codecvt;
296 _M_c_locale_codecvt(0)
300 codecvt(__c_locale __cloc,
size_t __refs = 0);
307 do_out(state_type& __state,
const intern_type* __from,
308 const intern_type* __from_end,
const intern_type*& __from_next,
309 extern_type* __to, extern_type* __to_end,
310 extern_type*& __to_next)
const;
313 do_unshift(state_type& __state, extern_type* __to,
314 extern_type* __to_end, extern_type*& __to_next)
const;
317 do_in(state_type& __state,
const extern_type* __from,
318 const extern_type* __from_end,
const extern_type*& __from_next,
319 intern_type* __to, intern_type* __to_end,
320 intern_type*& __to_next)
const;
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();
336 template<
typename _InternT,
typename _ExternT,
typename _StateT>
346 typedef char intern_type;
347 typedef char extern_type;
348 typedef mbstate_t state_type;
351 __c_locale _M_c_locale_codecvt;
360 codecvt(__c_locale __cloc,
size_t __refs = 0);
367 do_out(state_type& __state,
const intern_type* __from,
368 const intern_type* __from_end,
const intern_type*& __from_next,
369 extern_type* __to, extern_type* __to_end,
370 extern_type*& __to_next)
const;
373 do_unshift(state_type& __state, extern_type* __to,
374 extern_type* __to_end, extern_type*& __to_next)
const;
377 do_in(state_type& __state,
const extern_type* __from,
378 const extern_type* __from_end,
const extern_type*& __from_next,
379 intern_type* __to, intern_type* __to_end,
380 intern_type*& __to_next)
const;
383 do_encoding()
const throw();
386 do_always_noconv()
const throw();
389 do_length(state_type&,
const extern_type* __from,
390 const extern_type* __end,
size_t __max)
const;
393 do_max_length()
const throw();
396 #ifdef _GLIBCXX_USE_WCHAR_T
404 typedef wchar_t intern_type;
405 typedef char extern_type;
406 typedef mbstate_t state_type;
409 __c_locale _M_c_locale_codecvt;
418 codecvt(__c_locale __cloc,
size_t __refs = 0);
425 do_out(state_type& __state,
const intern_type* __from,
426 const intern_type* __from_end,
const intern_type*& __from_next,
427 extern_type* __to, extern_type* __to_end,
428 extern_type*& __to_next)
const;
431 do_unshift(state_type& __state,
432 extern_type* __to, extern_type* __to_end,
433 extern_type*& __to_next)
const;
436 do_in(state_type& __state,
437 const extern_type* __from,
const extern_type* __from_end,
438 const extern_type*& __from_next,
439 intern_type* __to, intern_type* __to_end,
440 intern_type*& __to_next)
const;
443 int do_encoding()
const throw();
446 bool do_always_noconv()
const throw();
449 int do_length(state_type&,
const extern_type* __from,
450 const extern_type* __end,
size_t __max)
const;
453 do_max_length()
const throw();
455 #endif //_GLIBCXX_USE_WCHAR_T
458 template<
typename _InternT,
typename _ExternT,
typename _StateT>
466 if (__builtin_strcmp(__s,
"C") != 0
467 && __builtin_strcmp(__s,
"POSIX") != 0)
469 this->_S_destroy_c_locale(this->_M_c_locale_codecvt);
470 this->_S_create_c_locale(this->_M_c_locale_codecvt, __s);
481 #if _GLIBCXX_EXTERN_TEMPLATE
486 use_facet<codecvt<char, char, mbstate_t> >(
const locale&);
490 has_facet<codecvt<char, char, mbstate_t> >(
const locale&);
492 #ifdef _GLIBCXX_USE_WCHAR_T
497 use_facet<codecvt<wchar_t, char, mbstate_t> >(
const locale&);
501 has_facet<codecvt<wchar_t, char, mbstate_t> >(
const locale&);
505 _GLIBCXX_END_NAMESPACE_VERSION