ctype.xml revision 1.1
1<section id="std.localization.facet.ctype" xreflabel="ctype"> 2<?dbhtml filename="ctype.html"?> 3 4<sectioninfo> 5 <keywordset> 6 <keyword> 7 ISO C++ 8 </keyword> 9 <keyword> 10 ctype 11 </keyword> 12 </keywordset> 13</sectioninfo> 14 15<title>ctype</title> 16 17<section id="facet.ctype.impl"> 18<title>Implementation</title> 19 20 <section> 21 <title>Specializations</title> 22 23<para> 24For the required specialization codecvt<wchar_t, char, mbstate_t> , 25conversions are made between the internal character set (always UCS4 26on GNU/Linux) and whatever the currently selected locale for the 27LC_CTYPE category implements. 28</para> 29 30<para> 31The two required specializations are implemented as follows: 32</para> 33 34<para> 35<code> 36ctype<char> 37</code> 38</para> 39<para> 40This is simple specialization. Implementing this was a piece of cake. 41</para> 42 43<para> 44<code> 45ctype<wchar_t> 46</code> 47</para> 48<para> 49This specialization, by specifying all the template parameters, pretty 50much ties the hands of implementors. As such, the implementation is 51straightforward, involving mcsrtombs for the conversions between char 52to wchar_t and wcsrtombs for conversions between wchar_t and char. 53</para> 54 55<para> 56Neither of these two required specializations deals with Unicode 57characters. 58</para> 59 60 </section> 61</section> 62 63<section id="facet.ctype.future"> 64<title>Future</title> 65 66 67<itemizedlist> 68 <listitem> 69 <para> 70 How to deal with the global locale issue? 71 </para></listitem> 72 73 <listitem> 74 <para> 75 How to deal with different types than char, wchar_t? </para></listitem> 76 77 <listitem><para> 78 Overlap between codecvt/ctype: narrow/widen 79 </para></listitem> 80 81 <listitem> 82 <para> 83 Mask typedef in codecvt_base, argument types in codecvt. what 84 is know about this type? 85 </para></listitem> 86 87 <listitem> 88 <para> 89 Why mask* argument in codecvt? 90 </para></listitem> 91 92 <listitem> 93 <para> 94 Can this be made (more) generic? is there a simple way to 95 straighten out the configure-time mess that is a by-product of 96 this class? 97 </para></listitem> 98 99 <listitem> 100 <para> 101 Get the ctype<wchar_t>::mask stuff under control. Need to 102 make some kind of static table, and not do lookup every time 103 somebody hits the do_is... functions. Too bad we can't just 104 redefine mask for ctype<wchar_t> 105 </para></listitem> 106 107 <listitem> 108 <para> 109 Rename abstract base class. See if just smash-overriding is a 110 better approach. Clarify, add sanity to naming. 111 </para> 112 </listitem> 113 114</itemizedlist> 115 116 117</section> 118 119 120<bibliography id="facet.ctype.biblio"> 121<title>Bibliography</title> 122 123 <biblioentry> 124 <title> 125 The GNU C Library 126 </title> 127 <author> 128 <surname>McGrath</surname> 129 <firstname>Roland</firstname> 130 </author> 131 <author> 132 <surname>Drepper</surname> 133 <firstname>Ulrich</firstname> 134 </author> 135 <copyright> 136 <year>2007</year> 137 <holder>FSF</holder> 138 </copyright> 139 <pagenums>Chapters 6 Character Set Handling and 7 Locales and Internationalization</pagenums> 140 </biblioentry> 141 142 <biblioentry> 143 <title> 144 Correspondence 145 </title> 146 <author> 147 <surname>Drepper</surname> 148 <firstname>Ulrich</firstname> 149 </author> 150 <copyright> 151 <year>2002</year> 152 <holder></holder> 153 </copyright> 154 </biblioentry> 155 156 <biblioentry> 157 <title> 158 ISO/IEC 14882:1998 Programming languages - C++ 159 </title> 160 <copyright> 161 <year>1998</year> 162 <holder>ISO</holder> 163 </copyright> 164 </biblioentry> 165 166 <biblioentry> 167 <title> 168 ISO/IEC 9899:1999 Programming languages - C 169 </title> 170 <copyright> 171 <year>1999</year> 172 <holder>ISO</holder> 173 </copyright> 174 </biblioentry> 175 176 <biblioentry> 177 <biblioid class="uri"> 178 <ulink url="http://www.unix.org/version3/ieee_std.html"> 179 <citetitle> 180 The Open Group Base Specifications, Issue 6 (IEEE Std. 1003.1-2004) 181 </citetitle> 182 </ulink> 183 </biblioid> 184 <copyright> 185 <year>1999</year> 186 <holder> 187 The Open Group/The Institute of Electrical and Electronics Engineers, Inc.</holder> 188 </copyright> 189 </biblioentry> 190 191 <biblioentry> 192 <title> 193 The C++ Programming Language, Special Edition 194 </title> 195 <author> 196 <surname>Stroustrup</surname> 197 <firstname>Bjarne</firstname> 198 </author> 199 <copyright> 200 <year>2000</year> 201 <holder>Addison Wesley, Inc.</holder> 202 </copyright> 203 <pagenums>Appendix D</pagenums> 204 <publisher> 205 <publishername> 206 Addison Wesley 207 </publishername> 208 </publisher> 209 </biblioentry> 210 211 <biblioentry> 212 <title> 213 Standard C++ IOStreams and Locales 214 </title> 215 <subtitle> 216 Advanced Programmer's Guide and Reference 217 </subtitle> 218 <author> 219 <surname>Langer</surname> 220 <firstname>Angelika</firstname> 221 </author> 222 <author> 223 <surname>Kreft</surname> 224 <firstname>Klaus</firstname> 225 </author> 226 <copyright> 227 <year>2000</year> 228 <holder>Addison Wesley Longman, Inc.</holder> 229 </copyright> 230 <publisher> 231 <publishername> 232 Addison Wesley Longman 233 </publishername> 234 </publisher> 235 </biblioentry> 236 237</bibliography> 238 239</section> 240