<metaname="author"content="David Abrahams, Jeremy Siek, Thomas Witt"/>
<metaname="organization"content="Boost Consulting, Indiana University Open Systems Lab, University of Hanover Institute for Transport Railway Operation and Construction"/>
<td><aclass="first reference"href="http://www.boost-consulting.com">Boost Consulting</a>, Indiana University <aclass="reference"href="http://www.osl.iu.edu">Open Systems
Lab</a>, University of Hanover <aclass="last reference"href="http://www.ive.uni-hannover.de">Institute for Transport
expected by <ttclass="literal"><spanclass="pre">iterator_facade</span></tt> are implemented in terms of the
<ttclass="literal"><spanclass="pre">iterator_adaptor</span></tt>'s <ttclass="literal"><spanclass="pre">Base</span></tt> template parameter. A class derived
from <ttclass="literal"><spanclass="pre">iterator_adaptor</span></tt> typically redefines some of the core
interface functions to adapt the behavior of the <ttclass="literal"><spanclass="pre">Base</span></tt> type.
Whether the derived class models any of the standard iterator concepts
depends on the operations supported by the <ttclass="literal"><spanclass="pre">Base</span></tt> type and which
core interface functions of <ttclass="literal"><spanclass="pre">iterator_facade</span></tt> are redefined in the
<li><aclass="reference"href="#iterator-adaptor-base-class-parameters"id="id6"name="id6"><ttclass="literal"><spanclass="pre">iterator_adaptor</span></tt> base class parameters</a></li>
<li><aclass="reference"href="#iterator-adaptor-public-operations"id="id8"name="id8"><ttclass="literal"><spanclass="pre">iterator_adaptor</span></tt> public operations</a></li>
<li><aclass="reference"href="#iterator-adaptor-protected-member-functions"id="id9"name="id9"><ttclass="literal"><spanclass="pre">iterator_adaptor</span></tt> protected member functions</a></li>
<li><aclass="reference"href="#iterator-adaptor-private-member-functions"id="id10"name="id10"><ttclass="literal"><spanclass="pre">iterator_adaptor</span></tt> private member functions</a></li>
<p>The <ttclass="literal"><spanclass="pre">iterator_adaptor</span></tt> class template adapts some <ttclass="literal"><spanclass="pre">Base</span></tt><aclass="footnote-reference"href="#base"id="id1"name="id1"><sup>1</sup></a>
type to create a new iterator. Instantiations of <ttclass="literal"><spanclass="pre">iterator_adaptor</span></tt>
are derived from a corresponding instantiation of <ttclass="literal"><spanclass="pre">iterator_facade</span></tt>
and implement the core behaviors in terms of the <ttclass="literal"><spanclass="pre">Base</span></tt> type. In
essence, <ttclass="literal"><spanclass="pre">iterator_adaptor</span></tt> merely forwards all operations to an
instance of the <ttclass="literal"><spanclass="pre">Base</span></tt> type, which it stores as a member.</p>
<h2><aclass="toc-backref"href="#id6"name="iterator-adaptor-base-class-parameters"><ttclass="literal"><spanclass="pre">iterator_adaptor</span></tt> base class parameters</a></h2>
<p>In order for <ttclass="literal"><spanclass="pre">Derived</span></tt> to model the iterator concepts corresponding
to <ttclass="literal"><spanclass="pre">iterator_traits<Derived>::iterator_category</span></tt>, the expressions
involving <ttclass="literal"><spanclass="pre">m_iterator</span></tt> in the specifications of those private member
functions of <ttclass="literal"><spanclass="pre">iterator_adaptor</span></tt> that may be called by
<ttclass="literal"><spanclass="pre">iterator_facade<Derived,</span><spanclass="pre">V,</span><spanclass="pre">C,</span><spanclass="pre">R,</span><spanclass="pre">D></span></tt> in evaluating any valid
expression involving <ttclass="literal"><spanclass="pre">Derived</span></tt> in those concepts' requirements.</p>
<!-- The above is confusing and needs a rewrite. -JGS -->
<h2><aclass="toc-backref"href="#id8"name="iterator-adaptor-public-operations"><ttclass="literal"><spanclass="pre">iterator_adaptor</span></tt> public operations</a></h2>
<trclass="field"><thclass="field-name">Requires:</th><tdclass="field-body">The <ttclass="literal"><spanclass="pre">Base</span></tt> type must be Default Constructible.</td>
</tr>
<trclass="field"><thclass="field-name">Returns:</th><tdclass="field-body">An instance of <ttclass="literal"><spanclass="pre">iterator_adaptor</span></tt> with
<trclass="field"><thclass="field-name">Returns:</th><tdclass="field-body">An instance of <ttclass="literal"><spanclass="pre">iterator_adaptor</span></tt> with
<ttclass="literal"><spanclass="pre">m_iterator</span></tt> copy constructed from <ttclass="literal"><spanclass="pre">iter</span></tt>.</td>
<h2><aclass="toc-backref"href="#id9"name="iterator-adaptor-protected-member-functions"><ttclass="literal"><spanclass="pre">iterator_adaptor</span></tt> protected member functions</a></h2>
<trclass="field"><thclass="field-name">Returns:</th><tdclass="field-body">A const reference to <ttclass="literal"><spanclass="pre">m_iterator</span></tt>.</td>
<trclass="field"><thclass="field-name">Returns:</th><tdclass="field-body">A non-const reference to <ttclass="literal"><spanclass="pre">m_iterator</span></tt>.</td>
<h2><aclass="toc-backref"href="#id10"name="iterator-adaptor-private-member-functions"><ttclass="literal"><spanclass="pre">iterator_adaptor</span></tt> private member functions</a></h2>
Generated by <aclass="reference"href="http://docutils.sourceforge.net/">Docutils</a> from <aclass="reference"href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.