248 lines
42 KiB
HTML
248 lines
42 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.6"/>
|
|
<title>Boost.Locale: boost/locale/collator.hpp Source File</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(initResizable);
|
|
$(window).load(resizeHeight);
|
|
</script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectlogo"><img alt="Logo" src="boost-small.png"/></td>
|
|
<td style="padding-left: 0.5em;">
|
|
<div id="projectname">Boost.Locale
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.6 -->
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
|
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
|
<li><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
|
<li><a href="examples.html"><span>Examples</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
</ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){initNavTree('collator_8hpp_source.html','');});
|
|
</script>
|
|
<div id="doc-content">
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">collator.hpp</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">// Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)</span></div>
|
|
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">// Distributed under the Boost Software License, Version 1.0. (See</span></div>
|
|
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// accompanying file LICENSE_1_0.txt or copy at</span></div>
|
|
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">// http://www.boost.org/LICENSE_1_0.txt)</span></div>
|
|
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment">//</span></div>
|
|
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#ifndef BOOST_LOCALE_COLLATOR_HPP_INCLUDED</span></div>
|
|
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="preprocessor"></span><span class="preprocessor">#define BOOST_LOCALE_COLLATOR_HPP_INCLUDED</span></div>
|
|
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="preprocessor"></span></div>
|
|
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="preprocessor">#include <boost/locale/config.hpp></span></div>
|
|
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#ifdef BOOST_MSVC</span></div>
|
|
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor"></span><span class="preprocessor"># pragma warning(push)</span></div>
|
|
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor"></span><span class="preprocessor"># pragma warning(disable : 4275 4251 4231 4660)</span></div>
|
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
|
|
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor"></span><span class="preprocessor">#include <locale></span></div>
|
|
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div>
|
|
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> </div>
|
|
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="keyword">namespace </span>boost {</div>
|
|
<div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="namespaceboost_1_1locale.html"> 20</a></span> <span class="keyword">namespace </span>locale {</div>
|
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div>
|
|
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  <span class="keyword">class </span><a class="code" href="classboost_1_1locale_1_1info.html">info</a>;</div>
|
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> </div>
|
|
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div>
|
|
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div>
|
|
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="classboost_1_1locale_1_1collator__base.html"> 35</a></span>  <span class="keyword">class </span><a class="code" href="classboost_1_1locale_1_1collator__base.html">collator_base</a> {</div>
|
|
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <span class="keyword">public</span>:</div>
|
|
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22"> 40</a></span>  <span class="keyword">typedef</span> <span class="keyword">enum</span> {</div>
|
|
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22ae57e842f398a27ee490208f5af39675b"> 41</a></span>  <a class="code" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22ae57e842f398a27ee490208f5af39675b">primary</a> = 0, </div>
|
|
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22ad8e103443d69f03f00ac4b68a7181866"> 42</a></span>  <a class="code" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22ad8e103443d69f03f00ac4b68a7181866">secondary</a> = 1, </div>
|
|
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22a3a852752e9663b7b3340c435d0cfe36a"> 43</a></span>  <a class="code" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22a3a852752e9663b7b3340c435d0cfe36a">tertiary</a> = 2, </div>
|
|
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22a22ca1875fd63667fbb018df16b0aedba"> 44</a></span>  <a class="code" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22a22ca1875fd63667fbb018df16b0aedba">quaternary</a> = 3, </div>
|
|
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22a3c209055ff840e311581ab43013026f2"> 45</a></span>  <a class="code" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22a3c209055ff840e311581ab43013026f2">identical</a> = 4 </div>
|
|
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  } <a class="code" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22">level_type</a>;</div>
|
|
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  };</div>
|
|
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  </div>
|
|
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="keyword">template</span><<span class="keyword">typename</span> CharType></div>
|
|
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="classboost_1_1locale_1_1collator.html"> 56</a></span>  <span class="keyword">class </span><a class="code" href="classboost_1_1locale_1_1collator.html">collator</a> : </div>
|
|
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keyword">public</span> std::collate<CharType>,</div>
|
|
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="keyword">public</span> <a class="code" href="classboost_1_1locale_1_1collator__base.html">collator_base</a></div>
|
|
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  {</div>
|
|
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="keyword">public</span>:</div>
|
|
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f"> 64</a></span>  <span class="keyword">typedef</span> CharType <a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a>;</div>
|
|
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="classboost_1_1locale_1_1collator.html#a106a3fe9e068530013c428661758733d"> 68</a></span>  <span class="keyword">typedef</span> std::basic_string<CharType> <a class="code" href="classboost_1_1locale_1_1collator.html#a106a3fe9e068530013c428661758733d">string_type</a>;</div>
|
|
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  </div>
|
|
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span> </div>
|
|
<div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="classboost_1_1locale_1_1collator.html#ab90dc7bb909a71d3cd9a5e8d7b2eb80e"> 77</a></span>  <span class="keywordtype">int</span> <a class="code" href="classboost_1_1locale_1_1collator.html#ab90dc7bb909a71d3cd9a5e8d7b2eb80e">compare</a>(<a class="code" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22">level_type</a> level,</div>
|
|
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a> <span class="keyword">const</span> *b1,<a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a> <span class="keyword">const</span> *e1,</div>
|
|
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  <a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a> <span class="keyword">const</span> *b2,<a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a> <span class="keyword">const</span> *e2)<span class="keyword"> const</span></div>
|
|
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> <span class="keyword"> </span>{</div>
|
|
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <span class="keywordflow">return</span> <a class="code" href="classboost_1_1locale_1_1collator.html#ada3a683bed35789e081b710a8e9a9a07">do_compare</a>(level,b1,e1,b2,e2);</div>
|
|
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  }</div>
|
|
<div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="classboost_1_1locale_1_1collator.html#a8dc6443fb193616332ca50f207a9b189"> 94</a></span>  <a class="code" href="classboost_1_1locale_1_1collator.html#a106a3fe9e068530013c428661758733d">string_type</a> <a class="code" href="classboost_1_1locale_1_1collator.html#a8dc6443fb193616332ca50f207a9b189">transform</a>(<a class="code" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22">level_type</a> level,<a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a> <span class="keyword">const</span> *b,<a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a> <span class="keyword">const</span> *e)<span class="keyword"> const</span></div>
|
|
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span> <span class="keyword"> </span>{</div>
|
|
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="keywordflow">return</span> <a class="code" href="classboost_1_1locale_1_1collator.html#a84b5cb6ff01cf1a1330e1556a2c674d5">do_transform</a>(level,b,e);</div>
|
|
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  }</div>
|
|
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span> </div>
|
|
<div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="classboost_1_1locale_1_1collator.html#a89752e2023643f972b6cc8024340d5d4"> 106</a></span>  <span class="keywordtype">long</span> <a class="code" href="classboost_1_1locale_1_1collator.html#a89752e2023643f972b6cc8024340d5d4">hash</a>(<a class="code" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22">level_type</a> level,<a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a> <span class="keyword">const</span> *b,<a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a> <span class="keyword">const</span> *e)<span class="keyword"> const</span></div>
|
|
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> <span class="keyword"> </span>{</div>
|
|
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <span class="keywordflow">return</span> <a class="code" href="classboost_1_1locale_1_1collator.html#aa093cd4ed0b4be4a5e38f0f04a56ac0b">do_hash</a>(level,b,e);</div>
|
|
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  }</div>
|
|
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> </div>
|
|
<div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="classboost_1_1locale_1_1collator.html#a9ccdfec693cdc5a71b5adc1f083881bf"> 118</a></span>  <span class="keywordtype">int</span> <a class="code" href="classboost_1_1locale_1_1collator.html#a9ccdfec693cdc5a71b5adc1f083881bf">compare</a>(<a class="code" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22">level_type</a> level,<a class="code" href="classboost_1_1locale_1_1collator.html#a106a3fe9e068530013c428661758733d">string_type</a> <span class="keyword">const</span> &l,<a class="code" href="classboost_1_1locale_1_1collator.html#a106a3fe9e068530013c428661758733d">string_type</a> <span class="keyword">const</span> &r)<span class="keyword"> const</span></div>
|
|
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="keyword"> </span>{</div>
|
|
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <span class="keywordflow">return</span> <a class="code" href="classboost_1_1locale_1_1collator.html#ada3a683bed35789e081b710a8e9a9a07">do_compare</a>(level,l.data(),l.data()+l.size(),r.data(),r.data()+r.size());</div>
|
|
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  }</div>
|
|
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span> </div>
|
|
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span> </div>
|
|
<div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="classboost_1_1locale_1_1collator.html#a76000f6cf10bfe63dd7fd10652de3f5b"> 129</a></span>  <span class="keywordtype">long</span> <a class="code" href="classboost_1_1locale_1_1collator.html#a76000f6cf10bfe63dd7fd10652de3f5b">hash</a>(<a class="code" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22">level_type</a> level,<a class="code" href="classboost_1_1locale_1_1collator.html#a106a3fe9e068530013c428661758733d">string_type</a> <span class="keyword">const</span> &s)<span class="keyword"> const</span></div>
|
|
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span> <span class="keyword"> </span>{</div>
|
|
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="keywordflow">return</span> <a class="code" href="classboost_1_1locale_1_1collator.html#aa093cd4ed0b4be4a5e38f0f04a56ac0b">do_hash</a>(level,s.data(),s.data()+s.size());</div>
|
|
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  }</div>
|
|
<div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="classboost_1_1locale_1_1collator.html#aa9976b4fa0fba6c5d1a1dea9b5ef02ca"> 142</a></span>  <a class="code" href="classboost_1_1locale_1_1collator.html#a106a3fe9e068530013c428661758733d">string_type</a> <a class="code" href="classboost_1_1locale_1_1collator.html#aa9976b4fa0fba6c5d1a1dea9b5ef02ca">transform</a>(<a class="code" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22">level_type</a> level,<a class="code" href="classboost_1_1locale_1_1collator.html#a106a3fe9e068530013c428661758733d">string_type</a> <span class="keyword">const</span> &s)<span class="keyword"> const</span></div>
|
|
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span> <span class="keyword"> </span>{</div>
|
|
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="keywordflow">return</span> <a class="code" href="classboost_1_1locale_1_1collator.html#a84b5cb6ff01cf1a1330e1556a2c674d5">do_transform</a>(level,s.data(),s.data()+s.size());</div>
|
|
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  }</div>
|
|
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  </div>
|
|
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <span class="keyword">protected</span>:</div>
|
|
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span> </div>
|
|
<div class="line"><a name="l00152"></a><span class="lineno"><a class="line" href="classboost_1_1locale_1_1collator.html#a25a8b21a756756e850a7488a54610053"> 152</a></span>  <a class="code" href="classboost_1_1locale_1_1collator.html#a25a8b21a756756e850a7488a54610053">collator</a>(<span class="keywordtype">size_t</span> refs = 0) : std::collate<CharType>(refs) </div>
|
|
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  {</div>
|
|
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  }</div>
|
|
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span> </div>
|
|
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <span class="keyword">virtual</span> ~<a class="code" href="classboost_1_1locale_1_1collator.html">collator</a>()</div>
|
|
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  {</div>
|
|
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  }</div>
|
|
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  </div>
|
|
<div class="line"><a name="l00164"></a><span class="lineno"><a class="line" href="classboost_1_1locale_1_1collator.html#ada3a683bed35789e081b710a8e9a9a07"> 164</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classboost_1_1locale_1_1collator.html#ada3a683bed35789e081b710a8e9a9a07">do_compare</a>( <a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a> <span class="keyword">const</span> *b1,<a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a> <span class="keyword">const</span> *e1,</div>
|
|
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a> <span class="keyword">const</span> *b2,<a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a> <span class="keyword">const</span> *e2)<span class="keyword"> const</span></div>
|
|
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span> <span class="keyword"> </span>{</div>
|
|
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  <span class="keywordflow">return</span> <a class="code" href="classboost_1_1locale_1_1collator.html#ada3a683bed35789e081b710a8e9a9a07">do_compare</a>(<a class="code" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22a3c209055ff840e311581ab43013026f2">identical</a>,b1,e1,b2,e2);</div>
|
|
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  }</div>
|
|
<div class="line"><a name="l00173"></a><span class="lineno"><a class="line" href="classboost_1_1locale_1_1collator.html#a84b5cb6ff01cf1a1330e1556a2c674d5"> 173</a></span>  <span class="keyword">virtual</span> <a class="code" href="classboost_1_1locale_1_1collator.html#a106a3fe9e068530013c428661758733d">string_type</a> <a class="code" href="classboost_1_1locale_1_1collator.html#a84b5cb6ff01cf1a1330e1556a2c674d5">do_transform</a>(<a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a> <span class="keyword">const</span> *b,<a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a> <span class="keyword">const</span> *e)<span class="keyword"> const</span></div>
|
|
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span> <span class="keyword"> </span>{</div>
|
|
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <span class="keywordflow">return</span> <a class="code" href="classboost_1_1locale_1_1collator.html#a84b5cb6ff01cf1a1330e1556a2c674d5">do_transform</a>(<a class="code" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22a3c209055ff840e311581ab43013026f2">identical</a>,b,e);</div>
|
|
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  }</div>
|
|
<div class="line"><a name="l00181"></a><span class="lineno"><a class="line" href="classboost_1_1locale_1_1collator.html#aa093cd4ed0b4be4a5e38f0f04a56ac0b"> 181</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="classboost_1_1locale_1_1collator.html#aa093cd4ed0b4be4a5e38f0f04a56ac0b">do_hash</a>(<a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a> <span class="keyword">const</span> *b,<a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a> <span class="keyword">const</span> *e)<span class="keyword"> const</span></div>
|
|
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span> <span class="keyword"> </span>{</div>
|
|
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  <span class="keywordflow">return</span> <a class="code" href="classboost_1_1locale_1_1collator.html#aa093cd4ed0b4be4a5e38f0f04a56ac0b">do_hash</a>(<a class="code" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22a3c209055ff840e311581ab43013026f2">identical</a>,b,e);</div>
|
|
<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  }</div>
|
|
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span> </div>
|
|
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classboost_1_1locale_1_1collator.html#ada3a683bed35789e081b710a8e9a9a07">do_compare</a>( <a class="code" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22">level_type</a> level,</div>
|
|
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a> <span class="keyword">const</span> *b1,<a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a> <span class="keyword">const</span> *e1,</div>
|
|
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a> <span class="keyword">const</span> *b2,<a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a> <span class="keyword">const</span> *e2) <span class="keyword">const</span> = 0;</div>
|
|
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <span class="keyword">virtual</span> <a class="code" href="classboost_1_1locale_1_1collator.html#a106a3fe9e068530013c428661758733d">string_type</a> <a class="code" href="classboost_1_1locale_1_1collator.html#a84b5cb6ff01cf1a1330e1556a2c674d5">do_transform</a>(<a class="code" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22">level_type</a> level,<a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a> <span class="keyword">const</span> *b,<a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a> <span class="keyword">const</span> *e) <span class="keyword">const</span> = 0;</div>
|
|
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="classboost_1_1locale_1_1collator.html#aa093cd4ed0b4be4a5e38f0f04a56ac0b">do_hash</a>(<a class="code" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22">level_type</a> level,<a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a> <span class="keyword">const</span> *b,<a class="code" href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">char_type</a> <span class="keyword">const</span> *e) <span class="keyword">const</span> = 0;</div>
|
|
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span> </div>
|
|
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span> </div>
|
|
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  };</div>
|
|
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span> </div>
|
|
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <span class="keyword">template</span><<span class="keyword">typename</span> CharType,collator_base::level_type default_level = collator_base::<span class="keywordtype">id</span>entical></div>
|
|
<div class="line"><a name="l00217"></a><span class="lineno"><a class="line" href="structboost_1_1locale_1_1comparator.html"> 217</a></span>  <span class="keyword">struct </span><a class="code" href="structboost_1_1locale_1_1comparator.html">comparator</a></div>
|
|
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  {</div>
|
|
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <span class="keyword">public</span>:</div>
|
|
<div class="line"><a name="l00225"></a><span class="lineno"><a class="line" href="structboost_1_1locale_1_1comparator.html#af40ee48c6c93b6e5d91492a3e0cb96a8"> 225</a></span>  <a class="code" href="structboost_1_1locale_1_1comparator.html#af40ee48c6c93b6e5d91492a3e0cb96a8">comparator</a>(std::locale <span class="keyword">const</span> &l=std::locale(),<a class="code" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22">collator_base::level_type</a> level=default_level) : </div>
|
|
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  locale_(l),</div>
|
|
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  level_(level)</div>
|
|
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  {</div>
|
|
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  }</div>
|
|
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span> </div>
|
|
<div class="line"><a name="l00234"></a><span class="lineno"><a class="line" href="structboost_1_1locale_1_1comparator.html#abd62dbc2af0eb6e6c261a7c88e09f752"> 234</a></span>  <span class="keywordtype">bool</span> <a class="code" href="structboost_1_1locale_1_1comparator.html#abd62dbc2af0eb6e6c261a7c88e09f752">operator()</a>(std::basic_string<CharType> <span class="keyword">const</span> &left,std::basic_string<CharType> <span class="keyword">const</span> &right)<span class="keyword"> const</span></div>
|
|
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span> <span class="keyword"> </span>{</div>
|
|
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  <span class="keywordflow">return</span> std::use_facet<collator<CharType> >(locale_).compare(level_,left,right) < 0;</div>
|
|
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  }</div>
|
|
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  <span class="keyword">private</span>:</div>
|
|
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  std::locale locale_;</div>
|
|
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  <a class="code" href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22">collator_base::level_type</a> level_;</div>
|
|
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  };</div>
|
|
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span> </div>
|
|
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span> </div>
|
|
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span> </div>
|
|
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  } <span class="comment">// locale</span></div>
|
|
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span> } <span class="comment">// boost</span></div>
|
|
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span> </div>
|
|
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span> <span class="preprocessor">#ifdef BOOST_MSVC</span></div>
|
|
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span> <span class="preprocessor"></span><span class="preprocessor">#pragma warning(pop)</span></div>
|
|
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span> <span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
|
|
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span> <span class="preprocessor"></span></div>
|
|
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span> </div>
|
|
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span> <span class="preprocessor">#endif</span></div>
|
|
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span> <span class="preprocessor"></span><span class="comment">// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4</span></div>
|
|
<div class="ttc" id="classboost_1_1locale_1_1info_html"><div class="ttname"><a href="classboost_1_1locale_1_1info.html">boost::locale::info</a></div><div class="ttdoc">a facet that holds general information about locale </div><div class="ttdef"><b>Definition:</b> info.hpp:27</div></div>
|
|
<div class="ttc" id="classboost_1_1locale_1_1collator__base_html_a73c12de809733273304fef7f0af28b22ae57e842f398a27ee490208f5af39675b"><div class="ttname"><a href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22ae57e842f398a27ee490208f5af39675b">boost::locale::collator_base::primary</a></div><div class="ttdoc">1st collation level: base letters </div><div class="ttdef"><b>Definition:</b> collator.hpp:41</div></div>
|
|
<div class="ttc" id="classboost_1_1locale_1_1collator__base_html_a73c12de809733273304fef7f0af28b22ad8e103443d69f03f00ac4b68a7181866"><div class="ttname"><a href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22ad8e103443d69f03f00ac4b68a7181866">boost::locale::collator_base::secondary</a></div><div class="ttdoc">2nd collation level: letters and accents </div><div class="ttdef"><b>Definition:</b> collator.hpp:42</div></div>
|
|
<div class="ttc" id="classboost_1_1locale_1_1collator_html_ada3a683bed35789e081b710a8e9a9a07"><div class="ttname"><a href="classboost_1_1locale_1_1collator.html#ada3a683bed35789e081b710a8e9a9a07">boost::locale::collator::do_compare</a></div><div class="ttdeci">virtual int do_compare(char_type const *b1, char_type const *e1, char_type const *b2, char_type const *e2) const </div><div class="ttdef"><b>Definition:</b> collator.hpp:164</div></div>
|
|
<div class="ttc" id="classboost_1_1locale_1_1collator__base_html_a73c12de809733273304fef7f0af28b22"><div class="ttname"><a href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22">boost::locale::collator_base::level_type</a></div><div class="ttdeci">level_type</div><div class="ttdef"><b>Definition:</b> collator.hpp:40</div></div>
|
|
<div class="ttc" id="classboost_1_1locale_1_1collator_html_a2b74a0b9a613a4a4337632bf34644c6f"><div class="ttname"><a href="classboost_1_1locale_1_1collator.html#a2b74a0b9a613a4a4337632bf34644c6f">boost::locale::collator::char_type</a></div><div class="ttdeci">CharType char_type</div><div class="ttdef"><b>Definition:</b> collator.hpp:64</div></div>
|
|
<div class="ttc" id="classboost_1_1locale_1_1collator__base_html_a73c12de809733273304fef7f0af28b22a3c209055ff840e311581ab43013026f2"><div class="ttname"><a href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22a3c209055ff840e311581ab43013026f2">boost::locale::collator_base::identical</a></div><div class="ttdoc">identical collation level: include code-point comparison </div><div class="ttdef"><b>Definition:</b> collator.hpp:45</div></div>
|
|
<div class="ttc" id="classboost_1_1locale_1_1collator_html_a89752e2023643f972b6cc8024340d5d4"><div class="ttname"><a href="classboost_1_1locale_1_1collator.html#a89752e2023643f972b6cc8024340d5d4">boost::locale::collator::hash</a></div><div class="ttdeci">long hash(level_type level, char_type const *b, char_type const *e) const </div><div class="ttdef"><b>Definition:</b> collator.hpp:106</div></div>
|
|
<div class="ttc" id="classboost_1_1locale_1_1collator_html_ab90dc7bb909a71d3cd9a5e8d7b2eb80e"><div class="ttname"><a href="classboost_1_1locale_1_1collator.html#ab90dc7bb909a71d3cd9a5e8d7b2eb80e">boost::locale::collator::compare</a></div><div class="ttdeci">int compare(level_type level, char_type const *b1, char_type const *e1, char_type const *b2, char_type const *e2) const </div><div class="ttdef"><b>Definition:</b> collator.hpp:77</div></div>
|
|
<div class="ttc" id="classboost_1_1locale_1_1collator_html_a106a3fe9e068530013c428661758733d"><div class="ttname"><a href="classboost_1_1locale_1_1collator.html#a106a3fe9e068530013c428661758733d">boost::locale::collator::string_type</a></div><div class="ttdeci">std::basic_string< CharType > string_type</div><div class="ttdef"><b>Definition:</b> collator.hpp:68</div></div>
|
|
<div class="ttc" id="classboost_1_1locale_1_1collator__base_html"><div class="ttname"><a href="classboost_1_1locale_1_1collator__base.html">boost::locale::collator_base</a></div><div class="ttdoc">a base class that includes collation level flags </div><div class="ttdef"><b>Definition:</b> collator.hpp:35</div></div>
|
|
<div class="ttc" id="classboost_1_1locale_1_1collator_html_a25a8b21a756756e850a7488a54610053"><div class="ttname"><a href="classboost_1_1locale_1_1collator.html#a25a8b21a756756e850a7488a54610053">boost::locale::collator::collator</a></div><div class="ttdeci">collator(size_t refs=0)</div><div class="ttdef"><b>Definition:</b> collator.hpp:152</div></div>
|
|
<div class="ttc" id="classboost_1_1locale_1_1collator_html_a84b5cb6ff01cf1a1330e1556a2c674d5"><div class="ttname"><a href="classboost_1_1locale_1_1collator.html#a84b5cb6ff01cf1a1330e1556a2c674d5">boost::locale::collator::do_transform</a></div><div class="ttdeci">virtual string_type do_transform(char_type const *b, char_type const *e) const </div><div class="ttdef"><b>Definition:</b> collator.hpp:173</div></div>
|
|
<div class="ttc" id="classboost_1_1locale_1_1collator_html_a76000f6cf10bfe63dd7fd10652de3f5b"><div class="ttname"><a href="classboost_1_1locale_1_1collator.html#a76000f6cf10bfe63dd7fd10652de3f5b">boost::locale::collator::hash</a></div><div class="ttdeci">long hash(level_type level, string_type const &s) const </div><div class="ttdef"><b>Definition:</b> collator.hpp:129</div></div>
|
|
<div class="ttc" id="classboost_1_1locale_1_1collator_html_a9ccdfec693cdc5a71b5adc1f083881bf"><div class="ttname"><a href="classboost_1_1locale_1_1collator.html#a9ccdfec693cdc5a71b5adc1f083881bf">boost::locale::collator::compare</a></div><div class="ttdeci">int compare(level_type level, string_type const &l, string_type const &r) const </div><div class="ttdef"><b>Definition:</b> collator.hpp:118</div></div>
|
|
<div class="ttc" id="classboost_1_1locale_1_1collator_html_a8dc6443fb193616332ca50f207a9b189"><div class="ttname"><a href="classboost_1_1locale_1_1collator.html#a8dc6443fb193616332ca50f207a9b189">boost::locale::collator::transform</a></div><div class="ttdeci">string_type transform(level_type level, char_type const *b, char_type const *e) const </div><div class="ttdef"><b>Definition:</b> collator.hpp:94</div></div>
|
|
<div class="ttc" id="structboost_1_1locale_1_1comparator_html_abd62dbc2af0eb6e6c261a7c88e09f752"><div class="ttname"><a href="structboost_1_1locale_1_1comparator.html#abd62dbc2af0eb6e6c261a7c88e09f752">boost::locale::comparator::operator()</a></div><div class="ttdeci">bool operator()(std::basic_string< CharType > const &left, std::basic_string< CharType > const &right) const </div><div class="ttdef"><b>Definition:</b> collator.hpp:234</div></div>
|
|
<div class="ttc" id="classboost_1_1locale_1_1collator__base_html_a73c12de809733273304fef7f0af28b22a22ca1875fd63667fbb018df16b0aedba"><div class="ttname"><a href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22a22ca1875fd63667fbb018df16b0aedba">boost::locale::collator_base::quaternary</a></div><div class="ttdoc">4th collation level: letters, accents, case and punctuation </div><div class="ttdef"><b>Definition:</b> collator.hpp:44</div></div>
|
|
<div class="ttc" id="classboost_1_1locale_1_1collator_html"><div class="ttname"><a href="classboost_1_1locale_1_1collator.html">boost::locale::collator</a></div><div class="ttdoc">Collation facet. </div><div class="ttdef"><b>Definition:</b> collator.hpp:56</div></div>
|
|
<div class="ttc" id="classboost_1_1locale_1_1collator_html_aa9976b4fa0fba6c5d1a1dea9b5ef02ca"><div class="ttname"><a href="classboost_1_1locale_1_1collator.html#aa9976b4fa0fba6c5d1a1dea9b5ef02ca">boost::locale::collator::transform</a></div><div class="ttdeci">string_type transform(level_type level, string_type const &s) const </div><div class="ttdef"><b>Definition:</b> collator.hpp:142</div></div>
|
|
<div class="ttc" id="classboost_1_1locale_1_1collator_html_aa093cd4ed0b4be4a5e38f0f04a56ac0b"><div class="ttname"><a href="classboost_1_1locale_1_1collator.html#aa093cd4ed0b4be4a5e38f0f04a56ac0b">boost::locale::collator::do_hash</a></div><div class="ttdeci">virtual long do_hash(char_type const *b, char_type const *e) const </div><div class="ttdef"><b>Definition:</b> collator.hpp:181</div></div>
|
|
<div class="ttc" id="classboost_1_1locale_1_1collator__base_html_a73c12de809733273304fef7f0af28b22a3a852752e9663b7b3340c435d0cfe36a"><div class="ttname"><a href="classboost_1_1locale_1_1collator__base.html#a73c12de809733273304fef7f0af28b22a3a852752e9663b7b3340c435d0cfe36a">boost::locale::collator_base::tertiary</a></div><div class="ttdoc">3rd collation level: letters, accents and case </div><div class="ttdef"><b>Definition:</b> collator.hpp:43</div></div>
|
|
<div class="ttc" id="structboost_1_1locale_1_1comparator_html_af40ee48c6c93b6e5d91492a3e0cb96a8"><div class="ttname"><a href="structboost_1_1locale_1_1comparator.html#af40ee48c6c93b6e5d91492a3e0cb96a8">boost::locale::comparator::comparator</a></div><div class="ttdeci">comparator(std::locale const &l=std::locale(), collator_base::level_type level=default_level)</div><div class="ttdef"><b>Definition:</b> collator.hpp:225</div></div>
|
|
<div class="ttc" id="structboost_1_1locale_1_1comparator_html"><div class="ttname"><a href="structboost_1_1locale_1_1comparator.html">boost::locale::comparator</a></div><div class="ttdoc">This class can be used in STL algorithms and containers for comparison of strings with a level other ...</div><div class="ttdef"><b>Definition:</b> collator.hpp:217</div></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
|
|
<li class="footer">
|
|
© 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.
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|