UNPKG

boost-react-native-bundle

Version:

Boost library as in https://sourceforge.net/projects/boost/files/boost/1.57.0/

207 lines (189 loc) 20.5 kB
<!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"/> <title>Boost.Locale: boost/locale/boundary/boundary_point.hpp Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css" /> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> $(document).ready(initResizable); </script> </head> <body> <div id="top"><!-- do not remove this div! --> <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> <!-- Generated by Doxygen 1.7.6.1 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</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&#160;List</span></a></li> </ul> </div> </div> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> initNavTree('boundary__point_8hpp.html',''); </script> <div id="doc-content"> <div class="header"> <div class="headertitle"> <div class="title">boost/locale/boundary/boundary_point.hpp</div> </div> </div><!--header--> <div class="contents"> <div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//</span> <a name="l00002"></a>00002 <span class="comment">// Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)</span> <a name="l00003"></a>00003 <span class="comment">//</span> <a name="l00004"></a>00004 <span class="comment">// Distributed under the Boost Software License, Version 1.0. (See</span> <a name="l00005"></a>00005 <span class="comment">// accompanying file LICENSE_1_0.txt or copy at</span> <a name="l00006"></a>00006 <span class="comment">// http://www.boost.org/LICENSE_1_0.txt)</span> <a name="l00007"></a>00007 <span class="comment">//</span> <a name="l00008"></a>00008 <span class="preprocessor">#ifndef BOOST_LOCALE_BOUNDARY_BOUNDARY_POINT_HPP_INCLUDED</span> <a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define BOOST_LOCALE_BOUNDARY_BOUNDARY_POINT_HPP_INCLUDED</span> <a name="l00010"></a>00010 <span class="preprocessor"></span> <a name="l00011"></a>00011 <span class="preprocessor">#include &lt;boost/locale/boundary/types.hpp&gt;</span> <a name="l00012"></a>00012 <a name="l00013"></a>00013 <span class="keyword">namespace </span>boost { <a name="l00014"></a>00014 <span class="keyword">namespace </span>locale { <a name="l00015"></a><a class="code" href="namespaceboost_1_1locale_1_1boundary.html">00015</a> <span class="keyword">namespace </span>boundary { <a name="l00016"></a>00016 <a name="l00020"></a>00020 <a name="l00047"></a>00047 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> IteratorType&gt; <a name="l00048"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html">00048</a> <span class="keyword">class </span><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point</a> { <a name="l00049"></a>00049 <span class="keyword">public</span>: <a name="l00053"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">00053</a> <span class="keyword">typedef</span> IteratorType <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a>; <a name="l00054"></a>00054 <a name="l00058"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#aabbbee60c2c97ffd95210206a86c9298">00058</a> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#aabbbee60c2c97ffd95210206a86c9298">boundary_point</a>() : rule_(0) {} <a name="l00059"></a>00059 <a name="l00063"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a653a1c0d7480006ff647a656c74521df">00063</a> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#aabbbee60c2c97ffd95210206a86c9298">boundary_point</a>(<a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a> p,<a class="code" href="group__boundary.html#ga25e193c81052ef1795f1b53b46bc2095" title="Flags used with word boundary analysis -- the type of the word, line or sentence boundary found...">rule_type</a> r) : <a name="l00064"></a>00064 iterator_(p), <a name="l00065"></a>00065 rule_(r) <a name="l00066"></a>00066 { <a name="l00067"></a>00067 } <a name="l00071"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a5ea18137618a1a84ff0b75c3b166c495">00071</a> <span class="keywordtype">void</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af279d5382e1b28c2ce82035c1929ea66">iterator</a>(<a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a> i) <a name="l00072"></a>00072 { <a name="l00073"></a>00073 iterator_ = i; <a name="l00074"></a>00074 } <a name="l00078"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a757b28e11c66f9871d3f51fe93a51bdb">00078</a> <span class="keywordtype">void</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a75e2f04f0f7c1065470f722d1f2e004b">rule</a>(<a class="code" href="group__boundary.html#ga25e193c81052ef1795f1b53b46bc2095" title="Flags used with word boundary analysis -- the type of the word, line or sentence boundary found...">rule_type</a> r) <a name="l00079"></a>00079 { <a name="l00080"></a>00080 rule_ = r; <a name="l00081"></a>00081 } <a name="l00085"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af279d5382e1b28c2ce82035c1929ea66">00085</a> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af279d5382e1b28c2ce82035c1929ea66">iterator</a>()<span class="keyword"> const </span> <a name="l00086"></a>00086 <span class="keyword"> </span>{ <a name="l00087"></a>00087 <span class="keywordflow">return</span> iterator_; <a name="l00088"></a>00088 } <a name="l00092"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a75e2f04f0f7c1065470f722d1f2e004b">00092</a> <a class="code" href="group__boundary.html#ga25e193c81052ef1795f1b53b46bc2095" title="Flags used with word boundary analysis -- the type of the word, line or sentence boundary found...">rule_type</a> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a75e2f04f0f7c1065470f722d1f2e004b">rule</a>()<span class="keyword"> const</span> <a name="l00093"></a>00093 <span class="keyword"> </span>{ <a name="l00094"></a>00094 <span class="keywordflow">return</span> rule_; <a name="l00095"></a>00095 } <a name="l00099"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a058ffbcbd43fc41a40a4a1cf5be987f2">00099</a> <span class="keywordtype">bool</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a058ffbcbd43fc41a40a4a1cf5be987f2">operator==</a>(<a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point</a> <span class="keyword">const</span> &amp;other)<span class="keyword"> const</span> <a name="l00100"></a>00100 <span class="keyword"> </span>{ <a name="l00101"></a>00101 <span class="keywordflow">return</span> iterator_ == other.iterator_ &amp;&amp; rule_ = other.rule_; <a name="l00102"></a>00102 } <a name="l00106"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a4347b22dd7edb8af49d1316a6f86d0c2">00106</a> <span class="keywordtype">bool</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a4347b22dd7edb8af49d1316a6f86d0c2">operator!=</a>(<a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point</a> <span class="keyword">const</span> &amp;other)<span class="keyword"> const</span> <a name="l00107"></a>00107 <span class="keyword"> </span>{ <a name="l00108"></a>00108 <span class="keywordflow">return</span> !(*<span class="keyword">this</span>==other); <a name="l00109"></a>00109 } <a name="l00113"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a87a96a1745184ff7495db87943aca424">00113</a> <span class="keywordtype">bool</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a058ffbcbd43fc41a40a4a1cf5be987f2">operator==</a>(<a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a> <span class="keyword">const</span> &amp;other)<span class="keyword"> const</span> <a name="l00114"></a>00114 <span class="keyword"> </span>{ <a name="l00115"></a>00115 <span class="keywordflow">return</span> iterator_ == other; <a name="l00116"></a>00116 } <a name="l00120"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a4cd03f39d75bb054be9a0ae23189fa7a">00120</a> <span class="keywordtype">bool</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#a4347b22dd7edb8af49d1316a6f86d0c2">operator!=</a>(<a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a> <span class="keyword">const</span> &amp;other)<span class="keyword"> const</span> <a name="l00121"></a>00121 <span class="keyword"> </span>{ <a name="l00122"></a>00122 <span class="keywordflow">return</span> iterator_ != other; <a name="l00123"></a>00123 } <a name="l00124"></a>00124 <a name="l00128"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#aa2dc88b4d02151aea939a01b7fc88730">00128</a> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#aa2dc88b4d02151aea939a01b7fc88730">operator iterator_type </a>()<span class="keyword">const</span> <a name="l00129"></a>00129 <span class="keyword"> </span>{ <a name="l00130"></a>00130 <span class="keywordflow">return</span> iterator_; <a name="l00131"></a>00131 } <a name="l00132"></a>00132 <a name="l00133"></a>00133 <span class="keyword">private</span>: <a name="l00134"></a>00134 <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a> iterator_; <a name="l00135"></a>00135 <a class="code" href="group__boundary.html#ga25e193c81052ef1795f1b53b46bc2095" title="Flags used with word boundary analysis -- the type of the word, line or sentence boundary found...">rule_type</a> rule_; <a name="l00136"></a>00136 <a name="l00137"></a>00137 }; <a name="l00141"></a>00141 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> BaseIterator&gt; <a name="l00142"></a><a class="code" href="group__boundary.html#ga47bc5ece5c461aa4c538354a9e80a707">00142</a> <span class="keywordtype">bool</span> <a class="code" href="group__boundary.html#ga47bc5ece5c461aa4c538354a9e80a707">operator==</a>(BaseIterator <span class="keyword">const</span> &amp;l,<a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point&lt;BaseIterator&gt;</a> <span class="keyword">const</span> &amp;r) <a name="l00143"></a>00143 { <a name="l00144"></a>00144 <span class="keywordflow">return</span> r==l; <a name="l00145"></a>00145 } <a name="l00149"></a>00149 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> BaseIterator&gt; <a name="l00150"></a><a class="code" href="group__boundary.html#gab92086846a31a6826c00a3df90027f0f">00150</a> <span class="keywordtype">bool</span> <a class="code" href="group__boundary.html#gab92086846a31a6826c00a3df90027f0f">operator!=</a>(BaseIterator <span class="keyword">const</span> &amp;l,<a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point&lt;BaseIterator&gt;</a> <span class="keyword">const</span> &amp;r) <a name="l00151"></a>00151 { <a name="l00152"></a>00152 <span class="keywordflow">return</span> r!=l; <a name="l00153"></a>00153 } <a name="l00154"></a>00154 <a name="l00156"></a>00156 <a name="l00157"></a><a class="code" href="namespaceboost_1_1locale_1_1boundary.html#ae8869288e9cc33aa283078654ef0dae2">00157</a> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point&lt;std::string::const_iterator&gt;</a> <a class="code" href="namespaceboost_1_1locale_1_1boundary.html#ae8869288e9cc33aa283078654ef0dae2" title="convenience typedef">sboundary_point</a>; <a name="l00158"></a><a class="code" href="namespaceboost_1_1locale_1_1boundary.html#a7828f6884b8a654b9b14fc1ab96ce0d9">00158</a> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point&lt;std::wstring::const_iterator&gt;</a> <a class="code" href="namespaceboost_1_1locale_1_1boundary.html#a7828f6884b8a654b9b14fc1ab96ce0d9" title="convenience typedef">wsboundary_point</a>; <a name="l00159"></a>00159 <span class="preprocessor"> #ifdef BOOST_HAS_CHAR16_T</span> <a name="l00160"></a><a class="code" href="namespaceboost_1_1locale_1_1boundary.html#a64be9f4ec7ff991f73fc793a80f1fadc">00160</a> <span class="preprocessor"></span> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point&lt;std::u16string::const_iterator&gt;</a> <a class="code" href="namespaceboost_1_1locale_1_1boundary.html#a64be9f4ec7ff991f73fc793a80f1fadc" title="convenience typedef">u16sboundary_point</a>; <a name="l00161"></a>00161 <span class="preprocessor"> #endif</span> <a name="l00162"></a>00162 <span class="preprocessor"></span><span class="preprocessor"> #ifdef BOOST_HAS_CHAR32_T</span> <a name="l00163"></a><a class="code" href="namespaceboost_1_1locale_1_1boundary.html#a9eb3d6aa912102a115dc6ff80fe9c22d">00163</a> <span class="preprocessor"></span> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point&lt;std::u32string::const_iterator&gt;</a> <a class="code" href="namespaceboost_1_1locale_1_1boundary.html#a9eb3d6aa912102a115dc6ff80fe9c22d" title="convenience typedef">u32sboundary_point</a>; <a name="l00164"></a>00164 <span class="preprocessor"> #endif</span> <a name="l00165"></a>00165 <span class="preprocessor"></span> <a name="l00166"></a><a class="code" href="namespaceboost_1_1locale_1_1boundary.html#ade880ec8623692375afbfd460d28163c">00166</a> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point&lt;char const *&gt;</a> <a class="code" href="namespaceboost_1_1locale_1_1boundary.html#ade880ec8623692375afbfd460d28163c" title="convenience typedef">cboundary_point</a>; <a name="l00167"></a><a class="code" href="namespaceboost_1_1locale_1_1boundary.html#a1c06a716653700b74922e4cc9df0da1b">00167</a> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point&lt;wchar_t const *&gt;</a> <a class="code" href="namespaceboost_1_1locale_1_1boundary.html#a1c06a716653700b74922e4cc9df0da1b" title="convenience typedef">wcboundary_point</a>; <a name="l00168"></a>00168 <span class="preprocessor"> #ifdef BOOST_HAS_CHAR16_T</span> <a name="l00169"></a><a class="code" href="namespaceboost_1_1locale_1_1boundary.html#a79a665091fadab07227c0b129ddcde9d">00169</a> <span class="preprocessor"></span> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point&lt;char16_t const *&gt;</a> <a class="code" href="namespaceboost_1_1locale_1_1boundary.html#a79a665091fadab07227c0b129ddcde9d" title="convenience typedef">u16cboundary_point</a>; <a name="l00170"></a>00170 <span class="preprocessor"> #endif</span> <a name="l00171"></a>00171 <span class="preprocessor"></span><span class="preprocessor"> #ifdef BOOST_HAS_CHAR32_T</span> <a name="l00172"></a><a class="code" href="namespaceboost_1_1locale_1_1boundary.html#aaa106d43f8b06fec14964e19c55356fb">00172</a> <span class="preprocessor"></span> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html" title="This class represents a boundary point in the text.">boundary_point&lt;char32_t const *&gt;</a> <a class="code" href="namespaceboost_1_1locale_1_1boundary.html#aaa106d43f8b06fec14964e19c55356fb" title="convenience typedef">u32cboundary_point</a>; <a name="l00173"></a>00173 <span class="preprocessor"> #endif</span> <a name="l00174"></a>00174 <span class="preprocessor"></span> <a name="l00175"></a>00175 <a name="l00176"></a>00176 } <span class="comment">// boundary</span> <a name="l00177"></a>00177 } <span class="comment">// locale</span> <a name="l00178"></a>00178 } <span class="comment">// boost</span> <a name="l00179"></a>00179 <a name="l00180"></a>00180 <a name="l00181"></a>00181 <span class="preprocessor">#endif</span> <a name="l00182"></a>00182 <span class="preprocessor"></span> <a name="l00183"></a>00183 <span class="comment">// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4</span> </pre></div></div><!-- contents --> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><b>boundary_point.hpp</b> </li> <li class="footer"> &copy; 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>