Update concepts branch to revision 131834
[official-gcc.git] / libstdc++-v3 / doc / xml / manual / ctype.xml
blob58f08fbdb6875796ed8a537c69881f271e516979
1 <sect1 id="manual.localization.facet.ctype" xreflabel="ctype">
2 <?dbhtml filename="ctype.html"?>
3  
4 <sect1info>
5   <keywordset>
6     <keyword>
7       ISO C++
8     </keyword>
9     <keyword>
10       ctype
11     </keyword>
12   </keywordset>
13 </sect1info>
15 <title>ctype</title>
17 <sect2 id="facet.ctype.impl" xreflabel="facet.ctype.impl">
18 <title>Implementation</title>
20   <sect3>
21     <title>Specializations</title>
23 <para>
24 For the required specialization codecvt&lt;wchar_t, char, mbstate_t&gt; ,
25 conversions are made between the internal character set (always UCS4
26 on GNU/Linux) and whatever the currently selected locale for the
27 LC_CTYPE category implements.
28 </para>
30 <para>
31 The two required specializations are implemented as follows:
32 </para>
34 <para>
35 <code>
36 ctype&lt;char&gt;
37 </code>
38 </para>
39 <para>
40 This is simple specialization. Implementing this was a piece of cake.
41 </para>
43 <para>
44 <code>
45 ctype&lt;wchar_t&gt;
46 </code>
47 </para>
48 <para>
49 This specialization, by specifying all the template parameters, pretty
50 much ties the hands of implementors. As such, the implementation is
51 straightforward, involving mcsrtombs for the conversions between char
52 to wchar_t and wcsrtombs for conversions between wchar_t and char.
53 </para>
55 <para>
56 Neither of these two required specializations deals with Unicode
57 characters.
58 </para>
60   </sect3>
61 </sect2>
63 <sect2 id="facet.ctype.future" xreflabel="facet.ctype.future">
64 <title>Future</title>
67 <itemizedlist>
68    <listitem>
69    <para>
70    How to deal with the global locale issue? 
71    </para></listitem>
73    <listitem>
74    <para> 
75    How to deal with different types than char, wchar_t? </para></listitem>
77    <listitem><para>
78    Overlap between codecvt/ctype: narrow/widen 
79    </para></listitem>
81    <listitem>
82      <para> 
83        Mask typedef in codecvt_base, argument types in codecvt.  what
84        is know about this type? 
85    </para></listitem>
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>
99    <listitem>
100      <para> 
101        Get the ctype&lt;wchar_t&gt;::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&lt;wchar_t&gt; 
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>
114 </itemizedlist>
117 </sect2>
120 <bibliography id="facet.ctype.biblio" xreflabel="facet.ctype.biblio">
121 <title>Bibliography</title>
123   <biblioentry>
124     <title>
125       The GNU C Library
126     </title>
128     <author>
129       <surname>McGrath</surname>
130       <firstname>Roland</firstname>
131     </author>
132     <author>
133       <surname>Drepper</surname>
134       <firstname>Ulrich</firstname>
135     </author>
137     <copyright>
138       <year>2007</year>
139       <holder>FSF</holder>
140     </copyright>
141     <pagenums>Chapters 6  Character Set Handling and 7 Locales and Internationalization</pagenums>
143   </biblioentry> 
145   <biblioentry>
146     <title>
147       Correspondence
148     </title>
150     <author>
151       <surname>Drepper</surname>
152       <firstname>Ulrich</firstname>
153     </author>
155     <copyright>
156       <year>2002</year>
157       <holder></holder>
158     </copyright>
159   </biblioentry> 
161   <biblioentry>
162     <title>
163       ISO/IEC 14882:1998 Programming languages - C++
164     </title>
166     <copyright>
167       <year>1998</year>
168       <holder>ISO</holder>
169     </copyright>
170   </biblioentry> 
172   <biblioentry>
173     <title>
174       ISO/IEC 9899:1999 Programming languages - C
175     </title>
177     <copyright>
178       <year>1999</year>
179       <holder>ISO</holder>
180     </copyright>
181   </biblioentry> 
183   <biblioentry>
184     <title>
185       System Interface Definitions, Issue 6 (IEEE Std. 1003.1-200x)
186     </title>
188     <copyright>
189       <year>1999</year>
190       <holder>
191       The Open Group/The Institute of Electrical and Electronics Engineers, Inc.</holder>
192     </copyright>
194     <biblioid>
195       <ulink url="http://www.opennc.org/austin/docreg.html">
196       </ulink>
197     </biblioid>
199   </biblioentry> 
201   <biblioentry>
202     <title>
203       The C++ Programming Language, Special Edition
204     </title>
205     
206     <author>
207       <surname>Stroustrup</surname>
208       <firstname>Bjarne</firstname>
209     </author>
211     <copyright>
212       <year>2000</year>
213       <holder>Addison Wesley, Inc.</holder>
214     </copyright>
215     <pagenums>Appendix D</pagenums>
217     <publisher>
218       <publishername>
219         Addison Wesley
220       </publishername>
221     </publisher>
223   </biblioentry> 
226   <biblioentry>
227     <title>
228       Standard C++ IOStreams and Locales
229     </title>
230     <subtitle>
231       Advanced Programmer's Guide and Reference
232     </subtitle>
233     
234     <author>
235       <surname>Langer</surname>
236       <firstname>Angelika</firstname>
237     </author>
239     <author>
240       <surname>Kreft</surname>
241       <firstname>Klaus</firstname>
242     </author>
244     <copyright>
245       <year>2000</year>
246       <holder>Addison Wesley Longman, Inc.</holder>
247     </copyright>
249     <publisher>
250       <publishername>
251         Addison Wesley Longman
252       </publishername>
253     </publisher>
255   </biblioentry> 
257 </bibliography>
259 </sect1>