1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns=
"http://www.w3.org/1999/xhtml">
4 <meta http-equiv=
"Content-Type" content=
"text/xhtml;charset=UTF-8"/>
5 <meta http-equiv=
"X-UA-Compatible" content=
"IE=9"/>
6 <meta name=
"generator" content=
"Doxygen 1.8.6"/>
7 <title>Boost.Locale: boost::locale::utf::utf_traits
< CharType, size
> Struct Template Reference
</title>
8 <link href=
"tabs.css" rel=
"stylesheet" type=
"text/css"/>
9 <script type=
"text/javascript" src=
"jquery.js"></script>
10 <script type=
"text/javascript" src=
"dynsections.js"></script>
11 <link href=
"navtree.css" rel=
"stylesheet" type=
"text/css"/>
12 <script type=
"text/javascript" src=
"resize.js"></script>
13 <script type=
"text/javascript" src=
"navtree.js"></script>
14 <script type=
"text/javascript">
15 $(document).ready(initResizable);
16 $(window).load(resizeHeight);
18 <link href=
"doxygen.css" rel=
"stylesheet" type=
"text/css" />
21 <div id=
"top"><!-- do not remove this div, it is closed by doxygen! -->
23 <table cellspacing=
"0" cellpadding=
"0">
25 <tr style=
"height: 56px;">
26 <td id=
"projectlogo"><img alt=
"Logo" src=
"boost-small.png"/></td>
27 <td style=
"padding-left: 0.5em;">
28 <div id=
"projectname">Boost.Locale
35 <!-- end header part -->
36 <!-- Generated by Doxygen 1.8.6 -->
37 <div id=
"navrow1" class=
"tabs">
39 <li><a href=
"index.html"><span>Main
 Page
</span></a></li>
40 <li><a href=
"pages.html"><span>Related
 Pages
</span></a></li>
41 <li><a href=
"modules.html"><span>Modules
</span></a></li>
42 <li><a href=
"namespaces.html"><span>Namespaces
</span></a></li>
43 <li class=
"current"><a href=
"annotated.html"><span>Classes
</span></a></li>
44 <li><a href=
"files.html"><span>Files
</span></a></li>
45 <li><a href=
"examples.html"><span>Examples
</span></a></li>
48 <div id=
"navrow2" class=
"tabs2">
50 <li><a href=
"annotated.html"><span>Class
 List
</span></a></li>
51 <li><a href=
"hierarchy.html"><span>Class
 Hierarchy
</span></a></li>
52 <li><a href=
"functions.html"><span>Class
 Members
