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