| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> |
| <title>Struct template regex_iterator</title> |
| <link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css"> |
| <meta name="generator" content="DocBook XSL Stylesheets V1.75.2"> |
| <link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> |
| <link rel="up" href="../../xpressive/reference.html#header.boost.xpressive.regex_iterator_hpp" title="Header <boost/xpressive/regex_iterator.hpp>"> |
| <link rel="prev" href="../../BOOST_XPR_ENSURE_.html" title="Macro BOOST_XPR_ENSURE_"> |
| <link rel="next" href="mark_tag.html" title="Struct mark_tag"> |
| </head> |
| <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| <table cellpadding="2" width="100%"><tr> |
| <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td> |
| <td align="center"><a href="../../../../index.html">Home</a></td> |
| <td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td> |
| <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> |
| <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> |
| <td align="center"><a href="../../../../more/index.htm">More</a></td> |
| </tr></table> |
| <hr> |
| <div class="spirit-nav"> |
| <a accesskey="p" href="../../BOOST_XPR_ENSURE_.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../xpressive/reference.html#header.boost.xpressive.regex_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="mark_tag.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> |
| </div> |
| <div class="refentry"> |
| <a name="boost.xpressive.regex_iterator"></a><div class="titlepage"></div> |
| <div class="refnamediv"> |
| <h2><span class="refentrytitle">Struct template regex_iterator</span></h2> |
| <p>boost::xpressive::regex_iterator</p> |
| </div> |
| <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> |
| <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: <<a class="link" href="../../xpressive/reference.html#header.boost.xpressive.regex_iterator_hpp" title="Header <boost/xpressive/regex_iterator.hpp>">boost/xpressive/regex_iterator.hpp</a>> |
| |
| </span><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> BidiIter<span class="special">></span> |
| <span class="keyword">struct</span> <a class="link" href="regex_iterator.html" title="Struct template regex_iterator">regex_iterator</a> <span class="special">{</span> |
| <span class="comment">// types</span> |
| <span class="keyword">typedef</span> <a class="link" href="basic_regex.html" title="Struct template basic_regex">basic_regex</a><span class="special"><</span> <span class="identifier">BidiIter</span> <span class="special">></span> <a name="boost.xpressive.regex_iterator.regex_type"></a><span class="identifier">regex_type</span><span class="special">;</span> |
| <span class="keyword">typedef</span> <a class="link" href="match_results.html" title="Struct template match_results">match_results</a><span class="special"><</span> <span class="identifier">BidiIter</span> <span class="special">></span> <a name="boost.xpressive.regex_iterator.value_type"></a><span class="identifier">value_type</span><span class="special">;</span> |
| <span class="keyword">typedef</span> <span class="identifier">iterator_difference</span><span class="special"><</span> <span class="identifier">BidiIter</span> <span class="special">></span><span class="special">::</span><span class="identifier">type</span> <a name="boost.xpressive.regex_iterator.difference_type"></a><span class="identifier">difference_type</span><span class="special">;</span> |
| <span class="keyword">typedef</span> <a class="link" href="regex_iterator.html#boost.xpressive.regex_iterator.value_type">value_type</a> <span class="keyword">const</span> <span class="special">*</span> <a name="boost.xpressive.regex_iterator.pointer"></a><span class="identifier">pointer</span><span class="special">;</span> |
| <span class="keyword">typedef</span> <a class="link" href="regex_iterator.html#boost.xpressive.regex_iterator.value_type">value_type</a> <span class="keyword">const</span> <span class="special">&</span> <a name="boost.xpressive.regex_iterator.reference"></a><span class="identifier">reference</span><span class="special">;</span> |
| <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">forward_iterator_tag</span> <a name="boost.xpressive.regex_iterator.iterator_category"></a><span class="identifier">iterator_category</span><span class="special">;</span> |
| |
| <span class="comment">// <a class="link" href="regex_iterator.html#boost.xpressive.regex_iteratorconstruct-copy-destruct">construct/copy/destruct</a></span> |
| <a class="link" href="regex_iterator.html#id1538660-bb"><span class="identifier">regex_iterator</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span> |
| <a class="link" href="regex_iterator.html#id1538661-bb"><span class="identifier">regex_iterator</span></a><span class="special">(</span><span class="identifier">BidiIter</span><span class="special">,</span> <span class="identifier">BidiIter</span><span class="special">,</span> <a class="link" href="basic_regex.html" title="Struct template basic_regex">basic_regex</a><span class="special"><</span> <span class="identifier">BidiIter</span> <span class="special">></span> <span class="keyword">const</span> <span class="special">&</span><span class="special">,</span> |
| <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">)</span><span class="special">;</span> |
| <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> LetExpr<span class="special">></span> |
| <a class="link" href="regex_iterator.html#id1538690-bb"><span class="identifier">regex_iterator</span></a><span class="special">(</span><span class="identifier">BidiIter</span><span class="special">,</span> <span class="identifier">BidiIter</span><span class="special">,</span> <a class="link" href="basic_regex.html" title="Struct template basic_regex">basic_regex</a><span class="special"><</span> <span class="identifier">BidiIter</span> <span class="special">></span> <span class="keyword">const</span> <span class="special">&</span><span class="special">,</span> |
| <span class="emphasis"><em><span class="identifier">unspecified</span></em></span><span class="special">,</span> |
| <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">)</span><span class="special">;</span> |
| <a class="link" href="regex_iterator.html#id1538733-bb"><span class="identifier">regex_iterator</span></a><span class="special">(</span><a class="link" href="regex_iterator.html" title="Struct template regex_iterator">regex_iterator</a><span class="special"><</span> <span class="identifier">BidiIter</span> <span class="special">></span> <span class="keyword">const</span> <span class="special">&</span><span class="special">)</span><span class="special">;</span> |
| regex_iterator& <a class="link" href="regex_iterator.html#id1538742-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><a class="link" href="regex_iterator.html" title="Struct template regex_iterator">regex_iterator</a><span class="special"><</span> <span class="identifier">BidiIter</span> <span class="special">></span> <span class="keyword">const</span> <span class="special">&</span><span class="special">)</span><span class="special">;</span> |
| |
| <span class="comment">// <a class="link" href="regex_iterator.html#id1538549-bb">public member functions</a></span> |
| <a class="link" href="regex_iterator.html#boost.xpressive.regex_iterator.value_type">value_type</a> <span class="keyword">const</span> <span class="special">&</span> <a class="link" href="regex_iterator.html#id1538553-bb"><span class="keyword">operator</span><span class="special">*</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span> |
| <a class="link" href="regex_iterator.html#boost.xpressive.regex_iterator.value_type">value_type</a> <span class="keyword">const</span> <span class="special">*</span> <a class="link" href="regex_iterator.html#id1538563-bb"><span class="keyword">operator</span><span class="special">-></span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span> |
| <a class="link" href="regex_iterator.html" title="Struct template regex_iterator">regex_iterator</a><span class="special"><</span> <span class="identifier">BidiIter</span> <span class="special">></span> <span class="special">&</span> <a class="link" href="regex_iterator.html#id1538573-bb"><span class="keyword">operator</span><span class="special">++</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span> |
| <a class="link" href="regex_iterator.html" title="Struct template regex_iterator">regex_iterator</a><span class="special"><</span> <span class="identifier">BidiIter</span> <span class="special">></span> <a class="link" href="regex_iterator.html#id1538644-bb"><span class="keyword">operator</span><span class="special">++</span></a><span class="special">(</span><span class="keyword">int</span><span class="special">)</span><span class="special">;</span> |
| <span class="special">}</span><span class="special">;</span></pre></div> |
| <div class="refsect1"> |
| <a name="id3183028"></a><h2>Description</h2> |
| <div class="refsect2"> |
| <a name="id3183032"></a><h3> |
| <a name="boost.xpressive.regex_iteratorconstruct-copy-destruct"></a><code class="computeroutput">regex_iterator</code> |
| public |
| construct/copy/destruct</h3> |
| <div class="orderedlist"><ol class="orderedlist" type="1"> |
| <li class="listitem"><pre class="literallayout"><a name="id1538660-bb"></a><span class="identifier">regex_iterator</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li> |
| <li class="listitem"><pre class="literallayout"><a name="id1538661-bb"></a><span class="identifier">regex_iterator</span><span class="special">(</span><span class="identifier">BidiIter</span> begin<span class="special">,</span> <span class="identifier">BidiIter</span> end<span class="special">,</span> |
| <a class="link" href="basic_regex.html" title="Struct template basic_regex">basic_regex</a><span class="special"><</span> <span class="identifier">BidiIter</span> <span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> rex<span class="special">,</span> |
| <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> flags <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">)</span><span class="special">;</span></pre></li> |
| <li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> LetExpr<span class="special">></span> |
| <a name="id1538690-bb"></a><span class="identifier">regex_iterator</span><span class="special">(</span><span class="identifier">BidiIter</span> begin<span class="special">,</span> <span class="identifier">BidiIter</span> end<span class="special">,</span> |
| <a class="link" href="basic_regex.html" title="Struct template basic_regex">basic_regex</a><span class="special"><</span> <span class="identifier">BidiIter</span> <span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> rex<span class="special">,</span> <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> args<span class="special">,</span> |
| <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_flag_type</span> flags <span class="special">=</span> <span class="identifier">regex_constants</span><span class="special">::</span><span class="identifier">match_default</span><span class="special">)</span><span class="special">;</span></pre></li> |
| <li class="listitem"><pre class="literallayout"><a name="id1538733-bb"></a><span class="identifier">regex_iterator</span><span class="special">(</span><a class="link" href="regex_iterator.html" title="Struct template regex_iterator">regex_iterator</a><span class="special"><</span> <span class="identifier">BidiIter</span> <span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> that<span class="special">)</span><span class="special">;</span></pre></li> |
| <li class="listitem"><pre class="literallayout">regex_iterator& <a name="id1538742-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><a class="link" href="regex_iterator.html" title="Struct template regex_iterator">regex_iterator</a><span class="special"><</span> <span class="identifier">BidiIter</span> <span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> that<span class="special">)</span><span class="special">;</span></pre></li> |
| </ol></div> |
| </div> |
| <div class="refsect2"> |
| <a name="id3183496"></a><h3> |
| <a name="id1538549-bb"></a><code class="computeroutput">regex_iterator</code> public member functions</h3> |
| <div class="orderedlist"><ol class="orderedlist" type="1"> |
| <li class="listitem"><pre class="literallayout"><a class="link" href="regex_iterator.html#boost.xpressive.regex_iterator.value_type">value_type</a> <span class="keyword">const</span> <span class="special">&</span> <a name="id1538553-bb"></a><span class="keyword">operator</span><span class="special">*</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li> |
| <li class="listitem"><pre class="literallayout"><a class="link" href="regex_iterator.html#boost.xpressive.regex_iterator.value_type">value_type</a> <span class="keyword">const</span> <span class="special">*</span> <a name="id1538563-bb"></a><span class="keyword">operator</span><span class="special">-></span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li> |
| <li class="listitem"> |
| <pre class="literallayout"><a class="link" href="regex_iterator.html" title="Struct template regex_iterator">regex_iterator</a><span class="special"><</span> <span class="identifier">BidiIter</span> <span class="special">></span> <span class="special">&</span> <a name="id1538573-bb"></a><span class="keyword">operator</span><span class="special">++</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre> |
| <p>If what.prefix().first != what[0].second and if the element match_prev_avail is not set in flags then sets it. Then behaves as if by calling regex_search(what[0].second, end, what, *pre, flags), with the following variation: in the event that the previous match found was of zero length (what[0].length() == 0) then attempts to find a non-zero length match starting at what[0].second, only if that fails and provided what[0].second != suffix().second does it look for a (possibly zero length) match starting from what[0].second + 1. If no further match is found then sets this equal to the end of sequence iterator. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody><tr> |
| <td><p><span class="term">Postconditions:</span></p></td> |
| <td> |
| <p>(*this)->size() == pre->mark_count() + 1 </p> |
| <p>(*this)->empty() == false </p> |
| <p>(*this)->prefix().first == An iterator denoting the end point of the previous match found </p> |
| <p>(*this)->prefix().last == (**this)[0].first </p> |
| <p>(*this)->prefix().matched == (*this)->prefix().first != (*this)->prefix().second </p> |
| <p>(*this)->suffix().first == (**this)[0].second </p> |
| <p>(*this)->suffix().last == end </p> |
| <p>(*this)->suffix().matched == (*this)->suffix().first != (*this)->suffix().second </p> |
| <p>(**this)[0].first == The starting iterator for this match. </p> |
| <p>(**this)[0].second == The ending iterator for this match. </p> |
| <p>(**this)[0].matched == true if a full match was found, and false if it was a partial match (found as a result of the match_partial flag being set). </p> |
| <p>(**this)[n].first == For all integers n < (*this)->size(), the start of the sequence that matched sub-expression n. Alternatively, if sub-expression n did not participate in the match, then end. </p> |
| <p>(**this)[n].second == For all integers n < (*this)->size(), the end of the sequence that matched sub-expression n. Alternatively, if sub-expression n did not participate in the match, then end. </p> |
| <p>(**this)[n].matched == For all integers n < (*this)->size(), true if sub-expression n participated in the match, false otherwise. </p> |
| <p>(*this)->position() == The distance from the start of the original sequence being iterated, to the start of this match. </p> |
| </td> |
| </tr></tbody> |
| </table></div> |
| </li> |
| <li class="listitem"><pre class="literallayout"><a class="link" href="regex_iterator.html" title="Struct template regex_iterator">regex_iterator</a><span class="special"><</span> <span class="identifier">BidiIter</span> <span class="special">></span> <a name="id1538644-bb"></a><span class="keyword">operator</span><span class="special">++</span><span class="special">(</span><span class="keyword">int</span><span class="special">)</span><span class="special">;</span></pre></li> |
| </ol></div> |
| </div> |
| </div> |
| </div> |
| <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> |
| <td align="left"></td> |
| <td align="right"><div class="copyright-footer">Copyright © 2007 Eric Niebler<p> |
| Distributed under the Boost Software License, Version 1.0. (See accompanying |
| file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) |
| </p> |
| </div></td> |
| </tr></table> |
| <hr> |
| <div class="spirit-nav"> |
| <a accesskey="p" href="../../BOOST_XPR_ENSURE_.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../xpressive/reference.html#header.boost.xpressive.regex_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="mark_tag.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> |
| </div> |
| </body> |
| </html> |