</span></a></li>
56 <div id=
"side-nav" class=
"ui-resizable side-nav-resizable">
58 <div id=
"nav-tree-contents">
59 <div id=
"nav-sync" class=
"sync"></div>
62 <div id=
"splitbar" style=
"-moz-user-select:none;"
63 class=
"ui-resizable-handle">
66 <script type=
"text/javascript">
67 $(document).ready(function(){initNavTree('structboost_1_1locale_1_1utf_1_1utf__traits.html','');});
69 <div id=
"doc-content">
72 <a href=
"#pub-types">Public Types
</a> |
73 <a href=
"#pub-static-methods">Static Public Member Functions
</a> |
74 <a href=
"#pub-static-attribs">Static Public Attributes
</a> |
75 <a href=
"structboost_1_1locale_1_1utf_1_1utf__traits-members.html">List of all members
</a> </div>
76 <div class=
"headertitle">
77 <div class=
"title">boost::locale::utf::utf_traits
< CharType, size
> Struct Template Reference
</div> </div>
79 <div class=
"contents">
81 <p>UTF Traits class - functions to convert UTF sequences to and from Unicode code points.
82 <a href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html#details">More...
</a></p>
84 <p><code>#include
<<a class=
"el" href=
"utf_8hpp_source.html">boost/locale/utf.hpp
</a>></code></p>
85 <table class=
"memberdecls">
86 <tr class=
"heading"><td colspan=
"2"><h2 class=
"groupheader"><a name=
"pub-types"></a>
87 Public Types
</h2></td></tr>
88 <tr class=
"memitem:accca9dc2d8fe018b9b5640c48e3470e4"><td class=
"memItemLeft" align=
"right" valign=
"top">typedef CharType
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html#accca9dc2d8fe018b9b5640c48e3470e4">char_type
</a></td></tr>
89 <tr class=
"separator:accca9dc2d8fe018b9b5640c48e3470e4"><td class=
"memSeparator" colspan=
"2"> </td></tr>
90 </table><table class=
"memberdecls">
91 <tr class=
"heading"><td colspan=
"2"><h2 class=
"groupheader"><a name=
"pub-static-methods"></a>
92 Static Public Member Functions
</h2></td></tr>
93 <tr class=
"memitem:a9b6b01fa6705ba67ac78359ddee03213"><td class=
"memTemplParams" colspan=
"2">template
<typename Iterator
> </td></tr>
94 <tr class=
"memitem:a9b6b01fa6705ba67ac78359ddee03213"><td class=
"memTemplItemLeft" align=
"right" valign=
"top">static
<a class=
"el" href=
"namespaceboost_1_1locale_1_1utf.html#a068111a6b9d6d465a63893ed5c05e2f8">code_point
</a> </td><td class=
"memTemplItemRight" valign=
"bottom"><a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html#a9b6b01fa6705ba67ac78359ddee03213">decode
</a> (Iterator
&p, Iterator e)
</td></tr>
95 <tr class=
"separator:a9b6b01fa6705ba67ac78359ddee03213"><td class=
"memSeparator" colspan=
"2"> </td></tr>
96 <tr class=
"memitem:a26c106ec8816f48431f882017ab46763"><td class=
"memItemLeft" align=
"right" valign=
"top">static int
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html#a26c106ec8816f48431f882017ab46763">width
</a> (
<a class=
"el" href=
"namespaceboost_1_1locale_1_1utf.html#a068111a6b9d6d465a63893ed5c05e2f8">code_point
</a> value)
</td></tr>
97 <tr class=
"separator:a26c106ec8816f48431f882017ab46763"><td class=
"memSeparator" colspan=
"2"> </td></tr>
98 <tr class=
"memitem:a8a6b72ba87a817652f522018df51a9a7"><td class=
"memItemLeft" align=
"right" valign=
"top">static int
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html#a8a6b72ba87a817652f522018df51a9a7">trail_length
</a> (
<a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html#accca9dc2d8fe018b9b5640c48e3470e4">char_type
</a> c)
</td></tr>
99 <tr class=
"separator:a8a6b72ba87a817652f522018df51a9a7"><td class=
"memSeparator" colspan=
"2"> </td></tr>
100 <tr class=
"memitem:ae2cb78fcb8a58bed3e0ce1d6528a719a"><td class=
"memItemLeft" align=
"right" valign=
"top">static bool
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html#ae2cb78fcb8a58bed3e0ce1d6528a719a">is_trail
</a> (
<a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html#accca9dc2d8fe018b9b5640c48e3470e4">char_type
</a> c)
</td></tr>
101 <tr class=
"separator:ae2cb78fcb8a58bed3e0ce1d6528a719a"><td class=
"memSeparator" colspan=
"2"> </td></tr>
102 <tr class=
"memitem:a19789c4c26c8d9f576de5272f3d41a11"><td class=
"memItemLeft" align=
"right" valign=
"top">static bool
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html#a19789c4c26c8d9f576de5272f3d41a11">is_lead
</a> (
<a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html#accca9dc2d8fe018b9b5640c48e3470e4">char_type
</a> c)
</td></tr>
103 <tr class=
"separator:a19789c4c26c8d9f576de5272f3d41a11"><td class=
"memSeparator" colspan=
"2"> </td></tr>
104 <tr class=
"memitem:acd59f628af084f800f8a86cdd8124fd8"><td class=
"memTemplParams" colspan=
"2">template
<typename Iterator
> </td></tr>
105 <tr class=
"memitem:acd59f628af084f800f8a86cdd8124fd8"><td class=
"memTemplItemLeft" align=
"right" valign=
"top">static Iterator
 </td><td class=
