Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/doc/html/split_iterator.html @ 12

Last change on this file since 12 was 12, checked in by landauf, 18 years ago

added boost

File size: 8.1 KB
Line 
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4<title>Class template split_iterator</title>
5<link rel="stylesheet" href="boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
7<link rel="start" href="index.html" title="The Boost C++ Libraries">
8<link rel="up" href="string_algo/reference.html#id2382464" title="Header &lt;boost/algorithm/string/find_iterator.hpp&gt;">
9<link rel="prev" href="find_iterator.html" title="Class template find_iterator">
10<link rel="next" href="make_find_iterator.html" title="Function template make_find_iterator">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%">
14<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
15<td align="center"><a href="../../index.htm">Home</a></td>
16<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="../../people/people.htm">People</a></td>
18<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
19<td align="center"><a href="../../more/index.htm">More</a></td>
20</table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="find_iterator.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="string_algo/reference.html#id2382464"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="make_find_iterator.html"><img src="images/next.png" alt="Next"></a>
24</div>
25<div class="refentry" lang="en">
26<a name="split_iterator"></a><div class="titlepage"></div>
27<div class="refnamediv">
28<h2><span class="refentrytitle">Class template split_iterator</span></h2>
29<p>boost::algorithm::split_iterator &#8212; split_iterator </p>
30</div>
31<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
32<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> IteratorT&gt; 
33<span class="bold"><strong>class</strong></span> split_iterator {
34<span class="bold"><strong>public</strong></span>:
35  <span class="emphasis"><em>// <a href="split_iterator.html#split_iteratorconstruct-copy-destruct">construct/copy/destruct</a></em></span>
36  <a href="split_iterator.html#id2548798-bb">split_iterator</a>();
37  <a href="split_iterator.html#id2514532-bb">split_iterator</a>(<span class="bold"><strong>const</strong></span> <a href="split_iterator.html" title="Class template split_iterator">split_iterator</a> &amp;);
38  <span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> FinderT&gt; <a href="split_iterator.html#id2557094-bb">split_iterator</a>(IteratorT, IteratorT, FinderT);
39  <span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> FinderT, <span class="bold"><strong>typename</strong></span> RangeT&gt; 
40    <a href="split_iterator.html#id2354058-bb">split_iterator</a>(RangeT &amp;, FinderT);
41
42  <span class="emphasis"><em>// <a href="split_iterator.html#id2376392-bb">public member functions</a></em></span>
43  <span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="split_iterator.html#id2376396-bb">eof</a>() <span class="bold"><strong>const</strong></span>;
44
45  <span class="emphasis"><em>// <a href="split_iterator.html#id2356464-bb">private member functions</a></em></span>
46  <span class="type"><span class="bold"><strong>const</strong></span> match_type &amp;</span> <a href="split_iterator.html#id2356468-bb">dereference</a>() <span class="bold"><strong>const</strong></span>;
47  <span class="type"><span class="bold"><strong>void</strong></span></span> <a href="split_iterator.html#id2570325-bb">increment</a>() ;
48  <span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="split_iterator.html#id2371940-bb">equal</a>(<span class="bold"><strong>const</strong></span> <a href="split_iterator.html" title="Class template split_iterator">split_iterator</a> &amp;) <span class="bold"><strong>const</strong></span>;
49};</pre></div>
50<div class="refsect1" lang="en">
51<a name="id2758612"></a><h2>Description</h2>
52<p>Split iterator encapsulates a Finder and allows for incremental searching in a string. Unlike the find iterator, split iterator iterates through gaps between matches.</p>
53<p>Find iterator is a readable forward traversal iterator.</p>
54<p>Dereferencing the iterator yields an iterator_range delimiting the current match. </p>
55<div class="refsect2" lang="en">
56<a name="id2758627"></a><h3>
57<a name="split_iteratorconstruct-copy-destruct"></a><code class="computeroutput">split_iterator</code> construct/copy/destruct</h3>
58<div class="orderedlist"><ol type="1">
59<li>
60<pre class="literallayout"><a name="id2548798-bb"></a>split_iterator();</pre>
61<p>Construct null iterator. All null iterators are equal.</p>
62<p></p>
63<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Postconditions</span></b>:
64
65    eof()==true </p>
66</li>
67<li>
68<pre class="literallayout"><a name="id2514532-bb"></a>split_iterator(<span class="bold"><strong>const</strong></span> <a href="split_iterator.html" title="Class template split_iterator">split_iterator</a> &amp; Other);</pre>
69<p>Construct a copy of the split_iterator </p>
70</li>
71<li>
72<pre class="literallayout"><span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> FinderT&gt; 
73  <a name="id2557094-bb"></a>split_iterator(IteratorT Begin, IteratorT End, FinderT Finder);</pre>
74<p>Construct new split_iterator for a given finder and a range. </p>
75</li>
76<li>
77<pre class="literallayout"><span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> FinderT, <span class="bold"><strong>typename</strong></span> RangeT&gt; 
78  <a name="id2354058-bb"></a>split_iterator(RangeT &amp; Col, FinderT Finder);</pre>
79<p>Construct new split_iterator for a given finder and a collection. </p>
80</li>
81</ol></div>
82</div>
83<div class="refsect2" lang="en">
84<a name="id2758773"></a><h3>
85<a name="id2376392-bb"></a><code class="computeroutput">split_iterator</code> public member functions</h3>
86<div class="orderedlist"><ol type="1"><li>
87<pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id2376396-bb"></a>eof() <span class="bold"><strong>const</strong></span>;</pre>
88<p>Check the eof condition. Eof condition means that there is nothing more to be searched i.e. find_iterator is after the last match. </p>
89</li></ol></div>
90</div>
91<div class="refsect2" lang="en">
92<a name="id2758822"></a><h3>
93<a name="id2356464-bb"></a><code class="computeroutput">split_iterator</code> private member functions</h3>
94<div class="orderedlist"><ol type="1">
95<li><pre class="literallayout"><span class="type"><span class="bold"><strong>const</strong></span> match_type &amp;</span> <a name="id2356468-bb"></a>dereference() <span class="bold"><strong>const</strong></span>;</pre></li>
96<li><pre class="literallayout"><span class="type"><span class="bold"><strong>void</strong></span></span> <a name="id2570325-bb"></a>increment() ;</pre></li>
97<li><pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id2371940-bb"></a>equal(<span class="bold"><strong>const</strong></span> <a href="split_iterator.html" title="Class template split_iterator">split_iterator</a> &amp; Other) <span class="bold"><strong>const</strong></span>;</pre></li>
98</ol></div>
99</div>
100</div>
101</div>
102<table width="100%"><tr>
103<td align="left"></td>
104<td align="right"><small>Copyright © 2002-2004 Pavol Droba</small></td>
105</tr></table>
106<hr>
107<div class="spirit-nav">
108<a accesskey="p" href="find_iterator.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="string_algo/reference.html#id2382464"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="make_find_iterator.html"><img src="images/next.png" alt="Next"></a>
109</div>
110</body>
111</html>
Note: See TracBrowser for help on using the repository browser.