00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #include <locale>
00031
00032 namespace std
00033 {
00034
00035 locale::id codecvt<char, char, mbstate_t>::id;
00036
00037 #ifdef _GLIBCPP_USE_WCHAR_T
00038 locale::id codecvt<wchar_t, char, mbstate_t>::id;
00039 #endif
00040
00041 #ifdef _GLIBCPP_USE___ENC_TRAITS
00042
00043 const int __enc_traits::_S_max_size;
00044 #endif
00045
00046 codecvt<char, char, mbstate_t>::
00047 codecvt(size_t __refs)
00048 : __codecvt_abstract_base<char, char, mbstate_t>(__refs)
00049 { }
00050
00051 codecvt<char, char, mbstate_t>::
00052 ~codecvt()
00053 { }
00054
00055 codecvt_base::result
00056 codecvt<char, char, mbstate_t>::
00057 do_out(state_type&, const intern_type* __from,
00058 const intern_type*, const intern_type*& __from_next,
00059 extern_type* __to, extern_type*,
00060 extern_type*& __to_next) const
00061 {
00062
00063
00064
00065 __from_next = __from;
00066 __to_next = __to;
00067 return noconv;
00068 }
00069
00070 codecvt_base::result
00071 codecvt<char, char, mbstate_t>::
00072 do_unshift(state_type&, extern_type* __to,
00073 extern_type*, extern_type*& __to_next) const
00074 {
00075 __to_next = __to;
00076 return noconv;
00077 }
00078
00079 codecvt_base::result
00080 codecvt<char, char, mbstate_t>::
00081 do_in(state_type&, const extern_type* __from,
00082 const extern_type*, const extern_type*& __from_next,
00083 intern_type* __to, intern_type*,
00084 intern_type*& __to_next) const
00085 {
00086
00087
00088
00089 __from_next = __from;
00090 __to_next = __to;
00091 return noconv;
00092 }
00093
00094 int
00095 codecvt<char, char, mbstate_t>::
00096 do_encoding() const throw()
00097 { return 1; }
00098
00099 bool
00100 codecvt<char, char, mbstate_t>::
00101 do_always_noconv() const throw()
00102 { return true; }
00103
00104 int
00105 codecvt<char, char, mbstate_t>::
00106 do_length (const state_type&, const extern_type* __from,
00107 const extern_type* __end, size_t __max) const
00108 { return min(__max, static_cast<size_t>(__end - __from)); }
00109
00110 int
00111 codecvt<char, char, mbstate_t>::
00112 do_max_length() const throw()
00113 { return 1; }
00114
00115 #ifdef _GLIBCPP_USE_WCHAR_T
00116
00117 codecvt<wchar_t, char, mbstate_t>::
00118 codecvt(size_t __refs)
00119 : __codecvt_abstract_base<wchar_t, char, mbstate_t>(__refs)
00120 { }
00121
00122 codecvt<wchar_t, char, mbstate_t>::
00123 ~codecvt()
00124 { }
00125
00126 codecvt_base::result
00127 codecvt<wchar_t, char, mbstate_t>::
00128 do_unshift(state_type&, extern_type* __to,
00129 extern_type*, extern_type*& __to_next) const
00130 {
00131 __to_next = __to;
00132 return noconv;
00133 }
00134
00135 int
00136 codecvt<wchar_t, char, mbstate_t>::
00137 do_encoding() const throw()
00138 { return sizeof(wchar_t); }
00139
00140 bool
00141 codecvt<wchar_t, char, mbstate_t>::
00142 do_always_noconv() const throw()
00143 { return false; }
00144
00145 int
00146 codecvt<wchar_t, char, mbstate_t>::
00147 do_length(const state_type&, const extern_type* __from,
00148 const extern_type* __end, size_t __max) const
00149 { return min(__max, static_cast<size_t>(__end - __from)); }
00150
00151 int
00152 codecvt<wchar_t, char, mbstate_t>::
00153 do_max_length() const throw()
00154 { return 1; }
00155 #endif // _GLIBCPP_USE_WCHAR_T
00156 }