"memTemplItemRight" valign=
"bottom"><a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html#acd59f628af084f800f8a86cdd8124fd8">encode
</a> (
<a class=
"el" href=
"namespaceboost_1_1locale_1_1utf.html#a068111a6b9d6d465a63893ed5c05e2f8">code_point
</a> value, Iterator out)
</td></tr>
106 <tr class=
"separator:acd59f628af084f800f8a86cdd8124fd8"><td class=
"memSeparator" colspan=
"2"> </td></tr>
107 <tr class=
"memitem:a8ff625b2c19b0d4132f7ec9e6303cb36"><td class=
"memTemplParams" colspan=
"2">template
<typename Iterator
> </td></tr>
108 <tr class=
"memitem:a8ff625b2c19b0d4132f7ec9e6303cb36"><td class=
"memTemplItemLeft" align=
"right" valign=
"top">static
<a class=
"el" href=
"namespaceboost_1_1locale_1_1utf.html#a068111a6b9d6d465a63893ed5c05e2f8">code_point
</a> </td><td class=
"memTemplItemRight" valign=
"bottom"><a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html#a8ff625b2c19b0d4132f7ec9e6303cb36">decode_valid
</a> (Iterator
&p)
</td></tr>
109 <tr class=
"separator:a8ff625b2c19b0d4132f7ec9e6303cb36"><td class=
"memSeparator" colspan=
"2"> </td></tr>
110 </table><table class=
"memberdecls">
111 <tr class=
"heading"><td colspan=
"2"><h2 class=
"groupheader"><a name=
"pub-static-attribs"></a>
112 Static Public Attributes
</h2></td></tr>
113 <tr class=
"memitem:abb4cb63a924d19505c2cb6e930c68a13"><td class=
"memItemLeft" align=
"right" valign=
"top">static const int
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html#abb4cb63a924d19505c2cb6e930c68a13">max_width
</a></td></tr>
114 <tr class=
"separator:abb4cb63a924d19505c2cb6e930c68a13"><td class=
"memSeparator" colspan=
"2"> </td></tr>
116 <a name=
"details" id=
"details"></a><h2 class=
"groupheader">Detailed Description
</h2>
117 <div class=
"textblock"><h3>template
<typename CharType, int size = sizeof(CharType)
><br/>
118 struct boost::locale::utf::utf_traits
< CharType, size
></h3>
120 <p>UTF Traits class - functions to convert UTF sequences to and from Unicode code points.
</p>
121 </div><h2 class=
"groupheader">Member Typedef Documentation
</h2>
122 <a class=
"anchor" id=
"accca9dc2d8fe018b9b5640c48e3470e4"></a>
123 <div class=
"memitem">
124 <div class=
"memproto">
125 <div class=
"memtemplate">
126 template
<typename CharType, int size = sizeof(CharType)
> </div>
127 <table class=
"memname">
129 <td class=
"memname">typedef CharType
<a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html">boost::locale::utf::utf_traits
</a>< CharType, size
>::
<a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html#accca9dc2d8fe018b9b5640c48e3470e4">char_type
</a></td>
132 </div><div class=
"memdoc">
133 <p>The type of the character
</p>
137 <h2 class=
"groupheader">Member Function Documentation
</h2>
138 <a class=
"anchor" id=
"a9b6b01fa6705ba67ac78359ddee03213"></a>
139 <div class=
"memitem">
140 <div class=
"memproto">
141 <div class=
"memtemplate">
142 template
<typename CharType, int size = sizeof(CharType)
> </div>
143 <div class=
"memtemplate">
144 template
<typename Iterator
> </div>
145 <table class=
"mlabels">
147 <td class=
"mlabels-left">
148 <table class=
"memname">
150 <td class=
"memname">static
<a class=
"el" href=
"namespaceboost_1_1locale_1_1utf.html#a068111a6b9d6d465a63893ed5c05e2f8">code_point
</a> <a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html">boost::locale::utf::utf_traits
</a>< CharType, size
>::decode
</td>
152 <td class=
"paramtype">Iterator
& </td>
153 <td class=
"paramname"><em>p
</em>,
</td>
156 <td class=
"paramkey"></td>
158 <td class=
"paramtype">Iterator
 </td>
