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 <title>Boost.Locale: boost/locale/boundary/boundary_point.hpp Source File</title>
8 <link href="tabs.css" rel="stylesheet" type="text/css"/>
9 <link href="doxygen.css" rel="stylesheet" type="text/css" />
10 <link href="navtree.css" rel="stylesheet" type="text/css"/>
11 <script type="text/javascript" src="jquery.js"></script>
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);
21 <div id="top"><!-- do not remove this div! -->
25 <table cellspacing="0" cellpadding="0">
27 <tr style="height: 56px;">
29 <td id="projectlogo"><img alt="Logo" src="boost-small.png"/></td>
32 <td style="padding-left: 0.5em;">
33 <div id="projectname">Boost.Locale
46 <!-- Generated by Doxygen 1.7.6.1 -->
47 <div id="navrow1" class="tabs">
49 <li><a href="index.html"><span>Main Page</span></a></li>
50 <li><a href="modules.html"><span>Modules</span></a></li>
51 <li><a href="namespaces.html"><span>Namespaces</span></a></li>
52 <li><a href="annotated.html"><span>Classes</span></a></li>
53 <li class="current"><a href="files.html"><span>Files</span></a></li>
54 <li><a href="examples.html"><span>Examples</span></a></li>
57 <div id="navrow2" class="tabs2">
59 <li><a href="files.html"><span>File List</span></a></li>
63 <div id="side-nav" class="ui-resizable side-nav-resizable">
65 <div id="nav-tree-contents">
68 <div id="splitbar" style="-moz-user-select:none;"
69 class="ui-resizable-handle">
72 <script type="text/javascript">
73 initNavTree('boundary__point_8hpp.html','');
75 <div id="doc-content">
77 <div class="headertitle">
78 <div class="title">boost/locale/boundary/boundary_point.hpp</div> </div>
80 <div class="contents">
81 <div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//</span>
82 <a name="l00002"></a>00002 <span class="comment">// Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)</span>
83 <a name="l00003"></a>00003 <span class="comment">//</span>
84 <a name="l00004"></a>00004 <span class="comment">// Distributed under the Boost Software License, Version 1.0. (See</span>
85 <a name="l00005"></a>00005 <span class="comment">// accompanying file LICENSE_1_0.txt or copy at</span>
86 <a name="l00006"></a>00006 <span class="comment">// http://www.boost.org/LICENSE_1_0.txt)</span>
87 <a name="l00007"></a>00007 <span class="comment">//</span>
88 <a name="l00008"></a>00008 <span class="preprocessor">#ifndef BOOST_LOCALE_BOUNDARY_BOUNDARY_POINT_HPP_INCLUDED</span>
89 <a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define BOOST_LOCALE_BOUNDARY_BOUNDARY_POINT_HPP_INCLUDED</span>
90 <a name="l00010"></a>00010 <span class="preprocessor"></span>
91 <a name="l00011"></a>00011 <span class="preprocessor">#include <boost/locale/boundary/types.hpp></span>
92 <a name="l00012"></a>00012
93 <a name="l00013"></a>00013 <span class="keyword">namespace </span>boost {
94 <a name="l00014"></a>00014 <span class="keyword">namespace </span>locale {
95 <a name="l00015"></a><a class="code" href="namespaceboost_1_1locale_1_1boundary.html">00015</a> <span class="keyword">namespace </span>boundary {
96 <a name="l00016"></a>00016
97 <a name="l00020"></a>00020
98 <a name="l00047"></a>00047 <span class="keyword">template</span><<span class="keyword">typename</span> IteratorType>
99 <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> {
100 <a name="l00049"></a>00049 <span class="keyword">public</span>:
101 <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>;
102 <a name="l00054"></a>00054
103 <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) {}
104 <a name="l00059"></a>00059
105 <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) :
106 <a name="l00064"></a>00064 iterator_(p),
107 <a name="l00065"></a>00065 rule_(r)
108 <a name="l00066"></a>00066 {
109 <a name="l00067"></a>00067 }
110 <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)
111 <a name="l00072"></a>00072 {
112 <a name="l00073"></a>00073 iterator_ = i;
113 <a name="l00074"></a>00074 }
114 <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)
115 <a name="l00079"></a>00079 {
116 <a name="l00080"></a>00080 rule_ = r;
117 <a name="l00081"></a>00081 }
118 <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>
119 <a name="l00086"></a>00086 <span class="keyword"> </span>{
120 <a name="l00087"></a>00087 <span class="keywordflow">return</span> iterator_;
121 <a name="l00088"></a>00088 }
122 <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>
123 <a name="l00093"></a>00093 <span class="keyword"> </span>{
124 <a name="l00094"></a>00094 <span class="keywordflow">return</span> rule_;
125 <a name="l00095"></a>00095 }
126 <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> &other)<span class="keyword"> const</span>
127 <a name="l00100"></a>00100 <span class="keyword"> </span>{
128 <a name="l00101"></a>00101 <span class="keywordflow">return</span> iterator_ == other.iterator_ && rule_ = other.rule_;
129 <a name="l00102"></a>00102 }
130 <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> &other)<span class="keyword"> const</span>
131 <a name="l00107"></a>00107 <span class="keyword"> </span>{
132 <a name="l00108"></a>00108 <span class="keywordflow">return</span> !(*<span class="keyword">this</span>==other);
133 <a name="l00109"></a>00109 }
134 <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> &other)<span class="keyword"> const</span>
135 <a name="l00114"></a>00114 <span class="keyword"> </span>{
136 <a name="l00115"></a>00115 <span class="keywordflow">return</span> iterator_ == other;
137 <a name="l00116"></a>00116 }
138 <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> &other)<span class="keyword"> const</span>
139 <a name="l00121"></a>00121 <span class="keyword"> </span>{
140 <a name="l00122"></a>00122 <span class="keywordflow">return</span> iterator_ != other;
141 <a name="l00123"></a>00123 }
142 <a name="l00124"></a>00124
143 <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>
144 <a name="l00129"></a>00129 <span class="keyword"> </span>{
145 <a name="l00130"></a>00130 <span class="keywordflow">return</span> iterator_;
146 <a name="l00131"></a>00131 }
147 <a name="l00132"></a>00132
148 <a name="l00133"></a>00133 <span class="keyword">private</span>:
149 <a name="l00134"></a>00134 <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point.html#af3c3a74a9a79690ff44f38d267b3b694">iterator_type</a> iterator_;
150 <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_;
151 <a name="l00136"></a>00136
152 <a name="l00137"></a>00137 };
153 <a name="l00141"></a>00141 <span class="keyword">template</span><<span class="keyword">typename</span> BaseIterator>
154 <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> &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<BaseIterator></a> <span class="keyword">const</span> &r)
155 <a name="l00143"></a>00143 {
156 <a name="l00144"></a>00144 <span class="keywordflow">return</span> r==l;
157 <a name="l00145"></a>00145 }
158 <a name="l00149"></a>00149 <span class="keyword">template</span><<span class="keyword">typename</span> BaseIterator>
159 <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> &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<BaseIterator></a> <span class="keyword">const</span> &r)
160 <a name="l00151"></a>00151 {
161 <a name="l00152"></a>00152 <span class="keywordflow">return</span> r!=l;
162 <a name="l00153"></a>00153 }
163 <a name="l00154"></a>00154
164 <a name="l00156"></a>00156
165 <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<std::string::const_iterator></a> <a class="code" href="namespaceboost_1_1locale_1_1boundary.html#ae8869288e9cc33aa283078654ef0dae2" title="convenience typedef">sboundary_point</a>;
166 <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<std::wstring::const_iterator></a> <a class="code" href="namespaceboost_1_1locale_1_1boundary.html#a7828f6884b8a654b9b14fc1ab96ce0d9" title="convenience typedef">wsboundary_point</a>;
167 <a name="l00159"></a>00159 <span class="preprocessor"> #ifdef BOOST_HAS_CHAR16_T</span>
168 <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<std::u16string::const_iterator></a> <a class="code" href="namespaceboost_1_1locale_1_1boundary.html#a64be9f4ec7ff991f73fc793a80f1fadc" title="convenience typedef">u16sboundary_point</a>;
169 <a name="l00161"></a>00161 <span class="preprocessor"> #endif</span>
170 <a name="l00162"></a>00162 <span class="preprocessor"></span><span class="preprocessor"> #ifdef BOOST_HAS_CHAR32_T</span>
171 <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<std::u32string::const_iterator></a> <a class="code" href="namespaceboost_1_1locale_1_1boundary.html#a9eb3d6aa912102a115dc6ff80fe9c22d" title="convenience typedef">u32sboundary_point</a>;
172 <a name="l00164"></a>00164 <span class="preprocessor"> #endif</span>
173 <a name="l00165"></a>00165 <span class="preprocessor"></span>
174 <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<char const *></a> <a class="code" href="namespaceboost_1_1locale_1_1boundary.html#ade880ec8623692375afbfd460d28163c" title="convenience typedef">cboundary_point</a>;
175 <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<wchar_t const *></a> <a class="code" href="namespaceboost_1_1locale_1_1boundary.html#a1c06a716653700b74922e4cc9df0da1b" title="convenience typedef">wcboundary_point</a>;
176 <a name="l00168"></a>00168 <span class="preprocessor"> #ifdef BOOST_HAS_CHAR16_T</span>
177 <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<char16_t const *></a> <a class="code" href="namespaceboost_1_1locale_1_1boundary.html#a79a665091fadab07227c0b129ddcde9d" title="convenience typedef">u16cboundary_point</a>;
178 <a name="l00170"></a>00170 <span class="preprocessor"> #endif</span>
179 <a name="l00171"></a>00171 <span class="preprocessor"></span><span class="preprocessor"> #ifdef BOOST_HAS_CHAR32_T</span>
180 <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<char32_t const *></a> <a class="code" href="namespaceboost_1_1locale_1_1boundary.html#aaa106d43f8b06fec14964e19c55356fb" title="convenience typedef">u32cboundary_point</a>;
181 <a name="l00173"></a>00173 <span class="preprocessor"> #endif</span>
182 <a name="l00174"></a>00174 <span class="preprocessor"></span>
183 <a name="l00175"></a>00175
184 <a name="l00176"></a>00176 } <span class="comment">// boundary</span>
185 <a name="l00177"></a>00177 } <span class="comment">// locale</span>
186 <a name="l00178"></a>00178 } <span class="comment">// boost</span>
187 <a name="l00179"></a>00179
188 <a name="l00180"></a>00180
189 <a name="l00181"></a>00181 <span class="preprocessor">#endif</span>
190 <a name="l00182"></a>00182 <span class="preprocessor"></span>
191 <a name="l00183"></a>00183 <span class="comment">// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4</span>
192 </pre></div></div><!-- contents -->
194 <div id="nav-path" class="navpath">
196 <li class="navelem"><b>boundary_point.hpp</b> </li>
199 © 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.