• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html>
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5<title>Class template find_iterator</title>
6<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
7<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
8<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
9<link rel="up" href="../../string_algo/reference.html#header.boost.algorithm.string.find_iterator_hpp" title="Header &lt;boost/algorithm/string/find_iterator.hpp&gt;">
10<link rel="prev" href="find_format_all.html" title="Function template find_format_all">
11<link rel="next" href="split_iterator.html" title="Class template split_iterator">
12</head>
13<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
14<table cellpadding="2" width="100%"><tr>
15<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
16<td align="center"><a href="../../../../index.html">Home</a></td>
17<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
18<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
19<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
20<td align="center"><a href="../../../../more/index.htm">More</a></td>
21</tr></table>
22<hr>
23<div class="spirit-nav">
24<a accesskey="p" href="find_format_all.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../string_algo/reference.html#header.boost.algorithm.string.find_iterator_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="split_iterator.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
25</div>
26<div class="refentry">
27<a name="boost.algorithm.find_iterator"></a><div class="titlepage"></div>
28<div class="refnamediv">
29<h2><span class="refentrytitle">Class template find_iterator</span></h2>
30<p>boost::algorithm::find_iterator — <a class="link" href="find_iterator.html" title="Class template find_iterator">find_iterator</a></p>
31</div>
32<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
33<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../string_algo/reference.html#header.boost.algorithm.string.find_iterator_hpp" title="Header &lt;boost/algorithm/string/find_iterator.hpp&gt;">boost/algorithm/string/find_iterator.hpp</a>&gt;
34
35</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> IteratorT<span class="special">&gt;</span>
36<span class="keyword">class</span> <a class="link" href="find_iterator.html" title="Class template find_iterator">find_iterator</a> <span class="special">:</span> <span class="keyword">public</span> iterator_facade&lt; find_iterator&lt; IteratorT &gt;, const iterator_range&lt; IteratorT &gt;, forward_traversal_tag &gt;
37<span class="special">{</span>
38<span class="keyword">public</span><span class="special">:</span>
39  <span class="comment">// <a class="link" href="find_iterator.html#boost.algorithm.find_iteratorconstruct-copy-destruct">construct/copy/destruct</a></span>
40  <a class="link" href="find_iterator.html#id-1_3_3_9_10_2_1_1_6-bb"><span class="identifier">find_iterator</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
41  <a class="link" href="find_iterator.html#id-1_3_3_9_10_2_1_1_7-bb"><span class="identifier">find_iterator</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="find_iterator.html" title="Class template find_iterator">find_iterator</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
42  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> FinderT<span class="special">&gt;</span> <a class="link" href="find_iterator.html#id-1_3_3_9_10_2_1_1_8-bb"><span class="identifier">find_iterator</span></a><span class="special">(</span><span class="identifier">IteratorT</span><span class="special">,</span> <span class="identifier">IteratorT</span><span class="special">,</span> <span class="identifier">FinderT</span><span class="special">)</span><span class="special">;</span>
43  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> FinderT<span class="special">,</span> <span class="keyword">typename</span> RangeT<span class="special">&gt;</span> <a class="link" href="find_iterator.html#id-1_3_3_9_10_2_1_1_9-bb"><span class="identifier">find_iterator</span></a><span class="special">(</span><span class="identifier">RangeT</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">FinderT</span><span class="special">)</span><span class="special">;</span>
44
45  <span class="comment">// <a class="link" href="find_iterator.html#id-1_3_3_9_10_2_1_1_5-bb">public member functions</a></span>
46  <span class="keyword">bool</span> <a class="link" href="find_iterator.html#id-1_3_3_9_10_2_1_1_5_1-bb"><span class="identifier">eof</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
47
48  <span class="comment">// <a class="link" href="find_iterator.html#id-1_3_3_9_10_2_1_1_10-bb">private member functions</a></span>
49  <span class="keyword">const</span> <span class="identifier">match_type</span> <span class="special">&amp;</span> <a class="link" href="find_iterator.html#id-1_3_3_9_10_2_1_1_10_1-bb"><span class="identifier">dereference</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
50  <span class="keyword">void</span> <a class="link" href="find_iterator.html#id-1_3_3_9_10_2_1_1_10_2-bb"><span class="identifier">increment</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
51  <span class="keyword">bool</span> <a class="link" href="find_iterator.html#id-1_3_3_9_10_2_1_1_10_3-bb"><span class="identifier">equal</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="find_iterator.html" title="Class template find_iterator">find_iterator</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
52<span class="special">}</span><span class="special">;</span></pre></div>
53<div class="refsect1">
54<a name="id-1.3.3.9.11.4.4"></a><h2>Description</h2>
55<p>Find iterator encapsulates a Finder and allows for incremental searching in a string. Each increment moves the iterator to the next match.</p>
56<p>Find iterator is a readable forward traversal iterator.</p>
57<p>Dereferencing the iterator yields an iterator_range delimiting the current match. </p>
58<div class="refsect2">
59<a name="id-1.3.3.9.11.4.4.5"></a><h3>
60<a name="boost.algorithm.find_iteratorconstruct-copy-destruct"></a><code class="computeroutput">find_iterator</code>
61        public
62       construct/copy/destruct</h3>
63<div class="orderedlist"><ol class="orderedlist" type="1">
64<li class="listitem">
65<pre class="literallayout"><a name="id-1_3_3_9_10_2_1_1_6-bb"></a><span class="identifier">find_iterator</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>Default constructor. <p>Construct null iterator. All null iterators are equal.</p>
66<p>
67</p>
68<div class="variablelist"><table border="0" class="variablelist compact">
69<colgroup>
70<col align="left" valign="top">
71<col>
72</colgroup>
73<tbody><tr>
74<td><p><span class="term">Postconditions:</span></p></td>
75<td><p>eof()==true </p></td>
76</tr></tbody>
77</table></div>
78</li>
79<li class="listitem">
80<pre class="literallayout"><a name="id-1_3_3_9_10_2_1_1_7-bb"></a><span class="identifier">find_iterator</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="find_iterator.html" title="Class template find_iterator">find_iterator</a> <span class="special">&amp;</span> Other<span class="special">)</span><span class="special">;</span></pre>Copy constructor. <p>Construct a copy of the <code class="computeroutput"><a class="link" href="find_iterator.html" title="Class template find_iterator">find_iterator</a></code> </p>
81</li>
82<li class="listitem">
83<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> FinderT<span class="special">&gt;</span>
84  <a name="id-1_3_3_9_10_2_1_1_8-bb"></a><span class="identifier">find_iterator</span><span class="special">(</span><span class="identifier">IteratorT</span> Begin<span class="special">,</span> <span class="identifier">IteratorT</span> End<span class="special">,</span> <span class="identifier">FinderT</span> Finder<span class="special">)</span><span class="special">;</span></pre>Constructor. <p>Construct new <code class="computeroutput"><a class="link" href="find_iterator.html" title="Class template find_iterator">find_iterator</a></code> for a given finder and a range. </p>
85</li>
86<li class="listitem">
87<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> FinderT<span class="special">,</span> <span class="keyword">typename</span> RangeT<span class="special">&gt;</span>
88  <a name="id-1_3_3_9_10_2_1_1_9-bb"></a><span class="identifier">find_iterator</span><span class="special">(</span><span class="identifier">RangeT</span> <span class="special">&amp;</span> Col<span class="special">,</span> <span class="identifier">FinderT</span> Finder<span class="special">)</span><span class="special">;</span></pre>Constructor. <p>Construct new <code class="computeroutput"><a class="link" href="find_iterator.html" title="Class template find_iterator">find_iterator</a></code> for a given finder and a range. </p>
89</li>
90</ol></div>
91</div>
92<div class="refsect2">
93<a name="id-1.3.3.9.11.4.4.6"></a><h3>
94<a name="id-1_3_3_9_10_2_1_1_5-bb"></a><code class="computeroutput">find_iterator</code> public member functions</h3>
95<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
96<pre class="literallayout"><span class="keyword">bool</span> <a name="id-1_3_3_9_10_2_1_1_5_1-bb"></a><span class="identifier">eof</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>Eof check. <p>Check the eof condition. Eof condition means that there is nothing more to be searched i.e. <code class="computeroutput"><a class="link" href="find_iterator.html" title="Class template find_iterator">find_iterator</a></code> is after the last match. </p>
97</li></ol></div>
98</div>
99<div class="refsect2">
100<a name="id-1.3.3.9.11.4.4.7"></a><h3>
101<a name="id-1_3_3_9_10_2_1_1_10-bb"></a><code class="computeroutput">find_iterator</code> private member functions</h3>
102<div class="orderedlist"><ol class="orderedlist" type="1">
103<li class="listitem"><pre class="literallayout"><span class="keyword">const</span> <span class="identifier">match_type</span> <span class="special">&amp;</span> <a name="id-1_3_3_9_10_2_1_1_10_1-bb"></a><span class="identifier">dereference</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
104<li class="listitem"><pre class="literallayout"><span class="keyword">void</span> <a name="id-1_3_3_9_10_2_1_1_10_2-bb"></a><span class="identifier">increment</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li>
105<li class="listitem"><pre class="literallayout"><span class="keyword">bool</span> <a name="id-1_3_3_9_10_2_1_1_10_3-bb"></a><span class="identifier">equal</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="find_iterator.html" title="Class template find_iterator">find_iterator</a> <span class="special">&amp;</span> Other<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
106</ol></div>
107</div>
108</div>
109</div>
110<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
111<td align="left"></td>
112<td align="right"><div class="copyright-footer">Copyright © 2002-2004 Pavol Droba<p>Use, modification and distribution is subject to the Boost
113                Software License, Version 1.0. (See accompanying file
114                <code class="filename">LICENSE_1_0.txt</code> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
115            </p>
116</div></td>
117</tr></table>
118<hr>
119<div class="spirit-nav">
120<a accesskey="p" href="find_format_all.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../string_algo/reference.html#header.boost.algorithm.string.find_iterator_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="split_iterator.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
121</div>
122</body>
123</html>
124