159 <td class=
"paramname"><em>e
</em> </td>
168 <td class=
"mlabels-right">
169 <span class=
"mlabels"><span class=
"mlabel">static
</span></span> </td>
172 </div><div class=
"memdoc">
173 <p>Read one code point from the range [p,e) and return it.
</p>
175 <li>If the sequence that was read is incomplete sequence returns
<a class=
"el" href=
"namespaceboost_1_1locale_1_1utf.html#a20dbe458fd18229a0e6c09888d031b38">incomplete
</a>,
</li>
176 <li>If illegal sequence detected returns
<a class=
"el" href=
"namespaceboost_1_1locale_1_1utf.html#a30010000878c7732340bda8956b844fb">illegal
</a></li>
180 <li>Iterator is valid input iterator
</li>
182 <p>Postconditions
</p>
184 <li>p points to the last consumed character
</li>
189 <a class=
"anchor" id=
"a8ff625b2c19b0d4132f7ec9e6303cb36"></a>
190 <div class=
"memitem">
191 <div class=
"memproto">
192 <div class=
"memtemplate">
193 template
<typename CharType, int size = sizeof(CharType)
> </div>
194 <div class=
"memtemplate">
195 template
<typename Iterator
> </div>
196 <table class=
"mlabels">
198 <td class=
"mlabels-left">
199 <table class=
"memname">
201 <td class=
"memname">static
<a class=
"el" href=
"namespaceboost_1_1locale_1_1utf.html#a068111a6b9d6d465a63893ed5c05e2f8">code_point
</a> <a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html">boost::locale::utf::utf_traits
</a>< CharType, size
>::decode_valid
</td>
203 <td class=
"paramtype">Iterator
& </td>
204 <td class=
"paramname"><em>p
</em></td><td>)
</td>
209 <td class=
"mlabels-right">
210 <span class=
"mlabels"><span class=
"mlabel">static
</span></span> </td>
213 </div><div class=
"memdoc">
214 <p>Decodes valid UTF sequence that is pointed by p into code point.
</p>
215 <p>If the sequence is invalid or points to end the behavior is undefined
</p>
219 <a class=
"anchor" id=
"acd59f628af084f800f8a86cdd8124fd8"></a>
220 <div class=
"memitem">
221 <div class=
"memproto">
222 <div class=
"memtemplate">
223 template
<typename CharType, int size = sizeof(CharType)
> </div>
224 <div class=
"memtemplate">
225 template
<typename Iterator
> </div>
226 <table class=
"mlabels">
228 <td class=
"mlabels-left">
229 <table class=
"memname">
231 <td class=
"memname">static Iterator
<a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html">boost::locale::utf::utf_traits
</a>< CharType, size
>::encode
</td>
233 <td class=
"paramtype"><a class=
"el" href=
"namespaceboost_1_1locale_1_1utf.html#a068111a6b9d6d465a63893ed5c05e2f8">code_point
</a> </td>
234 <td class=
"paramname"><em>value
</em>,
</td>
237 <td class=
"paramkey"></td>
239 <td class=
"paramtype">Iterator
 </td>
