| <!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/index.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 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 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('index_8hpp.html',''); |
| </script> |
| <div id="doc-content"> |
| <div class="header"> |
| <div class="headertitle"> |
| <div class="title">boost/locale/boundary/index.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_INDEX_HPP_INCLUDED</span> |
| <a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define BOOST_LOCALE_BOUNDARY_INDEX_HPP_INCLUDED</span> |
| <a name="l00010"></a>00010 <span class="preprocessor"></span> |
| <a name="l00011"></a>00011 <span class="preprocessor">#include <boost/locale/config.hpp></span> |
| <a name="l00012"></a>00012 <span class="preprocessor">#include <boost/locale/boundary/types.hpp></span> |
| <a name="l00013"></a>00013 <span class="preprocessor">#include <boost/locale/boundary/facets.hpp></span> |
| <a name="l00014"></a>00014 <span class="preprocessor">#include <boost/locale/boundary/segment.hpp></span> |
| <a name="l00015"></a>00015 <span class="preprocessor">#include <boost/locale/boundary/boundary_point.hpp></span> |
| <a name="l00016"></a>00016 <span class="preprocessor">#include <boost/iterator/iterator_facade.hpp></span> |
| <a name="l00017"></a>00017 <span class="preprocessor">#include <boost/type_traits/is_same.hpp></span> |
| <a name="l00018"></a>00018 <span class="preprocessor">#include <boost/shared_ptr.hpp></span> |
| <a name="l00019"></a>00019 <span class="preprocessor">#include <boost/cstdint.hpp></span> |
| <a name="l00020"></a>00020 <span class="preprocessor">#include <boost/assert.hpp></span> |
| <a name="l00021"></a>00021 <span class="preprocessor">#ifdef BOOST_MSVC</span> |
| <a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor"># pragma warning(push)</span> |
| <a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor"># pragma warning(disable : 4275 4251 4231 4660)</span> |
| <a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#endif</span> |
| <a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#include <string></span> |
| <a name="l00026"></a>00026 <span class="preprocessor">#include <locale></span> |
| <a name="l00027"></a>00027 <span class="preprocessor">#include <vector></span> |
| <a name="l00028"></a>00028 <span class="preprocessor">#include <iterator></span> |
| <a name="l00029"></a>00029 <span class="preprocessor">#include <algorithm></span> |
| <a name="l00030"></a>00030 <span class="preprocessor">#include <stdexcept></span> |
| <a name="l00031"></a>00031 |
| <a name="l00032"></a>00032 <span class="preprocessor">#include <iostream></span> |
| <a name="l00033"></a>00033 |
| <a name="l00034"></a>00034 <span class="keyword">namespace </span>boost { |
| <a name="l00035"></a>00035 |
| <a name="l00036"></a>00036 <span class="keyword">namespace </span>locale { |
| <a name="l00037"></a>00037 |
| <a name="l00038"></a>00038 <span class="keyword">namespace </span>boundary { |
| <a name="l00046"></a>00046 |
| <a name="l00048"></a>00048 |
| <a name="l00049"></a>00049 <span class="keyword">namespace </span>details { |
| <a name="l00050"></a>00050 |
| <a name="l00051"></a>00051 template<typename IteratorType,typename CategoryType = typename std::iterator_traits<IteratorType>::iterator_category> |
| <a name="l00052"></a>00052 <span class="keyword">struct </span>mapping_traits { |
| <a name="l00053"></a>00053 <span class="keyword">typedef</span> <span class="keyword">typename</span> std::iterator_traits<IteratorType>::value_type char_type; |
| <a name="l00054"></a>00054 <span class="keyword">static</span> <a class="code" href="group__boundary.html#ga7b4dd7af8fad53fabd77e629da24d466">index_type</a> map(<a class="code" href="group__boundary.html#ga15de9963ce9bb6037c8525901dfbf641">boundary_type</a> t,IteratorType b,IteratorType e,std::locale <span class="keyword">const</span> &l) |
| <a name="l00055"></a>00055 { |
| <a name="l00056"></a>00056 std::basic_string<char_type> str(b,e); |
| <a name="l00057"></a>00057 <span class="keywordflow">return</span> std::use_facet<boundary_indexing<char_type> >(l).map(t,str.c_str(),str.c_str()+str.size()); |
| <a name="l00058"></a>00058 } |
| <a name="l00059"></a>00059 }; |
| <a name="l00060"></a>00060 |
| <a name="l00061"></a>00061 <span class="keyword">template</span><<span class="keyword">typename</span> CharType,<span class="keyword">typename</span> SomeIteratorType> |
| <a name="l00062"></a>00062 <span class="keyword">struct </span>linear_iterator_traits { |
| <a name="l00063"></a>00063 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">bool</span> is_linear = |
| <a name="l00064"></a>00064 is_same<SomeIteratorType,CharType*>::value |
| <a name="l00065"></a>00065 || is_same<SomeIteratorType,CharType const*>::value |
| <a name="l00066"></a>00066 || is_same<SomeIteratorType,typename std::basic_string<CharType>::iterator>::value |
| <a name="l00067"></a>00067 || is_same<SomeIteratorType,typename std::basic_string<CharType>::const_iterator>::value |
| <a name="l00068"></a>00068 || is_same<SomeIteratorType,typename std::vector<CharType>::iterator>::value |
| <a name="l00069"></a>00069 || is_same<SomeIteratorType,typename std::vector<CharType>::const_iterator>::value |
| <a name="l00070"></a>00070 ; |
| <a name="l00071"></a>00071 }; |
| <a name="l00072"></a>00072 |
| <a name="l00073"></a>00073 |
| <a name="l00074"></a>00074 |
| <a name="l00075"></a>00075 <span class="keyword">template</span><<span class="keyword">typename</span> IteratorType> |
| <a name="l00076"></a>00076 <span class="keyword">struct </span>mapping_traits<IteratorType,std::random_access_iterator_tag> { |
| <a name="l00077"></a>00077 |
| <a name="l00078"></a>00078 <span class="keyword">typedef</span> <span class="keyword">typename</span> std::iterator_traits<IteratorType>::value_type char_type; |
| <a name="l00079"></a>00079 |
| <a name="l00080"></a>00080 |
| <a name="l00081"></a>00081 |
| <a name="l00082"></a>00082 <span class="keyword">static</span> <a class="code" href="group__boundary.html#ga7b4dd7af8fad53fabd77e629da24d466">index_type</a> map(<a class="code" href="group__boundary.html#ga15de9963ce9bb6037c8525901dfbf641">boundary_type</a> t,IteratorType b,IteratorType e,std::locale <span class="keyword">const</span> &l) |
| <a name="l00083"></a>00083 { |
| <a name="l00084"></a>00084 <a class="code" href="group__boundary.html#ga7b4dd7af8fad53fabd77e629da24d466">index_type</a> result; |
| <a name="l00085"></a>00085 |
| <a name="l00086"></a>00086 <span class="comment">//</span> |
| <a name="l00087"></a>00087 <span class="comment">// Optimize for most common cases</span> |
| <a name="l00088"></a>00088 <span class="comment">//</span> |
| <a name="l00089"></a>00089 <span class="comment">// C++0x requires that string is continious in memory and all known</span> |
| <a name="l00090"></a>00090 <span class="comment">// string implementations</span> |
| <a name="l00091"></a>00091 <span class="comment">// do this because of c_str() support. </span> |
| <a name="l00092"></a>00092 <span class="comment">//</span> |
| <a name="l00093"></a>00093 |
| <a name="l00094"></a>00094 <span class="keywordflow">if</span>(linear_iterator_traits<char_type,IteratorType>::is_linear && b!=e) |
| <a name="l00095"></a>00095 { |
| <a name="l00096"></a>00096 char_type <span class="keyword">const</span> *begin = &*b; |
| <a name="l00097"></a>00097 char_type <span class="keyword">const</span> *end = begin + (e-b); |
| <a name="l00098"></a>00098 <a class="code" href="group__boundary.html#ga7b4dd7af8fad53fabd77e629da24d466">index_type</a> tmp=std::use_facet<boundary_indexing<char_type> >(l).map(t,begin,end); |
| <a name="l00099"></a>00099 result.swap(tmp); |
| <a name="l00100"></a>00100 } |
| <a name="l00101"></a>00101 <span class="keywordflow">else</span> { |
| <a name="l00102"></a>00102 std::basic_string<char_type> str(b,e); |
| <a name="l00103"></a>00103 <a class="code" href="group__boundary.html#ga7b4dd7af8fad53fabd77e629da24d466">index_type</a> tmp = std::use_facet<boundary_indexing<char_type> >(l).map(t,str.c_str(),str.c_str()+str.size()); |
| <a name="l00104"></a>00104 result.swap(tmp); |
| <a name="l00105"></a>00105 } |
| <a name="l00106"></a>00106 <span class="keywordflow">return</span> result; |
| <a name="l00107"></a>00107 } |
| <a name="l00108"></a>00108 }; |
| <a name="l00109"></a>00109 |
| <a name="l00110"></a>00110 <span class="keyword">template</span><<span class="keyword">typename</span> BaseIterator> |
| <a name="l00111"></a>00111 <span class="keyword">class </span>mapping { |
| <a name="l00112"></a>00112 <span class="keyword">public</span>: |
| <a name="l00113"></a>00113 <span class="keyword">typedef</span> BaseIterator base_iterator; |
| <a name="l00114"></a>00114 <span class="keyword">typedef</span> <span class="keyword">typename</span> std::iterator_traits<base_iterator>::value_type char_type; |
| <a name="l00115"></a>00115 |
| <a name="l00116"></a>00116 |
| <a name="l00117"></a>00117 mapping(<a class="code" href="group__boundary.html#ga15de9963ce9bb6037c8525901dfbf641">boundary_type</a> type, |
| <a name="l00118"></a>00118 base_iterator begin, |
| <a name="l00119"></a>00119 base_iterator end, |
| <a name="l00120"></a>00120 std::locale <span class="keyword">const</span> &loc) |
| <a name="l00121"></a>00121 : |
| <a name="l00122"></a>00122 index_(new <a class="code" href="group__boundary.html#ga7b4dd7af8fad53fabd77e629da24d466">index_type</a>()), |
| <a name="l00123"></a>00123 begin_(begin), |
| <a name="l00124"></a>00124 end_(end) |
| <a name="l00125"></a>00125 { |
| <a name="l00126"></a>00126 <a class="code" href="group__boundary.html#ga7b4dd7af8fad53fabd77e629da24d466">index_type</a> idx=details::mapping_traits<base_iterator>::map(type,begin,end,loc); |
| <a name="l00127"></a>00127 index_->swap(idx); |
| <a name="l00128"></a>00128 } |
| <a name="l00129"></a>00129 |
| <a name="l00130"></a>00130 mapping() |
| <a name="l00131"></a>00131 { |
| <a name="l00132"></a>00132 } |
| <a name="l00133"></a>00133 |
| <a name="l00134"></a>00134 <a class="code" href="group__boundary.html#ga7b4dd7af8fad53fabd77e629da24d466">index_type</a> <span class="keyword">const</span> &index()<span class="keyword"> const</span> |
| <a name="l00135"></a>00135 <span class="keyword"> </span>{ |
| <a name="l00136"></a>00136 <span class="keywordflow">return</span> *index_; |
| <a name="l00137"></a>00137 } |
| <a name="l00138"></a>00138 |
| <a name="l00139"></a>00139 base_iterator begin()<span class="keyword"> const</span> |
| <a name="l00140"></a>00140 <span class="keyword"> </span>{ |
| <a name="l00141"></a>00141 <span class="keywordflow">return</span> begin_; |
| <a name="l00142"></a>00142 } |
| <a name="l00143"></a>00143 |
| <a name="l00144"></a>00144 base_iterator end()<span class="keyword"> const</span> |
| <a name="l00145"></a>00145 <span class="keyword"> </span>{ |
| <a name="l00146"></a>00146 <span class="keywordflow">return</span> end_; |
| <a name="l00147"></a>00147 } |
| <a name="l00148"></a>00148 |
| <a name="l00149"></a>00149 <span class="keyword">private</span>: |
| <a name="l00150"></a>00150 boost::shared_ptr<index_type> index_; |
| <a name="l00151"></a>00151 base_iterator begin_,end_; |
| <a name="l00152"></a>00152 }; |
| <a name="l00153"></a>00153 |
| <a name="l00154"></a>00154 <span class="keyword">template</span><<span class="keyword">typename</span> BaseIterator> |
| <a name="l00155"></a>00155 <span class="keyword">class </span>segment_index_iterator : |
| <a name="l00156"></a>00156 <span class="keyword">public</span> boost::iterator_facade< |
| <a name="l00157"></a>00157 segment_index_iterator<BaseIterator>, |
| <a name="l00158"></a>00158 segment<BaseIterator>, |
| <a name="l00159"></a>00159 boost::bidirectional_traversal_tag, |
| <a name="l00160"></a>00160 segment<BaseIterator> const & |
| <a name="l00161"></a>00161 > |
| <a name="l00162"></a>00162 { |
| <a name="l00163"></a>00163 <span class="keyword">public</span>: |
| <a name="l00164"></a>00164 <span class="keyword">typedef</span> BaseIterator base_iterator; |
| <a name="l00165"></a>00165 <span class="keyword">typedef</span> mapping<base_iterator> mapping_type; |
| <a name="l00166"></a>00166 <span class="keyword">typedef</span> segment<base_iterator> segment_type; |
| <a name="l00167"></a>00167 |
| <a name="l00168"></a>00168 segment_index_iterator() : current_(0,0),map_(0) |
| <a name="l00169"></a>00169 { |
| <a name="l00170"></a>00170 } |
| <a name="l00171"></a>00171 |
| <a name="l00172"></a>00172 segment_index_iterator(base_iterator p,mapping_type <span class="keyword">const</span> *map,<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> mask,<span class="keywordtype">bool</span> full_select) : |
| <a name="l00173"></a>00173 map_(map), |
| <a name="l00174"></a>00174 mask_(mask), |
| <a name="l00175"></a>00175 full_select_(full_select) |
| <a name="l00176"></a>00176 { |
| <a name="l00177"></a>00177 <span class="keyword">set</span>(p); |
| <a name="l00178"></a>00178 } |
| <a name="l00179"></a>00179 segment_index_iterator(<span class="keywordtype">bool</span> is_begin,mapping_type <span class="keyword">const</span> *map,<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> mask,<span class="keywordtype">bool</span> full_select) : |
| <a name="l00180"></a>00180 map_(map), |
| <a name="l00181"></a>00181 mask_(mask), |
| <a name="l00182"></a>00182 full_select_(full_select) |
| <a name="l00183"></a>00183 { |
| <a name="l00184"></a>00184 <span class="keywordflow">if</span>(is_begin) |
| <a name="l00185"></a>00185 set_begin(); |
| <a name="l00186"></a>00186 <span class="keywordflow">else</span> |
| <a name="l00187"></a>00187 set_end(); |
| <a name="l00188"></a>00188 } |
| <a name="l00189"></a>00189 |
| <a name="l00190"></a>00190 segment_type <span class="keyword">const</span> &dereference()<span class="keyword"> const</span> |
| <a name="l00191"></a>00191 <span class="keyword"> </span>{ |
| <a name="l00192"></a>00192 <span class="keywordflow">return</span> value_; |
| <a name="l00193"></a>00193 } |
| <a name="l00194"></a>00194 |
| <a name="l00195"></a>00195 <span class="keywordtype">bool</span> equal(segment_index_iterator <span class="keyword">const</span> &other)<span class="keyword"> const</span> |
| <a name="l00196"></a>00196 <span class="keyword"> </span>{ |
| <a name="l00197"></a>00197 <span class="keywordflow">return</span> map_ == other.map_ && current_.second == other.current_.second; |
| <a name="l00198"></a>00198 } |
| <a name="l00199"></a>00199 |
| <a name="l00200"></a>00200 <span class="keywordtype">void</span> increment() |
| <a name="l00201"></a>00201 { |
| <a name="l00202"></a>00202 std::pair<size_t,size_t> next = current_; |
| <a name="l00203"></a>00203 <span class="keywordflow">if</span>(full_select_) { |
| <a name="l00204"></a>00204 next.first = next.second; |
| <a name="l00205"></a>00205 <span class="keywordflow">while</span>(next.second < size()) { |
| <a name="l00206"></a>00206 next.second++; |
| <a name="l00207"></a>00207 <span class="keywordflow">if</span>(valid_offset(next.second)) |
| <a name="l00208"></a>00208 <span class="keywordflow">break</span>; |
| <a name="l00209"></a>00209 } |
| <a name="l00210"></a>00210 <span class="keywordflow">if</span>(next.second == size()) |
| <a name="l00211"></a>00211 next.first = next.second - 1; |
| <a name="l00212"></a>00212 } |
| <a name="l00213"></a>00213 <span class="keywordflow">else</span> { |
| <a name="l00214"></a>00214 <span class="keywordflow">while</span>(next.second < size()) { |
| <a name="l00215"></a>00215 next.first = next.second; |
| <a name="l00216"></a>00216 next.second++; |
| <a name="l00217"></a>00217 <span class="keywordflow">if</span>(valid_offset(next.second)) |
| <a name="l00218"></a>00218 <span class="keywordflow">break</span>; |
| <a name="l00219"></a>00219 } |
| <a name="l00220"></a>00220 } |
| <a name="l00221"></a>00221 update_current(next); |
| <a name="l00222"></a>00222 } |
| <a name="l00223"></a>00223 |
| <a name="l00224"></a>00224 <span class="keywordtype">void</span> decrement() |
| <a name="l00225"></a>00225 { |
| <a name="l00226"></a>00226 std::pair<size_t,size_t> next = current_; |
| <a name="l00227"></a>00227 <span class="keywordflow">if</span>(full_select_) { |
| <a name="l00228"></a>00228 <span class="keywordflow">while</span>(next.second >1) { |
| <a name="l00229"></a>00229 next.second--; |
| <a name="l00230"></a>00230 <span class="keywordflow">if</span>(valid_offset(next.second)) |
| <a name="l00231"></a>00231 <span class="keywordflow">break</span>; |
| <a name="l00232"></a>00232 } |
| <a name="l00233"></a>00233 next.first = next.second; |
| <a name="l00234"></a>00234 <span class="keywordflow">while</span>(next.first >0) { |
| <a name="l00235"></a>00235 next.first--; |
| <a name="l00236"></a>00236 <span class="keywordflow">if</span>(valid_offset(next.first)) |
| <a name="l00237"></a>00237 <span class="keywordflow">break</span>; |
| <a name="l00238"></a>00238 } |
| <a name="l00239"></a>00239 } |
| <a name="l00240"></a>00240 <span class="keywordflow">else</span> { |
| <a name="l00241"></a>00241 <span class="keywordflow">while</span>(next.second >1) { |
| <a name="l00242"></a>00242 next.second--; |
| <a name="l00243"></a>00243 <span class="keywordflow">if</span>(valid_offset(next.second)) |
| <a name="l00244"></a>00244 <span class="keywordflow">break</span>; |
| <a name="l00245"></a>00245 } |
| <a name="l00246"></a>00246 next.first = next.second - 1; |
| <a name="l00247"></a>00247 } |
| <a name="l00248"></a>00248 update_current(next); |
| <a name="l00249"></a>00249 } |
| <a name="l00250"></a>00250 |
| <a name="l00251"></a>00251 <span class="keyword">private</span>: |
| <a name="l00252"></a>00252 |
| <a name="l00253"></a>00253 <span class="keywordtype">void</span> set_end() |
| <a name="l00254"></a>00254 { |
| <a name="l00255"></a>00255 current_.first = size() - 1; |
| <a name="l00256"></a>00256 current_.second = size(); |
| <a name="l00257"></a>00257 value_ = segment_type(map_->end(),map_->end(),0); |
| <a name="l00258"></a>00258 } |
| <a name="l00259"></a>00259 <span class="keywordtype">void</span> set_begin() |
| <a name="l00260"></a>00260 { |
| <a name="l00261"></a>00261 current_.first = current_.second = 0; |
| <a name="l00262"></a>00262 value_ = segment_type(map_->begin(),map_->begin(),0); |
| <a name="l00263"></a>00263 increment(); |
| <a name="l00264"></a>00264 } |
| <a name="l00265"></a>00265 |
| <a name="l00266"></a>00266 <span class="keywordtype">void</span> <span class="keyword">set</span>(base_iterator p) |
| <a name="l00267"></a>00267 { |
| <a name="l00268"></a>00268 <span class="keywordtype">size_t</span> dist=std::distance(map_->begin(),p); |
| <a name="l00269"></a>00269 index_type::const_iterator b=map_->index().begin(),e=map_->index().end(); |
| <a name="l00270"></a>00270 index_type::const_iterator |
| <a name="l00271"></a>00271 boundary_point=std::upper_bound(b,e,break_info(dist)); |
| <a name="l00272"></a>00272 <span class="keywordflow">while</span>(boundary_point != e && (boundary_point->rule & mask_)==0) |
| <a name="l00273"></a>00273 boundary_point++; |
| <a name="l00274"></a>00274 |
| <a name="l00275"></a>00275 current_.first = current_.second = boundary_point - b; |
| <a name="l00276"></a>00276 |
| <a name="l00277"></a>00277 <span class="keywordflow">if</span>(full_select_) { |
| <a name="l00278"></a>00278 <span class="keywordflow">while</span>(current_.first > 0) { |
| <a name="l00279"></a>00279 current_.first --; |
| <a name="l00280"></a>00280 <span class="keywordflow">if</span>(valid_offset(current_.first)) |
| <a name="l00281"></a>00281 <span class="keywordflow">break</span>; |
| <a name="l00282"></a>00282 } |
| <a name="l00283"></a>00283 } |
| <a name="l00284"></a>00284 <span class="keywordflow">else</span> { |
| <a name="l00285"></a>00285 <span class="keywordflow">if</span>(current_.first > 0) |
| <a name="l00286"></a>00286 current_.first --; |
| <a name="l00287"></a>00287 } |
| <a name="l00288"></a>00288 value_.first = map_->begin(); |
| <a name="l00289"></a>00289 std::advance(value_.first,get_offset(current_.first)); |
| <a name="l00290"></a>00290 value_.second = value_.first; |
| <a name="l00291"></a>00291 std::advance(value_.second,get_offset(current_.second) - get_offset(current_.first)); |
| <a name="l00292"></a>00292 |
| <a name="l00293"></a>00293 update_rule(); |
| <a name="l00294"></a>00294 } |
| <a name="l00295"></a>00295 |
| <a name="l00296"></a>00296 <span class="keywordtype">void</span> update_current(std::pair<size_t,size_t> pos) |
| <a name="l00297"></a>00297 { |
| <a name="l00298"></a>00298 std::ptrdiff_t first_diff = get_offset(pos.first) - get_offset(current_.first); |
| <a name="l00299"></a>00299 std::ptrdiff_t second_diff = get_offset(pos.second) - get_offset(current_.second); |
| <a name="l00300"></a>00300 std::advance(value_.first,first_diff); |
| <a name="l00301"></a>00301 std::advance(value_.second,second_diff); |
| <a name="l00302"></a>00302 current_ = pos; |
| <a name="l00303"></a>00303 update_rule(); |
| <a name="l00304"></a>00304 } |
| <a name="l00305"></a>00305 |
| <a name="l00306"></a>00306 <span class="keywordtype">void</span> update_rule() |
| <a name="l00307"></a>00307 { |
| <a name="l00308"></a>00308 <span class="keywordflow">if</span>(current_.second != size()) { |
| <a name="l00309"></a>00309 value_.rule(index()[current_.second].rule); |
| <a name="l00310"></a>00310 } |
| <a name="l00311"></a>00311 } |
| <a name="l00312"></a>00312 <span class="keywordtype">size_t</span> get_offset(<span class="keywordtype">size_t</span> ind)<span class="keyword"> const</span> |
| <a name="l00313"></a>00313 <span class="keyword"> </span>{ |
| <a name="l00314"></a>00314 <span class="keywordflow">if</span>(ind == size()) |
| <a name="l00315"></a>00315 <span class="keywordflow">return</span> index().back().offset; |
| <a name="l00316"></a>00316 <span class="keywordflow">return</span> index()[ind].offset; |
| <a name="l00317"></a>00317 } |
| <a name="l00318"></a>00318 |
| <a name="l00319"></a>00319 <span class="keywordtype">bool</span> valid_offset(<span class="keywordtype">size_t</span> offset)<span class="keyword"> const</span> |
| <a name="l00320"></a>00320 <span class="keyword"> </span>{ |
| <a name="l00321"></a>00321 <span class="keywordflow">return</span> offset == 0 |
| <a name="l00322"></a>00322 || offset == size() <span class="comment">// make sure we not acess index[size]</span> |
| <a name="l00323"></a>00323 || (index()[offset].rule & mask_)!=0; |
| <a name="l00324"></a>00324 } |
| <a name="l00325"></a>00325 |
| <a name="l00326"></a>00326 <span class="keywordtype">size_t</span> size()<span class="keyword"> const</span> |
| <a name="l00327"></a>00327 <span class="keyword"> </span>{ |
| <a name="l00328"></a>00328 <span class="keywordflow">return</span> index().size(); |
| <a name="l00329"></a>00329 } |
| <a name="l00330"></a>00330 |
| <a name="l00331"></a>00331 <a class="code" href="group__boundary.html#ga7b4dd7af8fad53fabd77e629da24d466">index_type</a> <span class="keyword">const</span> &index()<span class="keyword"> const</span> |
| <a name="l00332"></a>00332 <span class="keyword"> </span>{ |
| <a name="l00333"></a>00333 <span class="keywordflow">return</span> map_->index(); |
| <a name="l00334"></a>00334 } |
| <a name="l00335"></a>00335 |
| <a name="l00336"></a>00336 |
| <a name="l00337"></a>00337 segment_type value_; |
| <a name="l00338"></a>00338 std::pair<size_t,size_t> current_; |
| <a name="l00339"></a>00339 mapping_type <span class="keyword">const</span> *map_; |
| <a name="l00340"></a>00340 <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> mask_; |
| <a name="l00341"></a>00341 <span class="keywordtype">bool</span> full_select_; |
| <a name="l00342"></a>00342 }; |
| <a name="l00343"></a>00343 |
| <a name="l00344"></a>00344 <span class="keyword">template</span><<span class="keyword">typename</span> BaseIterator> |
| <a name="l00345"></a>00345 <span class="keyword">class </span>boundary_point_index_iterator : |
| <a name="l00346"></a>00346 <span class="keyword">public</span> boost::iterator_facade< |
| <a name="l00347"></a>00347 boundary_point_index_iterator<BaseIterator>, |
| <a name="l00348"></a>00348 boundary_point<BaseIterator>, |
| <a name="l00349"></a>00349 boost::bidirectional_traversal_tag, |
| <a name="l00350"></a>00350 boundary_point<BaseIterator> const & |
| <a name="l00351"></a>00351 > |
| <a name="l00352"></a>00352 { |
| <a name="l00353"></a>00353 <span class="keyword">public</span>: |
| <a name="l00354"></a>00354 <span class="keyword">typedef</span> BaseIterator base_iterator; |
| <a name="l00355"></a>00355 <span class="keyword">typedef</span> mapping<base_iterator> mapping_type; |
| <a name="l00356"></a>00356 <span class="keyword">typedef</span> boundary_point<base_iterator> boundary_point_type; |
| <a name="l00357"></a>00357 |
| <a name="l00358"></a>00358 boundary_point_index_iterator() : current_(0),map_(0) |
| <a name="l00359"></a>00359 { |
| <a name="l00360"></a>00360 } |
| <a name="l00361"></a>00361 |
| <a name="l00362"></a>00362 boundary_point_index_iterator(<span class="keywordtype">bool</span> is_begin,mapping_type <span class="keyword">const</span> *map,<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> mask) : |
| <a name="l00363"></a>00363 map_(map), |
| <a name="l00364"></a>00364 mask_(mask) |
| <a name="l00365"></a>00365 { |
| <a name="l00366"></a>00366 <span class="keywordflow">if</span>(is_begin) |
| <a name="l00367"></a>00367 set_begin(); |
| <a name="l00368"></a>00368 <span class="keywordflow">else</span> |
| <a name="l00369"></a>00369 set_end(); |
| <a name="l00370"></a>00370 } |
| <a name="l00371"></a>00371 boundary_point_index_iterator(base_iterator p,mapping_type <span class="keyword">const</span> *map,<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> mask) : |
| <a name="l00372"></a>00372 map_(map), |
| <a name="l00373"></a>00373 mask_(mask) |
| <a name="l00374"></a>00374 { |
| <a name="l00375"></a>00375 <span class="keyword">set</span>(p); |
| <a name="l00376"></a>00376 } |
| <a name="l00377"></a>00377 |
| <a name="l00378"></a>00378 boundary_point_type <span class="keyword">const</span> &dereference()<span class="keyword"> const</span> |
| <a name="l00379"></a>00379 <span class="keyword"> </span>{ |
| <a name="l00380"></a>00380 <span class="keywordflow">return</span> value_; |
| <a name="l00381"></a>00381 } |
| <a name="l00382"></a>00382 |
| <a name="l00383"></a>00383 <span class="keywordtype">bool</span> equal(boundary_point_index_iterator <span class="keyword">const</span> &other)<span class="keyword"> const</span> |
| <a name="l00384"></a>00384 <span class="keyword"> </span>{ |
| <a name="l00385"></a>00385 <span class="keywordflow">return</span> map_ == other.map_ && current_ == other.current_; |
| <a name="l00386"></a>00386 } |
| <a name="l00387"></a>00387 |
| <a name="l00388"></a>00388 <span class="keywordtype">void</span> increment() |
| <a name="l00389"></a>00389 { |
| <a name="l00390"></a>00390 <span class="keywordtype">size_t</span> next = current_; |
| <a name="l00391"></a>00391 <span class="keywordflow">while</span>(next < size()) { |
| <a name="l00392"></a>00392 next++; |
| <a name="l00393"></a>00393 <span class="keywordflow">if</span>(valid_offset(next)) |
| <a name="l00394"></a>00394 <span class="keywordflow">break</span>; |
| <a name="l00395"></a>00395 } |
| <a name="l00396"></a>00396 update_current(next); |
| <a name="l00397"></a>00397 } |
| <a name="l00398"></a>00398 |
| <a name="l00399"></a>00399 <span class="keywordtype">void</span> decrement() |
| <a name="l00400"></a>00400 { |
| <a name="l00401"></a>00401 <span class="keywordtype">size_t</span> next = current_; |
| <a name="l00402"></a>00402 <span class="keywordflow">while</span>(next>0) { |
| <a name="l00403"></a>00403 next--; |
| <a name="l00404"></a>00404 <span class="keywordflow">if</span>(valid_offset(next)) |
| <a name="l00405"></a>00405 <span class="keywordflow">break</span>; |
| <a name="l00406"></a>00406 } |
| <a name="l00407"></a>00407 update_current(next); |
| <a name="l00408"></a>00408 } |
| <a name="l00409"></a>00409 |
| <a name="l00410"></a>00410 <span class="keyword">private</span>: |
| <a name="l00411"></a>00411 <span class="keywordtype">void</span> set_end() |
| <a name="l00412"></a>00412 { |
| <a name="l00413"></a>00413 current_ = size(); |
| <a name="l00414"></a>00414 value_ = boundary_point_type(map_->end(),0); |
| <a name="l00415"></a>00415 } |
| <a name="l00416"></a>00416 <span class="keywordtype">void</span> set_begin() |
| <a name="l00417"></a>00417 { |
| <a name="l00418"></a>00418 current_ = 0; |
| <a name="l00419"></a>00419 value_ = boundary_point_type(map_->begin(),0); |
| <a name="l00420"></a>00420 } |
| <a name="l00421"></a>00421 |
| <a name="l00422"></a>00422 <span class="keywordtype">void</span> <span class="keyword">set</span>(base_iterator p) |
| <a name="l00423"></a>00423 { |
| <a name="l00424"></a>00424 <span class="keywordtype">size_t</span> dist = std::distance(map_->begin(),p); |
| <a name="l00425"></a>00425 |
| <a name="l00426"></a>00426 index_type::const_iterator b=index().begin(); |
| <a name="l00427"></a>00427 index_type::const_iterator e=index().end(); |
| <a name="l00428"></a>00428 index_type::const_iterator ptr = std::lower_bound(b,e,break_info(dist)); |
| <a name="l00429"></a>00429 |
| <a name="l00430"></a>00430 <span class="keywordflow">if</span>(ptr==index().end()) |
| <a name="l00431"></a>00431 current_=size()-1; |
| <a name="l00432"></a>00432 <span class="keywordflow">else</span> |
| <a name="l00433"></a>00433 current_=ptr - index().begin(); |
| <a name="l00434"></a>00434 |
| <a name="l00435"></a>00435 <span class="keywordflow">while</span>(!valid_offset(current_)) |
| <a name="l00436"></a>00436 current_ ++; |
| <a name="l00437"></a>00437 |
| <a name="l00438"></a>00438 std::ptrdiff_t diff = get_offset(current_) - dist; |
| <a name="l00439"></a>00439 std::advance(p,diff); |
| <a name="l00440"></a>00440 value_.iterator(p); |
| <a name="l00441"></a>00441 update_rule(); |
| <a name="l00442"></a>00442 } |
| <a name="l00443"></a>00443 |
| <a name="l00444"></a>00444 <span class="keywordtype">void</span> update_current(<span class="keywordtype">size_t</span> pos) |
| <a name="l00445"></a>00445 { |
| <a name="l00446"></a>00446 std::ptrdiff_t diff = get_offset(pos) - get_offset(current_); |
| <a name="l00447"></a>00447 base_iterator i=value_.iterator(); |
| <a name="l00448"></a>00448 std::advance(i,diff); |
| <a name="l00449"></a>00449 current_ = pos; |
| <a name="l00450"></a>00450 value_.iterator(i); |
| <a name="l00451"></a>00451 update_rule(); |
| <a name="l00452"></a>00452 } |
| <a name="l00453"></a>00453 |
| <a name="l00454"></a>00454 <span class="keywordtype">void</span> update_rule() |
| <a name="l00455"></a>00455 { |
| <a name="l00456"></a>00456 <span class="keywordflow">if</span>(current_ != size()) { |
| <a name="l00457"></a>00457 value_.rule(index()[current_].rule); |
| <a name="l00458"></a>00458 } |
| <a name="l00459"></a>00459 } |
| <a name="l00460"></a>00460 <span class="keywordtype">size_t</span> get_offset(<span class="keywordtype">size_t</span> ind)<span class="keyword"> const</span> |
| <a name="l00461"></a>00461 <span class="keyword"> </span>{ |
| <a name="l00462"></a>00462 <span class="keywordflow">if</span>(ind == size()) |
| <a name="l00463"></a>00463 <span class="keywordflow">return</span> index().back().offset; |
| <a name="l00464"></a>00464 <span class="keywordflow">return</span> index()[ind].offset; |
| <a name="l00465"></a>00465 } |
| <a name="l00466"></a>00466 |
| <a name="l00467"></a>00467 <span class="keywordtype">bool</span> valid_offset(<span class="keywordtype">size_t</span> offset)<span class="keyword"> const</span> |
| <a name="l00468"></a>00468 <span class="keyword"> </span>{ |
| <a name="l00469"></a>00469 <span class="keywordflow">return</span> offset == 0 |
| <a name="l00470"></a>00470 || offset + 1 >= size() <span class="comment">// last and first are always valid regardless of mark</span> |
| <a name="l00471"></a>00471 || (index()[offset].rule & mask_)!=0; |
| <a name="l00472"></a>00472 } |
| <a name="l00473"></a>00473 |
| <a name="l00474"></a>00474 <span class="keywordtype">size_t</span> size()<span class="keyword"> const</span> |
| <a name="l00475"></a>00475 <span class="keyword"> </span>{ |
| <a name="l00476"></a>00476 <span class="keywordflow">return</span> index().size(); |
| <a name="l00477"></a>00477 } |
| <a name="l00478"></a>00478 |
| <a name="l00479"></a>00479 <a class="code" href="group__boundary.html#ga7b4dd7af8fad53fabd77e629da24d466">index_type</a> <span class="keyword">const</span> &index()<span class="keyword"> const</span> |
| <a name="l00480"></a>00480 <span class="keyword"> </span>{ |
| <a name="l00481"></a>00481 <span class="keywordflow">return</span> map_->index(); |
| <a name="l00482"></a>00482 } |
| <a name="l00483"></a>00483 |
| <a name="l00484"></a>00484 |
| <a name="l00485"></a>00485 boundary_point_type value_; |
| <a name="l00486"></a>00486 <span class="keywordtype">size_t</span> current_; |
| <a name="l00487"></a>00487 mapping_type <span class="keyword">const</span> *map_; |
| <a name="l00488"></a>00488 <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> mask_; |
| <a name="l00489"></a>00489 }; |
| <a name="l00490"></a>00490 |
| <a name="l00491"></a>00491 |
| <a name="l00492"></a>00492 } <span class="comment">// details</span> |
| <a name="l00493"></a>00493 |
| <a name="l00495"></a>00495 |
| <a name="l00496"></a>00496 <span class="keyword">template</span><<span class="keyword">typename</span> BaseIterator> |
| <a name="l00497"></a>00497 <span class="keyword">class </span>segment_index; |
| <a name="l00498"></a>00498 |
| <a name="l00499"></a>00499 <span class="keyword">template</span><<span class="keyword">typename</span> BaseIterator> |
| <a name="l00500"></a>00500 <span class="keyword">class </span>boundary_point_index; |
| <a name="l00501"></a>00501 |
| <a name="l00502"></a>00502 |
| <a name="l00554"></a>00554 |
| <a name="l00555"></a>00555 <span class="keyword">template</span><<span class="keyword">typename</span> BaseIterator> |
| <a name="l00556"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1segment__index.html">00556</a> <span class="keyword">class </span><a class="code" href="classboost_1_1locale_1_1boundary_1_1segment__index.html" title="This class holds an index of segments in the text range and allows to iterate over them...">segment_index</a> { |
| <a name="l00557"></a>00557 <span class="keyword">public</span>: |
| <a name="l00558"></a>00558 |
| <a name="l00562"></a><a class="code" href="group__boundary.html#ga06f2faacb9d196ebc659ad5382ea2ca5">00562</a> <span class="keyword">typedef</span> BaseIterator <a class="code" href="group__boundary.html#ga06f2faacb9d196ebc659ad5382ea2ca5">base_iterator</a>; |
| <a name="l00563"></a>00563 <span class="preprocessor"> #ifdef BOOST_LOCALE_DOXYGEN</span> |
| <a name="l00564"></a>00564 <span class="preprocessor"></span> |
| <a name="l00565"></a>00565 |
| <a name="l00566"></a>00566 |
| <a name="l00567"></a>00567 |
| <a name="l00568"></a>00568 |
| <a name="l00569"></a>00569 |
| <a name="l00570"></a>00570 |
| <a name="l00571"></a>00571 |
| <a name="l00572"></a>00572 |
| <a name="l00573"></a>00573 |
| <a name="l00574"></a>00574 |
| <a name="l00575"></a>00575 |
| <a name="l00576"></a>00576 |
| <a name="l00577"></a>00577 |
| <a name="l00578"></a><a class="code" href="group__boundary.html#gaf7a775e77dbbca3495e11d646df96fd2">00578</a> <span class="keyword">typedef</span> unspecified_iterator_type <a class="code" href="group__boundary.html#gaf7a775e77dbbca3495e11d646df96fd2">iterator</a>; |
| <a name="l00582"></a><a class="code" href="group__boundary.html#ga5f8e61b5babc3f0fa95f5fb8acae3724">00582</a> <span class="keyword">typedef</span> unspecified_iterator_type <a class="code" href="group__boundary.html#ga5f8e61b5babc3f0fa95f5fb8acae3724">const_iterator</a>; |
| <a name="l00583"></a>00583 <span class="preprocessor"> #else</span> |
| <a name="l00584"></a>00584 <span class="preprocessor"></span> <span class="keyword">typedef</span> details::segment_index_iterator<base_iterator> <a class="code" href="group__boundary.html#gaf7a775e77dbbca3495e11d646df96fd2">iterator</a>; |
| <a name="l00585"></a>00585 <span class="keyword">typedef</span> details::segment_index_iterator<base_iterator> <a class="code" href="group__boundary.html#ga5f8e61b5babc3f0fa95f5fb8acae3724">const_iterator</a>; |
| <a name="l00586"></a>00586 <span class="preprocessor"> #endif</span> |
| <a name="l00587"></a>00587 <span class="preprocessor"></span> |
| <a name="l00588"></a>00588 |
| <a name="l00589"></a>00589 |
| <a name="l00590"></a>00590 |
| <a name="l00591"></a><a class="code" href="group__boundary.html#ga067c663d18faee08adb3355701ae72ba">00591</a> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1segment.html" title="a segment object that represents a pair of two iterators that define the range where this segment exi...">segment<base_iterator></a> <a class="code" href="group__boundary.html#ga067c663d18faee08adb3355701ae72ba">value_type</a>; |
| <a name="l00592"></a>00592 |
| <a name="l00602"></a><a class="code" href="group__boundary.html#ga2c354f4cc03677b58c97038cd84dc465">00602</a> <a class="code" href="group__boundary.html#ga2c354f4cc03677b58c97038cd84dc465">segment_index</a>() : mask_(0xFFFFFFFFu),full_select_(false) |
| <a name="l00603"></a>00603 { |
| <a name="l00604"></a>00604 } |
| <a name="l00609"></a><a class="code" href="group__boundary.html#ga06ddc335e95479ec51e9b16d0f829bb3">00609</a> <a class="code" href="group__boundary.html#ga2c354f4cc03677b58c97038cd84dc465">segment_index</a>(<a class="code" href="group__boundary.html#ga15de9963ce9bb6037c8525901dfbf641">boundary_type</a> type, |
| <a name="l00610"></a>00610 <a class="code" href="group__boundary.html#ga06f2faacb9d196ebc659ad5382ea2ca5">base_iterator</a> begin, |
| <a name="l00611"></a>00611 <a class="code" href="group__boundary.html#ga06f2faacb9d196ebc659ad5382ea2ca5">base_iterator</a> end, |
| <a name="l00612"></a>00612 <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> mask, |
| <a name="l00613"></a>00613 std::locale <span class="keyword">const</span> &loc=std::locale()) |
| <a name="l00614"></a>00614 : |
| <a name="l00615"></a>00615 map_(type,begin,end,loc), |
| <a name="l00616"></a>00616 mask_(mask), |
| <a name="l00617"></a>00617 full_select_(false) |
| <a name="l00618"></a>00618 { |
| <a name="l00619"></a>00619 } |
| <a name="l00624"></a><a class="code" href="group__boundary.html#ga46a5f584d5a1a43ad4bc0fff07183fcc">00624</a> <a class="code" href="group__boundary.html#ga2c354f4cc03677b58c97038cd84dc465">segment_index</a>(<a class="code" href="group__boundary.html#ga15de9963ce9bb6037c8525901dfbf641">boundary_type</a> type, |
| <a name="l00625"></a>00625 <a class="code" href="group__boundary.html#ga06f2faacb9d196ebc659ad5382ea2ca5">base_iterator</a> begin, |
| <a name="l00626"></a>00626 <a class="code" href="group__boundary.html#ga06f2faacb9d196ebc659ad5382ea2ca5">base_iterator</a> end, |
| <a name="l00627"></a>00627 std::locale <span class="keyword">const</span> &loc=std::locale()) |
| <a name="l00628"></a>00628 : |
| <a name="l00629"></a>00629 map_(type,begin,end,loc), |
| <a name="l00630"></a>00630 mask_(0xFFFFFFFFu), |
| <a name="l00631"></a>00631 full_select_(false) |
| <a name="l00632"></a>00632 { |
| <a name="l00633"></a>00633 } |
| <a name="l00634"></a>00634 |
| <a name="l00645"></a>00645 <a class="code" href="group__boundary.html#ga2c354f4cc03677b58c97038cd84dc465">segment_index</a>(<a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html" title="This class holds an index of boundary points and allows iterating over them.">boundary_point_index<base_iterator></a> <span class="keyword">const</span> &); |
| <a name="l00656"></a>00656 <a class="code" href="classboost_1_1locale_1_1boundary_1_1segment__index.html" title="This class holds an index of segments in the text range and allows to iterate over them...">segment_index</a> <span class="keyword">const</span> &<a class="code" href="group__boundary.html#gae7941dc874ca05d2ef2a03f781c5b78a">operator = </a>(<a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html" title="This class holds an index of boundary points and allows iterating over them.">boundary_point_index<base_iterator></a> <span class="keyword">const</span> &); |
| <a name="l00657"></a>00657 |
| <a name="l00658"></a>00658 |
| <a name="l00665"></a><a class="code" href="group__boundary.html#gafa2a756b10d3522743204b45b794bb3e">00665</a> <span class="keywordtype">void</span> <a class="code" href="group__boundary.html#gafa2a756b10d3522743204b45b794bb3e">map</a>(<a class="code" href="group__boundary.html#ga15de9963ce9bb6037c8525901dfbf641">boundary_type</a> type,<a class="code" href="group__boundary.html#ga06f2faacb9d196ebc659ad5382ea2ca5">base_iterator</a> begin,<a class="code" href="group__boundary.html#ga06f2faacb9d196ebc659ad5382ea2ca5">base_iterator</a> end,std::locale <span class="keyword">const</span> &loc=std::locale()) |
| <a name="l00666"></a>00666 { |
| <a name="l00667"></a>00667 map_ = mapping_type(type,begin,end,loc); |
| <a name="l00668"></a>00668 } |
| <a name="l00669"></a>00669 |
| <a name="l00679"></a><a class="code" href="group__boundary.html#gaf74ff9c86c177efa8f74856277d659af">00679</a> <a class="code" href="group__boundary.html#gaf7a775e77dbbca3495e11d646df96fd2">iterator</a> <a class="code" href="group__boundary.html#gaf74ff9c86c177efa8f74856277d659af">begin</a>()<span class="keyword"> const</span> |
| <a name="l00680"></a>00680 <span class="keyword"> </span>{ |
| <a name="l00681"></a>00681 <span class="keywordflow">return</span> <a class="code" href="group__boundary.html#gaf7a775e77dbbca3495e11d646df96fd2">iterator</a>(<span class="keyword">true</span>,&map_,mask_,full_select_); |
| <a name="l00682"></a>00682 } |
| <a name="l00683"></a>00683 |
| <a name="l00691"></a><a class="code" href="group__boundary.html#ga8757062d2446b35675b585651c5fea9f">00691</a> <a class="code" href="group__boundary.html#gaf7a775e77dbbca3495e11d646df96fd2">iterator</a> <a class="code" href="group__boundary.html#ga8757062d2446b35675b585651c5fea9f">end</a>()<span class="keyword"> const</span> |
| <a name="l00692"></a>00692 <span class="keyword"> </span>{ |
| <a name="l00693"></a>00693 <span class="keywordflow">return</span> <a class="code" href="group__boundary.html#gaf7a775e77dbbca3495e11d646df96fd2">iterator</a>(<span class="keyword">false</span>,&map_,mask_,full_select_); |
| <a name="l00694"></a>00694 } |
| <a name="l00695"></a>00695 |
| <a name="l00713"></a><a class="code" href="group__boundary.html#ga2480236106971797460187777f2a4411">00713</a> <a class="code" href="group__boundary.html#gaf7a775e77dbbca3495e11d646df96fd2">iterator</a> <a class="code" href="group__boundary.html#ga2480236106971797460187777f2a4411">find</a>(<a class="code" href="group__boundary.html#ga06f2faacb9d196ebc659ad5382ea2ca5">base_iterator</a> p)<span class="keyword"> const</span> |
| <a name="l00714"></a>00714 <span class="keyword"> </span>{ |
| <a name="l00715"></a>00715 <span class="keywordflow">return</span> <a class="code" href="group__boundary.html#gaf7a775e77dbbca3495e11d646df96fd2">iterator</a>(p,&map_,mask_,full_select_); |
| <a name="l00716"></a>00716 } |
| <a name="l00717"></a>00717 |
| <a name="l00721"></a><a class="code" href="group__boundary.html#ga72b4ceb5bacec0eded2601c43a4d671a">00721</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="group__boundary.html#ga72b4ceb5bacec0eded2601c43a4d671a">rule</a>()<span class="keyword"> const</span> |
| <a name="l00722"></a>00722 <span class="keyword"> </span>{ |
| <a name="l00723"></a>00723 <span class="keywordflow">return</span> mask_; |
| <a name="l00724"></a>00724 } |
| <a name="l00728"></a><a class="code" href="group__boundary.html#gad19735180401edb15acbdbbeb21e5a73">00728</a> <span class="keywordtype">void</span> <a class="code" href="group__boundary.html#ga72b4ceb5bacec0eded2601c43a4d671a">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> v) |
| <a name="l00729"></a>00729 { |
| <a name="l00730"></a>00730 mask_ = v; |
| <a name="l00731"></a>00731 } |
| <a name="l00732"></a>00732 |
| <a name="l00745"></a>00745 |
| <a name="l00746"></a><a class="code" href="group__boundary.html#gace7faa10d536c85df0f2d5cac85f2bbc">00746</a> <span class="keywordtype">bool</span> <a class="code" href="group__boundary.html#gace7faa10d536c85df0f2d5cac85f2bbc">full_select</a>()<span class="keyword"> const </span> |
| <a name="l00747"></a>00747 <span class="keyword"> </span>{ |
| <a name="l00748"></a>00748 <span class="keywordflow">return</span> full_select_; |
| <a name="l00749"></a>00749 } |
| <a name="l00750"></a>00750 |
| <a name="l00763"></a>00763 |
| <a name="l00764"></a><a class="code" href="group__boundary.html#ga205fd51daa439a18527675e663a0802f">00764</a> <span class="keywordtype">void</span> <a class="code" href="group__boundary.html#gace7faa10d536c85df0f2d5cac85f2bbc">full_select</a>(<span class="keywordtype">bool</span> v) |
| <a name="l00765"></a>00765 { |
| <a name="l00766"></a>00766 full_select_ = v; |
| <a name="l00767"></a>00767 } |
| <a name="l00768"></a>00768 |
| <a name="l00769"></a>00769 <span class="keyword">private</span>: |
| <a name="l00770"></a>00770 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html" title="This class holds an index of boundary points and allows iterating over them.">boundary_point_index</a><<a class="code" href="group__boundary.html#ga06f2faacb9d196ebc659ad5382ea2ca5">base_iterator</a>>; |
| <a name="l00771"></a>00771 <span class="keyword">typedef</span> details::mapping<base_iterator> mapping_type; |
| <a name="l00772"></a>00772 mapping_type map_; |
| <a name="l00773"></a>00773 <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> mask_; |
| <a name="l00774"></a>00774 <span class="keywordtype">bool</span> full_select_; |
| <a name="l00775"></a>00775 }; |
| <a name="l00776"></a>00776 |
| <a name="l00823"></a>00823 |
| <a name="l00824"></a>00824 |
| <a name="l00825"></a>00825 <span class="keyword">template</span><<span class="keyword">typename</span> BaseIterator> |
| <a name="l00826"></a><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html">00826</a> <span class="keyword">class </span><a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html" title="This class holds an index of boundary points and allows iterating over them.">boundary_point_index</a> { |
| <a name="l00827"></a>00827 <span class="keyword">public</span>: |
| <a name="l00831"></a><a class="code" href="group__boundary.html#gab3189e2eaf4386cdf37598e0ba16cfd5">00831</a> <span class="keyword">typedef</span> BaseIterator <a class="code" href="group__boundary.html#gab3189e2eaf4386cdf37598e0ba16cfd5">base_iterator</a>; |
| <a name="l00832"></a>00832 <span class="preprocessor"> #ifdef BOOST_LOCALE_DOXYGEN</span> |
| <a name="l00833"></a>00833 <span class="preprocessor"></span> |
| <a name="l00834"></a>00834 |
| <a name="l00835"></a>00835 |
| <a name="l00836"></a>00836 |
| <a name="l00837"></a>00837 |
| <a name="l00838"></a>00838 |
| <a name="l00839"></a>00839 |
| <a name="l00840"></a>00840 |
| <a name="l00841"></a>00841 |
| <a name="l00842"></a>00842 |
| <a name="l00843"></a>00843 |
| <a name="l00844"></a>00844 |
| <a name="l00845"></a>00845 |
| <a name="l00846"></a>00846 |
| <a name="l00847"></a><a class="code" href="group__boundary.html#ga1af6e72b3c384edcebc0cf319fe97efe">00847</a> <span class="keyword">typedef</span> unspecified_iterator_type <a class="code" href="group__boundary.html#ga1af6e72b3c384edcebc0cf319fe97efe">iterator</a>; |
| <a name="l00851"></a><a class="code" href="group__boundary.html#gac9ce9158eb2fb030c1baf93376203d16">00851</a> <span class="keyword">typedef</span> unspecified_iterator_type <a class="code" href="group__boundary.html#gac9ce9158eb2fb030c1baf93376203d16">const_iterator</a>; |
| <a name="l00852"></a>00852 <span class="preprocessor"> #else</span> |
| <a name="l00853"></a>00853 <span class="preprocessor"></span> <span class="keyword">typedef</span> details::boundary_point_index_iterator<base_iterator> <a class="code" href="group__boundary.html#ga1af6e72b3c384edcebc0cf319fe97efe">iterator</a>; |
| <a name="l00854"></a>00854 <span class="keyword">typedef</span> details::boundary_point_index_iterator<base_iterator> <a class="code" href="group__boundary.html#gac9ce9158eb2fb030c1baf93376203d16">const_iterator</a>; |
| <a name="l00855"></a>00855 <span class="preprocessor"> #endif</span> |
| <a name="l00856"></a>00856 <span class="preprocessor"></span> |
| <a name="l00857"></a>00857 |
| <a name="l00858"></a>00858 |
| <a name="l00859"></a>00859 |
| <a name="l00860"></a><a class="code" href="group__boundary.html#ga7f7328a860cf485a4bd8f17658c291e1">00860</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<base_iterator></a> <a class="code" href="group__boundary.html#ga7f7328a860cf485a4bd8f17658c291e1">value_type</a>; |
| <a name="l00861"></a>00861 |
| <a name="l00871"></a><a class="code" href="group__boundary.html#gaba6993dd50ad8cf2db8921e5cf668a69">00871</a> <a class="code" href="group__boundary.html#gaba6993dd50ad8cf2db8921e5cf668a69">boundary_point_index</a>() : mask_(0xFFFFFFFFu) |
| <a name="l00872"></a>00872 { |
| <a name="l00873"></a>00873 } |
| <a name="l00874"></a>00874 |
| <a name="l00879"></a><a class="code" href="group__boundary.html#gacc189288792012cfdb21c07fddbadc4f">00879</a> <a class="code" href="group__boundary.html#gaba6993dd50ad8cf2db8921e5cf668a69">boundary_point_index</a>(<a class="code" href="group__boundary.html#ga15de9963ce9bb6037c8525901dfbf641">boundary_type</a> type, |
| <a name="l00880"></a>00880 <a class="code" href="group__boundary.html#gab3189e2eaf4386cdf37598e0ba16cfd5">base_iterator</a> begin, |
| <a name="l00881"></a>00881 <a class="code" href="group__boundary.html#gab3189e2eaf4386cdf37598e0ba16cfd5">base_iterator</a> end, |
| <a name="l00882"></a>00882 <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> mask, |
| <a name="l00883"></a>00883 std::locale <span class="keyword">const</span> &loc=std::locale()) |
| <a name="l00884"></a>00884 : |
| <a name="l00885"></a>00885 map_(type,begin,end,loc), |
| <a name="l00886"></a>00886 mask_(mask) |
| <a name="l00887"></a>00887 { |
| <a name="l00888"></a>00888 } |
| <a name="l00893"></a><a class="code" href="group__boundary.html#ga9b926379fa2fcc7f87dc067953049d69">00893</a> <a class="code" href="group__boundary.html#gaba6993dd50ad8cf2db8921e5cf668a69">boundary_point_index</a>(<a class="code" href="group__boundary.html#ga15de9963ce9bb6037c8525901dfbf641">boundary_type</a> type, |
| <a name="l00894"></a>00894 <a class="code" href="group__boundary.html#gab3189e2eaf4386cdf37598e0ba16cfd5">base_iterator</a> begin, |
| <a name="l00895"></a>00895 <a class="code" href="group__boundary.html#gab3189e2eaf4386cdf37598e0ba16cfd5">base_iterator</a> end, |
| <a name="l00896"></a>00896 std::locale <span class="keyword">const</span> &loc=std::locale()) |
| <a name="l00897"></a>00897 : |
| <a name="l00898"></a>00898 map_(type,begin,end,loc), |
| <a name="l00899"></a>00899 mask_(0xFFFFFFFFu) |
| <a name="l00900"></a>00900 { |
| <a name="l00901"></a>00901 } |
| <a name="l00902"></a>00902 |
| <a name="l00913"></a>00913 <a class="code" href="group__boundary.html#gaba6993dd50ad8cf2db8921e5cf668a69">boundary_point_index</a>(<a class="code" href="classboost_1_1locale_1_1boundary_1_1segment__index.html" title="This class holds an index of segments in the text range and allows to iterate over them...">segment_index<base_iterator></a> <span class="keyword">const</span> &other); |
| <a name="l00924"></a>00924 <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html" title="This class holds an index of boundary points and allows iterating over them.">boundary_point_index</a> <span class="keyword">const</span> &<a class="code" href="group__boundary.html#ga83d57b993b00686b2cac711667c6a931">operator=</a>(<a class="code" href="classboost_1_1locale_1_1boundary_1_1segment__index.html" title="This class holds an index of segments in the text range and allows to iterate over them...">segment_index<base_iterator></a> <span class="keyword">const</span> &other); |
| <a name="l00925"></a>00925 |
| <a name="l00932"></a><a class="code" href="group__boundary.html#ga6b4b5d5cf80b55302a88e7b36c812418">00932</a> <span class="keywordtype">void</span> <a class="code" href="group__boundary.html#ga6b4b5d5cf80b55302a88e7b36c812418">map</a>(<a class="code" href="group__boundary.html#ga15de9963ce9bb6037c8525901dfbf641">boundary_type</a> type,<a class="code" href="group__boundary.html#gab3189e2eaf4386cdf37598e0ba16cfd5">base_iterator</a> begin,<a class="code" href="group__boundary.html#gab3189e2eaf4386cdf37598e0ba16cfd5">base_iterator</a> end,std::locale <span class="keyword">const</span> &loc=std::locale()) |
| <a name="l00933"></a>00933 { |
| <a name="l00934"></a>00934 map_ = mapping_type(type,begin,end,loc); |
| <a name="l00935"></a>00935 } |
| <a name="l00936"></a>00936 |
| <a name="l00946"></a><a class="code" href="group__boundary.html#ga56f42a32f0378b6e157671f9e17bd66f">00946</a> <a class="code" href="group__boundary.html#ga1af6e72b3c384edcebc0cf319fe97efe">iterator</a> <a class="code" href="group__boundary.html#ga56f42a32f0378b6e157671f9e17bd66f">begin</a>()<span class="keyword"> const</span> |
| <a name="l00947"></a>00947 <span class="keyword"> </span>{ |
| <a name="l00948"></a>00948 <span class="keywordflow">return</span> <a class="code" href="group__boundary.html#ga1af6e72b3c384edcebc0cf319fe97efe">iterator</a>(<span class="keyword">true</span>,&map_,mask_); |
| <a name="l00949"></a>00949 } |
| <a name="l00950"></a>00950 |
| <a name="l00960"></a><a class="code" href="group__boundary.html#gaf3d66d578e32a63b3f0ffbb59740667b">00960</a> <a class="code" href="group__boundary.html#ga1af6e72b3c384edcebc0cf319fe97efe">iterator</a> <a class="code" href="group__boundary.html#gaf3d66d578e32a63b3f0ffbb59740667b">end</a>()<span class="keyword"> const</span> |
| <a name="l00961"></a>00961 <span class="keyword"> </span>{ |
| <a name="l00962"></a>00962 <span class="keywordflow">return</span> <a class="code" href="group__boundary.html#ga1af6e72b3c384edcebc0cf319fe97efe">iterator</a>(<span class="keyword">false</span>,&map_,mask_); |
| <a name="l00963"></a>00963 } |
| <a name="l00964"></a>00964 |
| <a name="l00978"></a><a class="code" href="group__boundary.html#ga0bb71a287afca990e85b17246568492d">00978</a> <a class="code" href="group__boundary.html#ga1af6e72b3c384edcebc0cf319fe97efe">iterator</a> <a class="code" href="group__boundary.html#ga0bb71a287afca990e85b17246568492d">find</a>(<a class="code" href="group__boundary.html#gab3189e2eaf4386cdf37598e0ba16cfd5">base_iterator</a> p)<span class="keyword"> const</span> |
| <a name="l00979"></a>00979 <span class="keyword"> </span>{ |
| <a name="l00980"></a>00980 <span class="keywordflow">return</span> <a class="code" href="group__boundary.html#ga1af6e72b3c384edcebc0cf319fe97efe">iterator</a>(p,&map_,mask_); |
| <a name="l00981"></a>00981 } |
| <a name="l00982"></a>00982 |
| <a name="l00986"></a><a class="code" href="group__boundary.html#ga1d214029f1a780b7bf6e3f23a3004c03">00986</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="group__boundary.html#ga1d214029f1a780b7bf6e3f23a3004c03">rule</a>()<span class="keyword"> const</span> |
| <a name="l00987"></a>00987 <span class="keyword"> </span>{ |
| <a name="l00988"></a>00988 <span class="keywordflow">return</span> mask_; |
| <a name="l00989"></a>00989 } |
| <a name="l00993"></a><a class="code" href="group__boundary.html#ga56e63913f51109e05a24a7136472a975">00993</a> <span class="keywordtype">void</span> <a class="code" href="group__boundary.html#ga1d214029f1a780b7bf6e3f23a3004c03">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> v) |
| <a name="l00994"></a>00994 { |
| <a name="l00995"></a>00995 mask_ = v; |
| <a name="l00996"></a>00996 } |
| <a name="l00997"></a>00997 |
| <a name="l00998"></a>00998 <span class="keyword">private</span>: |
| <a name="l00999"></a>00999 |
| <a name="l01000"></a>01000 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classboost_1_1locale_1_1boundary_1_1segment__index.html" title="This class holds an index of segments in the text range and allows to iterate over them...">segment_index</a><<a class="code" href="group__boundary.html#gab3189e2eaf4386cdf37598e0ba16cfd5">base_iterator</a>>; |
| <a name="l01001"></a>01001 <span class="keyword">typedef</span> details::mapping<base_iterator> mapping_type; |
| <a name="l01002"></a>01002 mapping_type map_; |
| <a name="l01003"></a>01003 <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> mask_; |
| <a name="l01004"></a>01004 }; |
| <a name="l01005"></a>01005 |
| <a name="l01007"></a>01007 <span class="keyword">template</span><<span class="keyword">typename</span> BaseIterator> |
| <a name="l01008"></a>01008 <a class="code" href="group__boundary.html#ga2c354f4cc03677b58c97038cd84dc465">segment_index<BaseIterator>::segment_index</a>(boundary_point_index<BaseIterator> <span class="keyword">const</span> &other) : |
| <a name="l01009"></a>01009 map_(other.map_), |
| <a name="l01010"></a>01010 mask_(0xFFFFFFFFu), |
| <a name="l01011"></a>01011 full_select_(false) |
| <a name="l01012"></a>01012 { |
| <a name="l01013"></a>01013 } |
| <a name="l01014"></a>01014 |
| <a name="l01015"></a>01015 <span class="keyword">template</span><<span class="keyword">typename</span> BaseIterator> |
| <a name="l01016"></a>01016 <a class="code" href="group__boundary.html#gaba6993dd50ad8cf2db8921e5cf668a69">boundary_point_index<BaseIterator>::boundary_point_index</a>(segment_index<BaseIterator> <span class="keyword">const</span> &other) : |
| <a name="l01017"></a>01017 map_(other.map_), |
| <a name="l01018"></a>01018 mask_(0xFFFFFFFFu) |
| <a name="l01019"></a>01019 { |
| <a name="l01020"></a>01020 } |
| <a name="l01021"></a>01021 |
| <a name="l01022"></a>01022 <span class="keyword">template</span><<span class="keyword">typename</span> BaseIterator> |
| <a name="l01023"></a>01023 segment_index<BaseIterator> <span class="keyword">const</span> &<a class="code" href="group__boundary.html#gae7941dc874ca05d2ef2a03f781c5b78a">segment_index<BaseIterator>::operator=</a>(boundary_point_index<BaseIterator> <span class="keyword">const</span> &other) |
| <a name="l01024"></a>01024 { |
| <a name="l01025"></a>01025 map_ = other.map_; |
| <a name="l01026"></a>01026 <span class="keywordflow">return</span> *<span class="keyword">this</span>; |
| <a name="l01027"></a>01027 } |
| <a name="l01028"></a>01028 |
| <a name="l01029"></a>01029 <span class="keyword">template</span><<span class="keyword">typename</span> BaseIterator> |
| <a name="l01030"></a>01030 boundary_point_index<BaseIterator> <span class="keyword">const</span> &<a class="code" href="group__boundary.html#ga83d57b993b00686b2cac711667c6a931">boundary_point_index<BaseIterator>::operator=</a>(segment_index<BaseIterator> <span class="keyword">const</span> &other) |
| <a name="l01031"></a>01031 { |
| <a name="l01032"></a>01032 map_ = other.map_; |
| <a name="l01033"></a>01033 <span class="keywordflow">return</span> *<span class="keyword">this</span>; |
| <a name="l01034"></a>01034 } |
| <a name="l01036"></a>01036 |
| <a name="l01037"></a><a class="code" href="group__boundary.html#gad4785439a3f03ee455c93830b8f1366c">01037</a> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1segment__index.html" title="This class holds an index of segments in the text range and allows to iterate over them...">segment_index<std::string::const_iterator></a> <a class="code" href="group__boundary.html#gad4785439a3f03ee455c93830b8f1366c">ssegment_index</a>; |
| <a name="l01038"></a><a class="code" href="group__boundary.html#ga579cfdfccf9c682ac4dae5fb65d4a843">01038</a> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1segment__index.html" title="This class holds an index of segments in the text range and allows to iterate over them...">segment_index<std::wstring::const_iterator></a> <a class="code" href="group__boundary.html#ga579cfdfccf9c682ac4dae5fb65d4a843" title="convenience typedef">wssegment_index</a>; |
| <a name="l01039"></a>01039 <span class="preprocessor"> #ifdef BOOST_HAS_CHAR16_T</span> |
| <a name="l01040"></a><a class="code" href="group__boundary.html#ga6fff9ef7a0971ed3c686f3e8d5c56bf4">01040</a> <span class="preprocessor"></span> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1segment__index.html" title="This class holds an index of segments in the text range and allows to iterate over them...">segment_index<std::u16string::const_iterator></a> <a class="code" href="group__boundary.html#ga6fff9ef7a0971ed3c686f3e8d5c56bf4" title="convenience typedef">u16ssegment_index</a>; |
| <a name="l01041"></a>01041 <span class="preprocessor"> #endif</span> |
| <a name="l01042"></a>01042 <span class="preprocessor"></span><span class="preprocessor"> #ifdef BOOST_HAS_CHAR32_T</span> |
| <a name="l01043"></a><a class="code" href="group__boundary.html#ga3a7b82f5a7e29bd079dd48ca13b79f20">01043</a> <span class="preprocessor"></span> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1segment__index.html" title="This class holds an index of segments in the text range and allows to iterate over them...">segment_index<std::u32string::const_iterator></a> <a class="code" href="group__boundary.html#ga3a7b82f5a7e29bd079dd48ca13b79f20" title="convenience typedef">u32ssegment_index</a>; |
| <a name="l01044"></a>01044 <span class="preprocessor"> #endif</span> |
| <a name="l01045"></a>01045 <span class="preprocessor"></span> |
| <a name="l01046"></a><a class="code" href="group__boundary.html#ga82c153957bff0be844a5ce4490d4e7f8">01046</a> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1segment__index.html" title="This class holds an index of segments in the text range and allows to iterate over them...">segment_index<char const *></a> <a class="code" href="group__boundary.html#ga82c153957bff0be844a5ce4490d4e7f8" title="convenience typedef">csegment_index</a>; |
| <a name="l01047"></a><a class="code" href="group__boundary.html#ga29ce0d14d0466a28c205b5dc9d0d6a36">01047</a> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1segment__index.html" title="This class holds an index of segments in the text range and allows to iterate over them...">segment_index<wchar_t const *></a> <a class="code" href="group__boundary.html#ga29ce0d14d0466a28c205b5dc9d0d6a36" title="convenience typedef">wcsegment_index</a>; |
| <a name="l01048"></a>01048 <span class="preprocessor"> #ifdef BOOST_HAS_CHAR16_T</span> |
| <a name="l01049"></a><a class="code" href="group__boundary.html#gaa20a99d93e3202680bb0660481e1d414">01049</a> <span class="preprocessor"></span> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1segment__index.html" title="This class holds an index of segments in the text range and allows to iterate over them...">segment_index<char16_t const *></a> <a class="code" href="group__boundary.html#gaa20a99d93e3202680bb0660481e1d414" title="convenience typedef">u16csegment_index</a>; |
| <a name="l01050"></a>01050 <span class="preprocessor"> #endif</span> |
| <a name="l01051"></a>01051 <span class="preprocessor"></span><span class="preprocessor"> #ifdef BOOST_HAS_CHAR32_T</span> |
| <a name="l01052"></a><a class="code" href="group__boundary.html#gaacc781106af79ec27693fa8012d54cb9">01052</a> <span class="preprocessor"></span> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1segment__index.html" title="This class holds an index of segments in the text range and allows to iterate over them...">segment_index<char32_t const *></a> <a class="code" href="group__boundary.html#gaacc781106af79ec27693fa8012d54cb9" title="convenience typedef">u32csegment_index</a>; |
| <a name="l01053"></a>01053 <span class="preprocessor"> #endif</span> |
| <a name="l01054"></a>01054 <span class="preprocessor"></span> |
| <a name="l01055"></a><a class="code" href="group__boundary.html#ga485e82cdd9debd15dc4fd6f57be10727">01055</a> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html" title="This class holds an index of boundary points and allows iterating over them.">boundary_point_index<std::string::const_iterator></a> <a class="code" href="group__boundary.html#ga485e82cdd9debd15dc4fd6f57be10727" title="convenience typedef">sboundary_point_index</a>; |
| <a name="l01056"></a><a class="code" href="group__boundary.html#gad539aad8c788c8e90cdf08aeed5df4a3">01056</a> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html" title="This class holds an index of boundary points and allows iterating over them.">boundary_point_index<std::wstring::const_iterator></a> <a class="code" href="group__boundary.html#gad539aad8c788c8e90cdf08aeed5df4a3" title="convenience typedef">wsboundary_point_index</a>; |
| <a name="l01057"></a>01057 <span class="preprocessor"> #ifdef BOOST_HAS_CHAR16_T</span> |
| <a name="l01058"></a><a class="code" href="group__boundary.html#gaba43501d4ed1922c9446db3bf14a918f">01058</a> <span class="preprocessor"></span> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html" title="This class holds an index of boundary points and allows iterating over them.">boundary_point_index<std::u16string::const_iterator></a> <a class="code" href="group__boundary.html#gaba43501d4ed1922c9446db3bf14a918f" title="convenience typedef">u16sboundary_point_index</a>; |
| <a name="l01059"></a>01059 <span class="preprocessor"> #endif</span> |
| <a name="l01060"></a>01060 <span class="preprocessor"></span><span class="preprocessor"> #ifdef BOOST_HAS_CHAR32_T</span> |
| <a name="l01061"></a><a class="code" href="group__boundary.html#ga1379f8968dd611be0b59d04218a1aae8">01061</a> <span class="preprocessor"></span> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html" title="This class holds an index of boundary points and allows iterating over them.">boundary_point_index<std::u32string::const_iterator></a> <a class="code" href="group__boundary.html#ga1379f8968dd611be0b59d04218a1aae8" title="convenience typedef">u32sboundary_point_index</a>; |
| <a name="l01062"></a>01062 <span class="preprocessor"> #endif</span> |
| <a name="l01063"></a>01063 <span class="preprocessor"></span> |
| <a name="l01064"></a><a class="code" href="group__boundary.html#ga31f0617de9388783205020a8679b40af">01064</a> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html" title="This class holds an index of boundary points and allows iterating over them.">boundary_point_index<char const *></a> <a class="code" href="group__boundary.html#ga31f0617de9388783205020a8679b40af" title="convenience typedef">cboundary_point_index</a>; |
| <a name="l01065"></a><a class="code" href="group__boundary.html#gabcb5bcc788909afeb8c68d857284cb59">01065</a> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html" title="This class holds an index of boundary points and allows iterating over them.">boundary_point_index<wchar_t const *></a> <a class="code" href="group__boundary.html#gabcb5bcc788909afeb8c68d857284cb59" title="convenience typedef">wcboundary_point_index</a>; |
| <a name="l01066"></a>01066 <span class="preprocessor"> #ifdef BOOST_HAS_CHAR16_T</span> |
| <a name="l01067"></a><a class="code" href="group__boundary.html#ga1a89414f77d0b11b7fa8c3a5fa896266">01067</a> <span class="preprocessor"></span> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html" title="This class holds an index of boundary points and allows iterating over them.">boundary_point_index<char16_t const *></a> <a class="code" href="group__boundary.html#ga1a89414f77d0b11b7fa8c3a5fa896266" title="convenience typedef">u16cboundary_point_index</a>; |
| <a name="l01068"></a>01068 <span class="preprocessor"> #endif</span> |
| <a name="l01069"></a>01069 <span class="preprocessor"></span><span class="preprocessor"> #ifdef BOOST_HAS_CHAR32_T</span> |
| <a name="l01070"></a><a class="code" href="group__boundary.html#ga1d16a23d328240464f9068cf58fb38d7">01070</a> <span class="preprocessor"></span> <span class="keyword">typedef</span> <a class="code" href="classboost_1_1locale_1_1boundary_1_1boundary__point__index.html" title="This class holds an index of boundary points and allows iterating over them.">boundary_point_index<char32_t const *></a> <a class="code" href="group__boundary.html#ga1d16a23d328240464f9068cf58fb38d7" title="convenience typedef">u32cboundary_point_index</a>; |
| <a name="l01071"></a>01071 <span class="preprocessor"> #endif</span> |
| <a name="l01072"></a>01072 <span class="preprocessor"></span> |
| <a name="l01073"></a>01073 |
| <a name="l01074"></a>01074 |
| <a name="l01075"></a>01075 } <span class="comment">// boundary</span> |
| <a name="l01076"></a>01076 |
| <a name="l01077"></a>01077 } <span class="comment">// locale</span> |
| <a name="l01078"></a>01078 } <span class="comment">// boost</span> |
| <a name="l01079"></a>01079 |
| <a name="l01086"></a>01086 |
| <a name="l01087"></a>01087 <span class="preprocessor">#ifdef BOOST_MSVC</span> |
| <a name="l01088"></a>01088 <span class="preprocessor"></span><span class="preprocessor">#pragma warning(pop)</span> |
| <a name="l01089"></a>01089 <span class="preprocessor"></span><span class="preprocessor">#endif</span> |
| <a name="l01090"></a>01090 <span class="preprocessor"></span> |
| <a name="l01091"></a>01091 <span class="preprocessor">#endif</span> |
| <a name="l01092"></a>01092 <span class="preprocessor"></span><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>index.hpp</b> </li> |
| |
| <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> |