240 <td class=
"paramname"><em>out
</em> </td>
249 <td class=
"mlabels-right">
250 <span class=
"mlabels"><span class=
"mlabel">static
</span></span> </td>
253 </div><div class=
"memdoc">
254 <p>Convert valid Unicode code point
<em>value
</em> to the UTF sequence.
</p>
257 <li><em>value
</em> is valid code point
</li>
258 <li><em>out
</em> is an output iterator should be able to accept at least width(value) units
</li>
260 <p>Returns the iterator past the last written code unit.
</p>
264 <a class=
"anchor" id=
"a19789c4c26c8d9f576de5272f3d41a11"></a>
265 <div class=
"memitem">
266 <div class=
"memproto">
267 <div class=
"memtemplate">
268 template
<typename CharType, int size = sizeof(CharType)
> </div>
269 <table class=
"mlabels">
271 <td class=
"mlabels-left">
272 <table class=
"memname">
274 <td class=
"memname">static bool
<a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html">boost::locale::utf::utf_traits
</a>< CharType, size
>::is_lead
</td>
276 <td class=
"paramtype"><a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html#accca9dc2d8fe018b9b5640c48e3470e4">char_type
</a> </td>
277 <td class=
"paramname"><em>c
</em></td><td>)
</td>
282 <td class=
"mlabels-right">
283 <span class=
"mlabels"><span class=
"mlabel">static
</span></span> </td>
286 </div><div class=
"memdoc">
287 <p>Returns true if c is lead code unit, always true of UTF-
32 </p>
291 <a class=
"anchor" id=
"ae2cb78fcb8a58bed3e0ce1d6528a719a"></a>
292 <div class=
"memitem">
293 <div class=
"memproto">
294 <div class=
"memtemplate">
295 template
<typename CharType, int size = sizeof(CharType)
> </div>
296 <table class=
"mlabels">
298 <td class=
"mlabels-left">
299 <table class=
"memname">
301 <td class=
"memname">static bool
<a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html">boost::locale::utf::utf_traits
</a>< CharType, size
>::is_trail
</td>
303 <td class=
"paramtype"><a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html#accca9dc2d8fe018b9b5640c48e3470e4">char_type
</a> </td>
304 <td class=
"paramname"><em>c
</em></td><td>)
</td>
309 <td class=
"mlabels-right">
310 <span class=
"mlabels"><span class=
"mlabel">static
</span></span> </td>
313 </div><div class=
"memdoc">
314 <p>Returns true if c is trail code unit, always false for UTF-
32 </p>
318 <a class=
"anchor" id=
"a8a6b72ba87a817652f522018df51a9a7"></a>
319 <div class=
"memitem">
320 <div class=
"memproto">
321 <div class=
"memtemplate">
322 template
<typename CharType, int size = sizeof(CharType)
> </div>
323 <table class=
"mlabels">
325 <td class=
"mlabels-left">
326 <table class=
"memname">
328 <td class=
"memname">static int
<a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html">boost::locale::utf::utf_traits
</a>< CharType, size
>::trail_length
</td>
330 <td class=
"paramtype"><a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html#accca9dc2d8fe018b9b5640c48e3470e4">char_type
</a> </td>
331 <td class=
"paramname"><em>c
</em></td><td>)
</td>
336 <td class=
"mlabels-right">
337 <span class=
"mlabels"><span class=
"mlabel">static
</span></span> </td>
340 </div><div class=
"memdoc">
341 <p>Get the size of the trail part of variable length encoded sequence.
</p>
342 <p>Returns -
1 if C is not valid lead character
</p>
346 <a class=
"anchor" id=
"a26c106ec8816f48431f882017ab46763"></a>
347 <div class=
"memitem">
348 <div class=
"memproto">
349 <div class=
"memtemplate">
350 template
<typename CharType, int size = sizeof(CharType)
> </div>
351 <table class=
"mlabels">
353 <td class=
"mlabels-left">
354 <table class=
"memname">
356 <td class=
"memname">static int
<a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html">boost::locale::utf::utf_traits
</a>< CharType, size
>::width
</td>
358 <td class=
"paramtype"><a class=
"el" href=
"namespaceboost_1_1locale_1_1utf.html#a068111a6b9d6d465a63893ed5c05e2f8">code_point
</a> </td>
359 <td class=
"paramname"><em>value
</em></td><td>)
</td>
364 <td class=
"mlabels-right">
365 <span class=
"mlabels"><span class=
"mlabel">static
</span></span> </td>
368 </div><div class=
"memdoc">
369 <p>The width of specific code point in the code units.
</p>
370 <p>Requirement: value is a valid Unicode code point Returns value in range [
1..max_width]
</p>
374 <h2 class=
"groupheader">Member Data Documentation
</h2>
375 <a class=
"anchor" id=
"abb4cb63a924d19505c2cb6e930c68a13"></a>
376 <div class=
"memitem">
377 <div class=
"memproto">
378 <div class=
"memtemplate">
379 template
<typename CharType, int size = sizeof(CharType)
> </div>
380 <table class=
"mlabels">
382 <td class=
"mlabels-left">
383 <table class=
"memname">
385 <td class=
"memname">const int
<a class=
"el" href=
"structboost_1_1locale_1_1utf_1_1utf__traits.html">boost::locale::utf::utf_traits
</a>< CharType, size
>::max_width
</td>
389 <td class=
"mlabels-right">
390 <span class=
"mlabels"><span class=
"mlabel">static
</span></span> </td>
393 </div><div class=
"memdoc">
394 <p>Maximal width of valid sequence in the code units:
</p>
403 <hr/>The documentation for this struct was generated from the following file:
<ul>
404 <li>boost/locale/
<a class=
"el" href=
"utf_8hpp_source.html">utf.hpp
</a></li>
406 </div><!-- contents -->
407 </div><!-- doc-content -->
410 © Copyright
2009-
2012 Artyom Beilis, Distributed under the
<a href=
"http://www.boost.org/LICENSE_1_0.txt">Boost Software License
</a>, Version
1.0.