forked from boostorg/fusion
Sync from trunk (except adapt class)
[SVN r56714]
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>The Full Extension Mechanism</title>
|
||||
<title> The Full Extension Mechanism</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter<65>1.<2E>Fusion 2.0">
|
||||
<link rel="up" href="../extension.html" title="Extension">
|
||||
<link rel="prev" href="../extension.html" title="Extension">
|
||||
<link rel="previous" href="../extension.html" title="Extension">
|
||||
<link rel="next" href="sequence_facade.html" title="Sequence Facade">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
@ -22,36 +22,39 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../extension.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../extension.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="sequence_facade.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" title="The Full Extension Mechanism">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="fusion.extension.ext_full"></a><a class="link" href="ext_full.html" title="The Full Extension Mechanism"> The Full Extension Mechanism</a>
|
||||
</h3></div></div></div>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage">
|
||||
<div><div><h3 class="title">
|
||||
<a name="fusion.extension.ext_full"></a><a href="ext_full.html" title=" The Full Extension Mechanism"> The Full Extension Mechanism</a>
|
||||
</h3></div></div>
|
||||
<div></div>
|
||||
</div>
|
||||
<p>
|
||||
The Fusion library is designed to be extensible, new sequences types can
|
||||
easily be added. In fact, the library support for <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code>,
|
||||
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code> and <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a>
|
||||
easily be added. In fact, the library support for <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></tt>,
|
||||
<tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></tt> and <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a>
|
||||
sequences is entirely provided using the extension mechanism.
|
||||
</p>
|
||||
<p>
|
||||
The process for adding a new sequence type to Fusion is:
|
||||
</p>
|
||||
<div class="orderedlist"><ol class="orderedlist" type="1">
|
||||
<li class="listitem">
|
||||
Enable the <a class="link" href="../notes.html#fusion.notes.tag_dispatching"><span class="emphasis"><em>tag dispatching</em></span></a>
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li>
|
||||
Enable the <a href="../notes.html#fusion.notes.tag_dispatching"><span class="emphasis"><em>tag dispatching</em></span></a>
|
||||
mechanism used by Fusion for your sequence type
|
||||
</li>
|
||||
<li class="listitem">
|
||||
<li>
|
||||
Design an iterator type for the sequence
|
||||
</li>
|
||||
<li class="listitem">
|
||||
<li>
|
||||
Provide specialized behaviour for the intrinsic operations of the new Fusion
|
||||
sequence
|
||||
</li>
|
||||
</ol></div>
|
||||
<a name="fusion.extension.ext_full.our_example"></a><h5>
|
||||
<a name="id734940"></a>
|
||||
<a class="link" href="ext_full.html#fusion.extension.ext_full.our_example">Our example</a>
|
||||
</h5>
|
||||
<a name="fusion.extension.ext_full.our_example"></a><h4>
|
||||
<a name="id599358"></a>
|
||||
<a href="ext_full.html#fusion.extension.ext_full.our_example">Our example</a>
|
||||
</h4>
|
||||
<p>
|
||||
In order to illustrate enabling a new sequence type for use with Fusion,
|
||||
we are going to use the type:
|
||||
@ -73,18 +76,19 @@
|
||||
<p>
|
||||
We are going to pretend that this type has been provided by a 3rd party library,
|
||||
and therefore cannot be modified. We shall work through all the necessary
|
||||
steps to enable <code class="computeroutput"><span class="identifier">example_struct</span></code>
|
||||
to serve as an <a class="link" href="../sequence/concepts/associative_sequence.html" title="Associative Sequence">Associative
|
||||
Sequence</a> as described in the <a class="link" href="../quick_start.html" title="Quick Start">Quick
|
||||
steps to enable <tt class="computeroutput"><span class="identifier">example_struct</span></tt>
|
||||
to serve as an <a href="../sequence/concepts/associative_sequence.html" title="Associative
|
||||
Sequence">Associative
|
||||
Sequence</a> as described in the <a href="../quick_start.html" title="Quick Start">Quick
|
||||
Start</a> guide.
|
||||
</p>
|
||||
<a name="fusion.extension.ext_full.enabling_tag_dispatching"></a><h5>
|
||||
<a name="id735144"></a>
|
||||
<a class="link" href="ext_full.html#fusion.extension.ext_full.enabling_tag_dispatching">Enabling
|
||||
<a name="fusion.extension.ext_full.enabling_tag_dispatching"></a><h4>
|
||||
<a name="id599647"></a>
|
||||
<a href="ext_full.html#fusion.extension.ext_full.enabling_tag_dispatching">Enabling
|
||||
Tag Dispatching</a>
|
||||
</h5>
|
||||
</h4>
|
||||
<p>
|
||||
The Fusion extensibility mechanism uses <a class="link" href="../notes.html#fusion.notes.tag_dispatching"><span class="emphasis"><em>tag
|
||||
The Fusion extensibility mechanism uses <a href="../notes.html#fusion.notes.tag_dispatching"><span class="emphasis"><em>tag
|
||||
dispatching</em></span></a> to call the correct code for a given sequence
|
||||
type. In order to exploit the tag dispatching mechanism we must first declare
|
||||
a new tag type for the mechanism to use. For example:
|
||||
@ -94,9 +98,9 @@
|
||||
</span><span class="special">}</span>
|
||||
</pre>
|
||||
<p>
|
||||
Next we need to enable the <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag_of</span></code>
|
||||
Next we need to enable the <tt class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag_of</span></tt>
|
||||
metafunction to return our newly chosen tag type for operations involving
|
||||
our sequence. This is done by specializing <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag_of</span></code>
|
||||
our sequence. This is done by specializing <tt class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag_of</span></tt>
|
||||
for our sequence type.
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">support</span><span class="special">/</span><span class="identifier">tag_of_fwd</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
@ -111,28 +115,28 @@
|
||||
<span class="special">}}}</span>
|
||||
</pre>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag_of</span></code> also has a second template argument,
|
||||
that can be used in conjuction with <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">enable_if</span></code>
|
||||
<tt class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag_of</span></tt> also has a second template argument,
|
||||
that can be used in conjuction with <tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">enable_if</span></tt>
|
||||
to provide tag support for groups of related types. This feature is not necessary
|
||||
for our sequence, but for an example see the code in:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">adapted</span><span class="special">/</span><span class="identifier">array</span><span class="special">/</span><span class="identifier">tag_of</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">tag_of</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
<a name="fusion.extension.ext_full.designing_a_suitable_iterator"></a><h5>
|
||||
<a name="id735580"></a>
|
||||
<a class="link" href="ext_full.html#fusion.extension.ext_full.designing_a_suitable_iterator">Designing
|
||||
<a name="fusion.extension.ext_full.designing_a_suitable_iterator"></a><h4>
|
||||
<a name="id600268"></a>
|
||||
<a href="ext_full.html#fusion.extension.ext_full.designing_a_suitable_iterator">Designing
|
||||
a suitable iterator</a>
|
||||
</h5>
|
||||
</h4>
|
||||
<p>
|
||||
We need an iterator to describe positions, and provide access to the data
|
||||
within our sequence. As it is straightforward to do, we are going to provide
|
||||
a random access iterator in our example.
|
||||
</p>
|
||||
<p>
|
||||
We will use a simple design, in which the 2 members of <code class="computeroutput"><span class="identifier">example_struct</span></code>
|
||||
are given numbered indices, 0 for <code class="computeroutput"><span class="identifier">name</span></code>
|
||||
and 1 for <code class="computeroutput"><span class="identifier">age</span></code> respectively.
|
||||
We will use a simple design, in which the 2 members of <tt class="computeroutput"><span class="identifier">example_struct</span></tt>
|
||||
are given numbered indices, 0 for <tt class="computeroutput"><span class="identifier">name</span></tt>
|
||||
and 1 for <tt class="computeroutput"><span class="identifier">age</span></tt> respectively.
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Struct</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">Pos</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">example_struct_iterator</span>
|
||||
@ -152,43 +156,43 @@
|
||||
<p>
|
||||
A quick summary of the details of our iterator:
|
||||
</p>
|
||||
<div class="orderedlist"><ol class="orderedlist" type="1">
|
||||
<li class="listitem">
|
||||
<div class="orderedlist"><ol type="1">
|
||||
<li>
|
||||
The iterator is parameterized by the type it is iterating over, and the
|
||||
index of the current element.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
The typedefs <code class="computeroutput"><span class="identifier">struct_type</span></code>
|
||||
and <code class="computeroutput"><span class="identifier">index</span></code> provide convenient
|
||||
<li>
|
||||
The typedefs <tt class="computeroutput"><span class="identifier">struct_type</span></tt>
|
||||
and <tt class="computeroutput"><span class="identifier">index</span></tt> provide convenient
|
||||
access to information we will need later in the implementation.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
The typedef <code class="computeroutput"><span class="identifier">category</span></code> allows
|
||||
the <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><a class="link" href="../support/category_of.html" title="category_of"><code class="computeroutput"><span class="identifier">category_of</span></code></a></code>
|
||||
<li>
|
||||
The typedef <tt class="computeroutput"><span class="identifier">category</span></tt> allows
|
||||
the <tt class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><a href="../support/category_of.html" title="category_of"><tt class="computeroutput"><span class="identifier">category_of</span></tt></a></tt>
|
||||
metafunction to establish the traversal category of the iterator.
|
||||
</li>
|
||||
<li class="listitem">
|
||||
The constructor stores a reference to the <code class="computeroutput"><span class="identifier">example_struct</span></code>
|
||||
<li>
|
||||
The constructor stores a reference to the <tt class="computeroutput"><span class="identifier">example_struct</span></tt>
|
||||
being iterated over.
|
||||
</li>
|
||||
</ol></div>
|
||||
<p>
|
||||
We also need to enable <a class="link" href="../notes.html#fusion.notes.tag_dispatching"><span class="emphasis"><em>tag
|
||||
We also need to enable <a href="../notes.html#fusion.notes.tag_dispatching"><span class="emphasis"><em>tag
|
||||
dispatching</em></span></a> for our iterator type, with another specialization
|
||||
of <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag_of</span></code>.
|
||||
of <tt class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">tag_of</span></tt>.
|
||||
</p>
|
||||
<p>
|
||||
In isolation, the iterator implementation is pretty dry. Things should become
|
||||
clearer as we add features to our implementation.
|
||||
</p>
|
||||
<a name="fusion.extension.ext_full.a_first_couple_of_instructive_features"></a><h5>
|
||||
<a name="id738774"></a>
|
||||
<a class="link" href="ext_full.html#fusion.extension.ext_full.a_first_couple_of_instructive_features">A
|
||||
<a name="fusion.extension.ext_full.a_first_couple_of_instructive_features"></a><h4>
|
||||
<a name="id600925"></a>
|
||||
<a href="ext_full.html#fusion.extension.ext_full.a_first_couple_of_instructive_features">A
|
||||
first couple of instructive features</a>
|
||||
</h5>
|
||||
</h4>
|
||||
<p>
|
||||
To start with, we will get the <a class="link" href="../iterator/metafunctions/value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of</span></code></a> metafunction working. To
|
||||
do this, we provide a specialization of the <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">extension</span><span class="special">::</span><span class="identifier">value_of_impl</span></code>
|
||||
To start with, we will get the <a href="../iterator/metafunctions/value_of.html" title="value_of"><tt class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">value_of</span></tt></a> metafunction working. To
|
||||
do this, we provide a specialization of the <tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">fusion</span><span class="special">::</span><span class="identifier">extension</span><span class="special">::</span><span class="identifier">value_of_impl</span></tt>
|
||||
template for our iterator's tag type.
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">template</span><span class="special"><></span>
|
||||
@ -212,29 +216,29 @@
|
||||
</pre>
|
||||
<p>
|
||||
The implementation itself is pretty simple, it just uses 2 partial specializations
|
||||
to provide the type of the 2 different members of <code class="computeroutput"><span class="identifier">example_struct</span></code>,
|
||||
to provide the type of the 2 different members of <tt class="computeroutput"><span class="identifier">example_struct</span></tt>,
|
||||
based on the index of the iterator.
|
||||
</p>
|
||||
<p>
|
||||
To understand how <code class="computeroutput"><span class="identifier">value_of_impl</span></code>
|
||||
is used by the library we will look at the implementation of <a class="link" href="../iterator/metafunctions/value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">value_of</span></code></a>:
|
||||
To understand how <tt class="computeroutput"><span class="identifier">value_of_impl</span></tt>
|
||||
is used by the library we will look at the implementation of <a href="../iterator/metafunctions/value_of.html" title="value_of"><tt class="computeroutput"><span class="identifier">value_of</span></tt></a>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Iterator</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="../iterator/metafunctions/value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">value_of</span></code></a>
|
||||
<span class="keyword">struct</span> <a href="../iterator/metafunctions/value_of.html" title="value_of"><tt class="computeroutput"><span class="identifier">value_of</span></tt></a>
|
||||
<span class="special">:</span> <span class="identifier">extension</span><span class="special">::</span><span class="identifier">value_of_impl</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">detail</span><span class="special">::</span><span class="identifier">tag_of</span><span class="special"><</span><span class="identifier">Iterator</span><span class="special">>::</span><span class="identifier">type</span><span class="special">>::</span>
|
||||
<span class="keyword">template</span> <span class="identifier">apply</span><span class="special"><</span><span class="identifier">Iterator</span><span class="special">></span>
|
||||
<span class="special">{};</span>
|
||||
</pre>
|
||||
<p>
|
||||
So <a class="link" href="../iterator/metafunctions/value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">value_of</span></code></a>
|
||||
uses <a class="link" href="../notes.html#fusion.notes.tag_dispatching"><span class="emphasis"><em>tag dispatching</em></span></a>
|
||||
So <a href="../iterator/metafunctions/value_of.html" title="value_of"><tt class="computeroutput"><span class="identifier">value_of</span></tt></a>
|
||||
uses <a href="../notes.html#fusion.notes.tag_dispatching"><span class="emphasis"><em>tag dispatching</em></span></a>
|
||||
to select an <a href="http://www.boost.org/libs/mpl/doc/refmanual/metafunction-class.html" target="_top">MPL
|
||||
Metafunction Class</a> to provide its functionality. You will notice
|
||||
this pattern throughout the implementation of Fusion.
|
||||
</p>
|
||||
<p>
|
||||
Ok, lets enable dereferencing of our iterator. In this case we must provide
|
||||
a suitable specialization of <code class="computeroutput"><span class="identifier">deref_impl</span></code>.
|
||||
a suitable specialization of <tt class="computeroutput"><span class="identifier">deref_impl</span></tt>.
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">template</span><span class="special"><></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">deref_impl</span><span class="special"><</span><span class="identifier">example</span><span class="special">::</span><span class="identifier">example_struct_iterator_tag</span><span class="special">></span>
|
||||
@ -271,16 +275,16 @@
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<p>
|
||||
The use of <code class="computeroutput"><span class="identifier">deref_impl</span></code> is
|
||||
very similar to that of <code class="computeroutput"><span class="identifier">value_of_impl</span></code>,
|
||||
but it also provides some runtime functionality this time via the <code class="computeroutput"><span class="identifier">call</span></code> static member function. To see how
|
||||
<code class="computeroutput"><span class="identifier">deref_impl</span></code> is used, lets
|
||||
have a look at the implementation of <a class="link" href="../iterator/functions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a>:
|
||||
The use of <tt class="computeroutput"><span class="identifier">deref_impl</span></tt> is
|
||||
very similar to that of <tt class="computeroutput"><span class="identifier">value_of_impl</span></tt>,
|
||||
but it also provides some runtime functionality this time via the <tt class="computeroutput"><span class="identifier">call</span></tt> static member function. To see how
|
||||
<tt class="computeroutput"><span class="identifier">deref_impl</span></tt> is used, lets
|
||||
have a look at the implementation of <a href="../iterator/functions/deref.html" title="deref"><tt class="computeroutput"><span class="identifier">deref</span></tt></a>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">result_of</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Iterator</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <a class="link" href="../iterator/functions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a>
|
||||
<span class="keyword">struct</span> <a href="../iterator/functions/deref.html" title="deref"><tt class="computeroutput"><span class="identifier">deref</span></tt></a>
|
||||
<span class="special">:</span> <span class="identifier">extension</span><span class="special">::</span><span class="identifier">deref_impl</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">detail</span><span class="special">::</span><span class="identifier">tag_of</span><span class="special"><</span><span class="identifier">Iterator</span><span class="special">>::</span><span class="identifier">type</span><span class="special">>::</span>
|
||||
<span class="keyword">template</span> <span class="identifier">apply</span><span class="special"><</span><span class="identifier">Iterator</span><span class="special">></span>
|
||||
<span class="special">{};</span>
|
||||
@ -288,48 +292,48 @@
|
||||
|
||||
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Iterator</span><span class="special">></span>
|
||||
<span class="keyword">typename</span> <span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref</span><span class="special"><</span><span class="identifier">Iterator</span><span class="special">>::</span><span class="identifier">type</span>
|
||||
<a class="link" href="../iterator/functions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a><span class="special">(</span><span class="identifier">Iterator</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">i</span><span class="special">)</span>
|
||||
<a href="../iterator/functions/deref.html" title="deref"><tt class="computeroutput"><span class="identifier">deref</span></tt></a><span class="special">(</span><span class="identifier">Iterator</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">i</span><span class="special">)</span>
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">typedef</span> <span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref</span><span class="special"><</span><span class="identifier">Iterator</span><span class="special">></span> <span class="identifier">deref_meta</span><span class="special">;</span>
|
||||
<span class="keyword">return</span> <span class="identifier">deref_meta</span><span class="special">::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">i</span><span class="special">);</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
<p>
|
||||
So again <a class="link" href="../iterator/metafunctions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref</span></code></a> uses <a class="link" href="../notes.html#fusion.notes.tag_dispatching"><span class="emphasis"><em>tag
|
||||
dispatching</em></span></a> in exactly the same way as the <a class="link" href="../iterator/metafunctions/value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">value_of</span></code></a> implementation. The runtime
|
||||
functionality used by <a class="link" href="../iterator/functions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a> is provided by the <code class="computeroutput"><span class="identifier">call</span></code> static function of the selected <a href="http://www.boost.org/libs/mpl/doc/refmanual/metafunction-class.html" target="_top">MPL
|
||||
So again <a href="../iterator/metafunctions/deref.html" title="deref"><tt class="computeroutput"><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">deref</span></tt></a> uses <a href="../notes.html#fusion.notes.tag_dispatching"><span class="emphasis"><em>tag
|
||||
dispatching</em></span></a> in exactly the same way as the <a href="../iterator/metafunctions/value_of.html" title="value_of"><tt class="computeroutput"><span class="identifier">value_of</span></tt></a> implementation. The runtime
|
||||
functionality used by <a href="../iterator/functions/deref.html" title="deref"><tt class="computeroutput"><span class="identifier">deref</span></tt></a> is provided by the <tt class="computeroutput"><span class="identifier">call</span></tt> static function of the selected <a href="http://www.boost.org/libs/mpl/doc/refmanual/metafunction-class.html" target="_top">MPL
|
||||
Metafunction Class</a>.
|
||||
</p>
|
||||
<p>
|
||||
The actual implementation of <code class="computeroutput"><span class="identifier">deref_impl</span></code>
|
||||
is slightly more complex than that of <code class="computeroutput"><span class="identifier">value_of_impl</span></code>.
|
||||
We also need to implement the <code class="computeroutput"><span class="identifier">call</span></code>
|
||||
The actual implementation of <tt class="computeroutput"><span class="identifier">deref_impl</span></tt>
|
||||
is slightly more complex than that of <tt class="computeroutput"><span class="identifier">value_of_impl</span></tt>.
|
||||
We also need to implement the <tt class="computeroutput"><span class="identifier">call</span></tt>
|
||||
function, which returns a reference to the appropriate member of the underlying
|
||||
sequence. We also require a little bit of metaprogramming to return <code class="computeroutput"><span class="keyword">const</span></code> references if the underlying sequence
|
||||
sequence. We also require a little bit of metaprogramming to return <tt class="computeroutput"><span class="keyword">const</span></tt> references if the underlying sequence
|
||||
is const.
|
||||
</p>
|
||||
<div class="note" title="Note"><table border="0" summary="Note">
|
||||
<div class="note"><table border="0" summary="Note">
|
||||
<tr>
|
||||
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
|
||||
<th align="left">Note</th>
|
||||
</tr>
|
||||
<tr><td align="left" valign="top"><p>
|
||||
<tr><td colspan="2" align="left" valign="top"><p>
|
||||
Although there is a fair amount of left to do to produce a fully fledged
|
||||
Fusion sequence, <a class="link" href="../iterator/metafunctions/value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">value_of</span></code></a> and <a class="link" href="../iterator/functions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a> illustrate all the signficant
|
||||
Fusion sequence, <a href="../iterator/metafunctions/value_of.html" title="value_of"><tt class="computeroutput"><span class="identifier">value_of</span></tt></a> and <a href="../iterator/functions/deref.html" title="deref"><tt class="computeroutput"><span class="identifier">deref</span></tt></a> illustrate all the signficant
|
||||
concepts required. The remainder of the process is very repetitive, simply
|
||||
requiring implementation of a suitable <code class="computeroutput"><span class="identifier">xxxx_impl</span></code>
|
||||
for each feature <code class="computeroutput"><span class="identifier">xxxx</span></code>.
|
||||
requiring implementation of a suitable <tt class="computeroutput"><span class="identifier">xxxx_impl</span></tt>
|
||||
for each feature <tt class="computeroutput"><span class="identifier">xxxx</span></tt>.
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<a name="fusion.extension.ext_full.implementing_the_remaining_iterator_functionality"></a><h5>
|
||||
<a name="id740388"></a>
|
||||
<a class="link" href="ext_full.html#fusion.extension.ext_full.implementing_the_remaining_iterator_functionality">Implementing
|
||||
<a name="fusion.extension.ext_full.implementing_the_remaining_iterator_functionality"></a><h4>
|
||||
<a name="id603230"></a>
|
||||
<a href="ext_full.html#fusion.extension.ext_full.implementing_the_remaining_iterator_functionality">Implementing
|
||||
the remaining iterator functionality</a>
|
||||
</h5>
|
||||
</h4>
|
||||
<p>
|
||||
Ok, now we have seen the way <a class="link" href="../iterator/metafunctions/value_of.html" title="value_of"><code class="computeroutput"><span class="identifier">value_of</span></code></a> and <a class="link" href="../iterator/functions/deref.html" title="deref"><code class="computeroutput"><span class="identifier">deref</span></code></a> work, everything else will
|
||||
Ok, now we have seen the way <a href="../iterator/metafunctions/value_of.html" title="value_of"><tt class="computeroutput"><span class="identifier">value_of</span></tt></a> and <a href="../iterator/functions/deref.html" title="deref"><tt class="computeroutput"><span class="identifier">deref</span></tt></a> work, everything else will
|
||||
work in pretty much the same way. Lets start with forward iteration, by providing
|
||||
a <code class="computeroutput"><span class="identifier">next_impl</span></code>:
|
||||
a <tt class="computeroutput"><span class="identifier">next_impl</span></tt>:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">template</span><span class="special"><></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">next_impl</span><span class="special"><</span><span class="identifier">example</span><span class="special">::</span><span class="identifier">example_struct_iterator_tag</span><span class="special">></span>
|
||||
@ -350,37 +354,40 @@
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
This should be very familiar from our <code class="computeroutput"><span class="identifier">deref_impl</span></code>
|
||||
This should be very familiar from our <tt class="computeroutput"><span class="identifier">deref_impl</span></tt>
|
||||
implementation, we will be using this approach again and again now. Our design
|
||||
is simply to increment the <code class="computeroutput"><span class="identifier">index</span></code>
|
||||
is simply to increment the <tt class="computeroutput"><span class="identifier">index</span></tt>
|
||||
counter to move on to the next element. The various other iterator manipulations
|
||||
we need to perform will all just involve simple calculations with the <code class="computeroutput"><span class="identifier">index</span></code> variables.
|
||||
we need to perform will all just involve simple calculations with the <tt class="computeroutput"><span class="identifier">index</span></tt> variables.
|
||||
</p>
|
||||
<p>
|
||||
We also need to provide a suitable <code class="computeroutput"><span class="identifier">equal_to_impl</span></code>
|
||||
so that iterators can be correctly compared. A <a class="link" href="../iterator/concepts/bidirectional_iterator.html" title="Bidirectional Iterator">Bidirectional
|
||||
Iterator</a> will also need an implementation of <code class="computeroutput"><span class="identifier">prior_impl</span></code>.
|
||||
For a <a class="link" href="../iterator/concepts/random_access_iterator.html" title="Random Access Iterator">Random
|
||||
Access Iterator</a> <code class="computeroutput"><span class="identifier">distance_impl</span></code>
|
||||
and <code class="computeroutput"><span class="identifier">advance_impl</span></code> also need
|
||||
We also need to provide a suitable <tt class="computeroutput"><span class="identifier">equal_to_impl</span></tt>
|
||||
so that iterators can be correctly compared. A <a href="../iterator/concepts/bidirectional_iterator.html" title="Bidirectional
|
||||
Iterator">Bidirectional
|
||||
Iterator</a> will also need an implementation of <tt class="computeroutput"><span class="identifier">prior_impl</span></tt>.
|
||||
For a <a href="../iterator/concepts/random_access_iterator.html" title="Random
|
||||
Access Iterator">Random
|
||||
Access Iterator</a> <tt class="computeroutput"><span class="identifier">distance_impl</span></tt>
|
||||
and <tt class="computeroutput"><span class="identifier">advance_impl</span></tt> also need
|
||||
to be provided in order to satisfy the necessary complexity guarantees. As
|
||||
our iterator is a <a class="link" href="../iterator/concepts/random_access_iterator.html" title="Random Access Iterator">Random
|
||||
our iterator is a <a href="../iterator/concepts/random_access_iterator.html" title="Random
|
||||
Access Iterator">Random
|
||||
Access Iterator</a> we will have to implement all of these functions.
|
||||
</p>
|
||||
<p>
|
||||
Full implementations of <code class="computeroutput"><span class="identifier">prior_impl</span></code>,
|
||||
<code class="computeroutput"><span class="identifier">advance_impl</span></code>, <code class="computeroutput"><span class="identifier">distance_impl</span></code> and <code class="computeroutput"><span class="identifier">equal_to_impl</span></code>
|
||||
Full implementations of <tt class="computeroutput"><span class="identifier">prior_impl</span></tt>,
|
||||
<tt class="computeroutput"><span class="identifier">advance_impl</span></tt>, <tt class="computeroutput"><span class="identifier">distance_impl</span></tt> and <tt class="computeroutput"><span class="identifier">equal_to_impl</span></tt>
|
||||
are provided in the example code.
|
||||
</p>
|
||||
<a name="fusion.extension.ext_full.implementing_the_intrinsic_functions_of_the_sequence"></a><h5>
|
||||
<a name="id740824"></a>
|
||||
<a class="link" href="ext_full.html#fusion.extension.ext_full.implementing_the_intrinsic_functions_of_the_sequence">Implementing
|
||||
<a name="fusion.extension.ext_full.implementing_the_intrinsic_functions_of_the_sequence"></a><h4>
|
||||
<a name="id603878"></a>
|
||||
<a href="ext_full.html#fusion.extension.ext_full.implementing_the_intrinsic_functions_of_the_sequence">Implementing
|
||||
the intrinsic functions of the sequence</a>
|
||||
</h5>
|
||||
</h4>
|
||||
<p>
|
||||
In order that Fusion can correctly identify our sequence as a Fusion sequence,
|
||||
we need to enable <code class="computeroutput"><span class="identifier">is_sequence</span></code>
|
||||
for our sequence type. As usual we just create an <code class="computeroutput"><span class="identifier">impl</span></code>
|
||||
we need to enable <tt class="computeroutput"><span class="identifier">is_sequence</span></tt>
|
||||
for our sequence type. As usual we just create an <tt class="computeroutput"><span class="identifier">impl</span></tt>
|
||||
type specialized for our sequence tag:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">template</span><span class="special"><></span>
|
||||
@ -391,14 +398,14 @@
|
||||
<span class="special">};</span>
|
||||
</pre>
|
||||
<p>
|
||||
We've some similar formalities to complete, providing <code class="computeroutput"><span class="identifier">category_of_impl</span></code>
|
||||
so Fusion can correctly identify our sequence type, and <code class="computeroutput"><span class="identifier">is_view_impl</span></code>
|
||||
so Fusion can correctly identify our sequence as not being a <a class="link" href="../view.html" title="View">View</a>
|
||||
We've some similar formalities to complete, providing <tt class="computeroutput"><span class="identifier">category_of_impl</span></tt>
|
||||
so Fusion can correctly identify our sequence type, and <tt class="computeroutput"><span class="identifier">is_view_impl</span></tt>
|
||||
so Fusion can correctly identify our sequence as not being a <a href="../view.html" title="View">View</a>
|
||||
type. Implementations are provide in the example code.
|
||||
</p>
|
||||
<p>
|
||||
Now we've completed some formalities, on to more interesting features. Lets
|
||||
get <a class="link" href="../sequence/intrinsic/functions/begin.html" title="begin"><code class="computeroutput"><span class="identifier">begin</span></code></a> working so that we can get
|
||||
get <a href="../sequence/intrinsic/functions/begin.html" title="begin"><tt class="computeroutput"><span class="identifier">begin</span></tt></a> working so that we can get
|
||||
an iterator to start accessing the data in our sequence.
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">template</span><span class="special"><></span>
|
||||
@ -420,32 +427,33 @@
|
||||
<p>
|
||||
The implementation uses the same ideas we have applied throughout, in this
|
||||
case we are just creating one of the iterators we developed earlier, pointing
|
||||
to the first element in the sequence. The implementation of <a class="link" href="../sequence/intrinsic/functions/end.html" title="end"><code class="computeroutput"><span class="identifier">end</span></code></a> is very similar, and is provided
|
||||
to the first element in the sequence. The implementation of <a href="../sequence/intrinsic/functions/end.html" title="end"><tt class="computeroutput"><span class="identifier">end</span></tt></a> is very similar, and is provided
|
||||
in the example code.
|
||||
</p>
|
||||
<p>
|
||||
For our <a class="link" href="../sequence/concepts/random_access_sequence.html" title="Random Access Sequence">Random
|
||||
Access Sequence</a> we will also need to implement <code class="computeroutput"><span class="identifier">size_impl</span></code>,
|
||||
<code class="computeroutput"><span class="identifier">value_at_impl</span></code> and <code class="computeroutput"><span class="identifier">at_impl</span></code>.
|
||||
For our <a href="../sequence/concepts/random_access_sequence.html" title="Random
|
||||
Access Sequence">Random
|
||||
Access Sequence</a> we will also need to implement <tt class="computeroutput"><span class="identifier">size_impl</span></tt>,
|
||||
<tt class="computeroutput"><span class="identifier">value_at_impl</span></tt> and <tt class="computeroutput"><span class="identifier">at_impl</span></tt>.
|
||||
</p>
|
||||
<a name="fusion.extension.ext_full.enabling_our_type_as_an_associative_container"></a><h5>
|
||||
<a name="id741236"></a>
|
||||
<a class="link" href="ext_full.html#fusion.extension.ext_full.enabling_our_type_as_an_associative_container">Enabling
|
||||
<a name="fusion.extension.ext_full.enabling_our_type_as_an_associative_container"></a><h4>
|
||||
<a name="id604481"></a>
|
||||
<a href="ext_full.html#fusion.extension.ext_full.enabling_our_type_as_an_associative_container">Enabling
|
||||
our type as an associative container</a>
|
||||
</h5>
|
||||
</h4>
|
||||
<p>
|
||||
In order for <code class="computeroutput"><span class="identifier">example_struct</span></code>
|
||||
In order for <tt class="computeroutput"><span class="identifier">example_struct</span></tt>
|
||||
to serve as an associative container, we need to enable 3 lookup features,
|
||||
<a class="link" href="../sequence/intrinsic/functions/at_key.html" title="at_key"><code class="computeroutput"><span class="identifier">at_key</span></code></a>, <a class="link" href="../sequence/intrinsic/metafunctions/value_at_key.html" title="value_at_key"><code class="computeroutput"><span class="identifier">value_at_key</span></code></a> and <a class="link" href="../sequence/intrinsic/functions/has_key.html" title="has_key"><code class="computeroutput"><span class="identifier">has_key</span></code></a>. We also need to provide
|
||||
an implementation of the <code class="computeroutput"><span class="identifier">is_associative</span></code>
|
||||
<a href="../sequence/intrinsic/functions/at_key.html" title="at_key"><tt class="computeroutput"><span class="identifier">at_key</span></tt></a>, <a href="../sequence/intrinsic/metafunctions/value_at_key.html" title="value_at_key"><tt class="computeroutput"><span class="identifier">value_at_key</span></tt></a> and <a href="../sequence/intrinsic/functions/has_key.html" title="has_key"><tt class="computeroutput"><span class="identifier">has_key</span></tt></a>. We also need to provide
|
||||
an implementation of the <tt class="computeroutput"><span class="identifier">is_associative</span></tt>
|
||||
trait so that our sequence can be correctly identified as an associative
|
||||
container.
|
||||
</p>
|
||||
<p>
|
||||
To implement <code class="computeroutput"><span class="identifier">at_key_impl</span></code>
|
||||
we need to associate the <code class="computeroutput"><span class="identifier">fields</span><span class="special">::</span><span class="identifier">age</span></code> and
|
||||
<code class="computeroutput"><span class="identifier">fields</span><span class="special">::</span><span class="identifier">age</span></code> types described in the <a class="link" href="../quick_start.html" title="Quick Start">Quick
|
||||
Start</a> guide with the appropriate members of <code class="computeroutput"><span class="identifier">example_struct</span></code>.
|
||||
To implement <tt class="computeroutput"><span class="identifier">at_key_impl</span></tt>
|
||||
we need to associate the <tt class="computeroutput"><span class="identifier">fields</span><span class="special">::</span><span class="identifier">age</span></tt> and
|
||||
<tt class="computeroutput"><span class="identifier">fields</span><span class="special">::</span><span class="identifier">age</span></tt> types described in the <a href="../quick_start.html" title="Quick Start">Quick
|
||||
Start</a> guide with the appropriate members of <tt class="computeroutput"><span class="identifier">example_struct</span></tt>.
|
||||
Our implementation is as follows:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="keyword">template</span><span class="special"><></span>
|
||||
@ -487,18 +495,18 @@
|
||||
</pre>
|
||||
<p>
|
||||
Its all very similar to the implementations we've seen previously, such as
|
||||
<code class="computeroutput"><span class="identifier">deref_impl</span></code> and <code class="computeroutput"><span class="identifier">value_of_impl</span></code>. Instead of identifying the
|
||||
<tt class="computeroutput"><span class="identifier">deref_impl</span></tt> and <tt class="computeroutput"><span class="identifier">value_of_impl</span></tt>. Instead of identifying the
|
||||
members by index or position, we are now selecting them using the types
|
||||
<code class="computeroutput"><span class="identifier">fields</span><span class="special">::</span><span class="identifier">name</span></code> and <code class="computeroutput"><span class="identifier">fields</span><span class="special">::</span><span class="identifier">age</span></code>.
|
||||
The implementations of <code class="computeroutput"><span class="identifier">value_at_key_impl</span></code>
|
||||
and <code class="computeroutput"><span class="identifier">has_key_impl</span></code> are equally
|
||||
<tt class="computeroutput"><span class="identifier">fields</span><span class="special">::</span><span class="identifier">name</span></tt> and <tt class="computeroutput"><span class="identifier">fields</span><span class="special">::</span><span class="identifier">age</span></tt>.
|
||||
The implementations of <tt class="computeroutput"><span class="identifier">value_at_key_impl</span></tt>
|
||||
and <tt class="computeroutput"><span class="identifier">has_key_impl</span></tt> are equally
|
||||
straightforward, and are provided in the example code, along with an implementation
|
||||
of <code class="computeroutput"><span class="identifier">is_associative_impl</span></code>.
|
||||
of <tt class="computeroutput"><span class="identifier">is_associative_impl</span></tt>.
|
||||
</p>
|
||||
<a name="fusion.extension.ext_full.summary"></a><h5>
|
||||
<a name="id741936"></a>
|
||||
<a class="link" href="ext_full.html#fusion.extension.ext_full.summary">Summary</a>
|
||||
</h5>
|
||||
<a name="fusion.extension.ext_full.summary"></a><h4>
|
||||
<a name="id605488"></a>
|
||||
<a href="ext_full.html#fusion.extension.ext_full.summary">Summary</a>
|
||||
</h4>
|
||||
<p>
|
||||
We've now worked through the entire process for adding a new random access
|
||||
sequence and we've also enabled our type to serve as an associative container.
|
||||
@ -506,8 +514,8 @@
|
||||
pattern.
|
||||
</p>
|
||||
<p>
|
||||
The support for <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code>, <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a>
|
||||
sequences, and <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></code> all use the same approach, and provide
|
||||
The support for <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></tt>, <a href="http://www.boost.org/libs/mpl/index.html" target="_top">MPL</a>
|
||||
sequences, and <tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span></tt> all use the same approach, and provide
|
||||
additional examples of the approach for a variety of types.
|
||||
</p>
|
||||
</div>
|
||||
|
@ -3,10 +3,10 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Iterator Facade</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter<65>1.<2E>Fusion 2.0">
|
||||
<link rel="up" href="../extension.html" title="Extension">
|
||||
<link rel="prev" href="sequence_facade.html" title="Sequence Facade">
|
||||
<link rel="previous" href="sequence_facade.html" title="Sequence Facade">
|
||||
<link rel="next" href="../functional.html" title="Functional">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
@ -22,30 +22,33 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="sequence_facade.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../extension.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../functional.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" title="Iterator Facade">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="fusion.extension.iterator_facade"></a><a class="link" href="iterator_facade.html" title="Iterator Facade">Iterator Facade</a>
|
||||
</h3></div></div></div>
|
||||
<a name="fusion.extension.iterator_facade.description"></a><h5>
|
||||
<a name="id743080"></a>
|
||||
<a class="link" href="iterator_facade.html#fusion.extension.iterator_facade.description">Description</a>
|
||||
</h5>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage">
|
||||
<div><div><h3 class="title">
|
||||
<a name="fusion.extension.iterator_facade"></a><a href="iterator_facade.html" title="Iterator Facade">Iterator Facade</a>
|
||||
</h3></div></div>
|
||||
<div></div>
|
||||
</div>
|
||||
<a name="fusion.extension.iterator_facade.description"></a><h4>
|
||||
<a name="id607099"></a>
|
||||
<a href="iterator_facade.html#fusion.extension.iterator_facade.description">Description</a>
|
||||
</h4>
|
||||
<p>
|
||||
The <a class="link" href="iterator_facade.html" title="Iterator Facade"><code class="computeroutput"><span class="identifier">iterator_facade</span></code></a>
|
||||
The <a href="iterator_facade.html" title="Iterator Facade"><tt class="computeroutput"><span class="identifier">iterator_facade</span></tt></a>
|
||||
template provides an intrusive mechanism for producing a conforming Fusion
|
||||
iterator.
|
||||
</p>
|
||||
<a name="fusion.extension.iterator_facade.synopsis"></a><h5>
|
||||
<a name="id743106"></a>
|
||||
<a class="link" href="iterator_facade.html#fusion.extension.iterator_facade.synopsis">Synopsis</a>
|
||||
</h5>
|
||||
<a name="fusion.extension.iterator_facade.synopsis"></a><h4>
|
||||
<a name="id607146"></a>
|
||||
<a href="iterator_facade.html#fusion.extension.iterator_facade.synopsis">Synopsis</a>
|
||||
</h4>
|
||||
<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Derived</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">TravesalTag</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">iterator_facade</span><span class="special">;</span>
|
||||
</pre>
|
||||
<a name="fusion.extension.iterator_facade.usage"></a><h5>
|
||||
<a name="id743448"></a>
|
||||
<a class="link" href="iterator_facade.html#fusion.extension.iterator_facade.usage">Usage</a>
|
||||
</h5>
|
||||
<a name="fusion.extension.iterator_facade.usage"></a><h4>
|
||||
<a name="id607239"></a>
|
||||
<a href="iterator_facade.html#fusion.extension.iterator_facade.usage">Usage</a>
|
||||
</h4>
|
||||
<p>
|
||||
The user of iterator_facade derives his iterator type from a specialization
|
||||
of iterator_facade and passes the derived iterator type as the first template
|
||||
@ -57,326 +60,230 @@
|
||||
type.
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id743465"></a><p class="title"><b>Table<EFBFBD>1.93.<2E>Parameters</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Parameters">
|
||||
<a name="id607264"></a><p class="title"><b>Table<EFBFBD>1.93.<2E>Parameters</b></p>
|
||||
<table class="table" summary="Parameters">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>
|
||||
<p>
|
||||
<th><p>
|
||||
Name
|
||||
</p>
|
||||
</th>
|
||||
<th>
|
||||
<p>
|
||||
</p></th>
|
||||
<th><p>
|
||||
Description
|
||||
</p>
|
||||
</th>
|
||||
</p></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">iterator</span></code>, <code class="computeroutput"><span class="identifier">It</span></code>, <code class="computeroutput"><span class="identifier">It1</span></code>,
|
||||
<code class="computeroutput"><span class="identifier">It2</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
A type derived from <a class="link" href="iterator_facade.html" title="Iterator Facade"><code class="computeroutput"><span class="identifier">iterator_facade</span></code></a>
|
||||
</p>
|
||||
</td>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">iterator</span></tt>, <tt class="computeroutput"><span class="identifier">It</span></tt>, <tt class="computeroutput"><span class="identifier">It1</span></tt>,
|
||||
<tt class="computeroutput"><span class="identifier">It2</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
A type derived from <a href="iterator_facade.html" title="Iterator Facade"><tt class="computeroutput"><span class="identifier">iterator_facade</span></tt></a>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">N</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">N</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
|
||||
Integral Constant</a>
|
||||
</p>
|
||||
</td>
|
||||
</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</table>
|
||||
</div>
|
||||
<br class="table-break"><div class="table">
|
||||
<a name="id743586"></a><p class="title"><b>Table<EFBFBD>1.94.<2E>Key Expressions</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Key Expressions">
|
||||
<div class="table">
|
||||
<a name="id607422"></a><p class="title"><b>Table<EFBFBD>1.94.<2E>Key Expressions</b></p>
|
||||
<table class="table" summary="Key Expressions">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>
|
||||
<p>
|
||||
<th><p>
|
||||
Expression
|
||||
</p>
|
||||
</th>
|
||||
<th>
|
||||
<p>
|
||||
</p></th>
|
||||
<th><p>
|
||||
Result
|
||||
</p>
|
||||
</th>
|
||||
<th>
|
||||
<p>
|
||||
</p></th>
|
||||
<th><p>
|
||||
Default
|
||||
</p>
|
||||
</th>
|
||||
</p></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">value_of</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The element stored at iterator position <code class="computeroutput"><span class="identifier">It</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">value_of</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
The element stored at iterator position <tt class="computeroutput"><span class="identifier">It</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
None
|
||||
</p>
|
||||
</td>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">deref</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The type returned when dereferencing an iterator of type <code class="computeroutput"><span class="identifier">It</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">deref</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
The type returned when dereferencing an iterator of type <tt class="computeroutput"><span class="identifier">It</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
None
|
||||
</p>
|
||||
</td>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">deref</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">it</span><span class="special">)</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Dereferences iterator <code class="computeroutput"><span class="identifier">it</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">deref</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">it</span><span class="special">)</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
Dereferences iterator <tt class="computeroutput"><span class="identifier">it</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
None
|
||||
</p>
|
||||
</td>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">next</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The type of the next element from <code class="computeroutput"><span class="identifier">It</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">next</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
The type of the next element from <tt class="computeroutput"><span class="identifier">It</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
None
|
||||
</p>
|
||||
</td>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">next</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">it</span><span class="special">)</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The next iterator after <code class="computeroutput"><span class="identifier">it</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">next</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">it</span><span class="special">)</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
The next iterator after <tt class="computeroutput"><span class="identifier">it</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
None
|
||||
</p>
|
||||
</td>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">prior</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The type of the next element from <code class="computeroutput"><span class="identifier">It</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">prior</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
The type of the next element from <tt class="computeroutput"><span class="identifier">It</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
None
|
||||
</p>
|
||||
</td>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">prior</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">it</span><span class="special">)</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The next iterator after <code class="computeroutput"><span class="identifier">it</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">prior</span><span class="special"><</span><span class="identifier">It</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">it</span><span class="special">)</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
The next iterator after <tt class="computeroutput"><span class="identifier">it</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
None
|
||||
</p>
|
||||
</td>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">advance</span><span class="special"><</span><span class="identifier">It</span><span class="special">,</span> <span class="identifier">N</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The type of an iterator advanced <code class="computeroutput"><span class="identifier">N</span></code>
|
||||
elements from <code class="computeroutput"><span class="identifier">It</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Implemented in terms of <code class="computeroutput"><span class="identifier">next</span></code>
|
||||
and <code class="computeroutput"><span class="identifier">prior</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">advance</span><span class="special"><</span><span class="identifier">It</span><span class="special">,</span> <span class="identifier">N</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
The type of an iterator advanced <tt class="computeroutput"><span class="identifier">N</span></tt>
|
||||
elements from <tt class="computeroutput"><span class="identifier">It</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
Implemented in terms of <tt class="computeroutput"><span class="identifier">next</span></tt>
|
||||
and <tt class="computeroutput"><span class="identifier">prior</span></tt>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">advance</span><span class="special"><</span><span class="identifier">It</span><span class="special">,</span> <span class="identifier">N</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">it</span><span class="special">)</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
An iterator advanced <code class="computeroutput"><span class="identifier">N</span></code>
|
||||
elements from <code class="computeroutput"><span class="identifier">it</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Implemented in terms of <code class="computeroutput"><span class="identifier">next</span></code>
|
||||
and <code class="computeroutput"><span class="identifier">prior</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">advance</span><span class="special"><</span><span class="identifier">It</span><span class="special">,</span> <span class="identifier">N</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">it</span><span class="special">)</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
An iterator advanced <tt class="computeroutput"><span class="identifier">N</span></tt>
|
||||
elements from <tt class="computeroutput"><span class="identifier">it</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
Implemented in terms of <tt class="computeroutput"><span class="identifier">next</span></tt>
|
||||
and <tt class="computeroutput"><span class="identifier">prior</span></tt>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">distance</span><span class="special"><</span><span class="identifier">It1</span><span class="special">,</span> <span class="identifier">It2</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The distance between iterators of type <code class="computeroutput"><span class="identifier">It1</span></code>
|
||||
and <code class="computeroutput"><span class="identifier">It2</span></code> as an <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">distance</span><span class="special"><</span><span class="identifier">It1</span><span class="special">,</span> <span class="identifier">It2</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
The distance between iterators of type <tt class="computeroutput"><span class="identifier">It1</span></tt>
|
||||
and <tt class="computeroutput"><span class="identifier">It2</span></tt> as an <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
|
||||
Integral Constant</a>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
</p></td>
|
||||
<td><p>
|
||||
None
|
||||
</p>
|
||||
</td>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">distance</span><span class="special"><</span><span class="identifier">It1</span><span class="special">,</span> <span class="identifier">It2</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">it1</span><span class="special">,</span> <span class="identifier">it2</span><span class="special">)</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The distance between iterator <code class="computeroutput"><span class="identifier">it1</span></code>
|
||||
and <code class="computeroutput"><span class="identifier">it2</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">distance</span><span class="special"><</span><span class="identifier">It1</span><span class="special">,</span> <span class="identifier">It2</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">it1</span><span class="special">,</span> <span class="identifier">it2</span><span class="special">)</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
The distance between iterator <tt class="computeroutput"><span class="identifier">it1</span></tt>
|
||||
and <tt class="computeroutput"><span class="identifier">it2</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
None
|
||||
</p>
|
||||
</td>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">equal_to</span><span class="special"><</span><span class="identifier">It1</span><span class="special">,</span> <span class="identifier">It2</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The distance between iterators of type <code class="computeroutput"><span class="identifier">It1</span></code>
|
||||
and <code class="computeroutput"><span class="identifier">It2</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">same_type</span><span class="special"><</span><span class="identifier">It1</span><span class="special">,</span> <span class="identifier">It2</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">equal_to</span><span class="special"><</span><span class="identifier">It1</span><span class="special">,</span> <span class="identifier">It2</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
The distance between iterators of type <tt class="computeroutput"><span class="identifier">It1</span></tt>
|
||||
and <tt class="computeroutput"><span class="identifier">It2</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">same_type</span><span class="special"><</span><span class="identifier">It1</span><span class="special">,</span> <span class="identifier">It2</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">equal_to</span><span class="special"><</span><span class="identifier">It1</span><span class="special">,</span> <span class="identifier">It2</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">it1</span><span class="special">,</span> <span class="identifier">it2</span><span class="special">)</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The distance between iterators <code class="computeroutput"><span class="identifier">it1</span></code>
|
||||
and <code class="computeroutput"><span class="identifier">it2</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">same_type</span><span class="special"><</span><span class="identifier">It1</span><span class="special">,</span> <span class="identifier">It2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">()</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">iterator</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">equal_to</span><span class="special"><</span><span class="identifier">It1</span><span class="special">,</span> <span class="identifier">It2</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">it1</span><span class="special">,</span> <span class="identifier">it2</span><span class="special">)</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
The distance between iterators <tt class="computeroutput"><span class="identifier">it1</span></tt>
|
||||
and <tt class="computeroutput"><span class="identifier">it2</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">same_type</span><span class="special"><</span><span class="identifier">It1</span><span class="special">,</span> <span class="identifier">It2</span><span class="special">>::</span><span class="identifier">type</span><span class="special">()</span></tt>
|
||||
</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</table>
|
||||
</div>
|
||||
<br class="table-break"><a name="fusion.extension.iterator_facade.header"></a><h5>
|
||||
<a name="id744746"></a>
|
||||
<a class="link" href="iterator_facade.html#fusion.extension.iterator_facade.header">Header</a>
|
||||
</h5>
|
||||
<a name="fusion.extension.iterator_facade.header"></a><h4>
|
||||
<a name="id608981"></a>
|
||||
<a href="iterator_facade.html#fusion.extension.iterator_facade.header">Header</a>
|
||||
</h4>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">iterator</span><span class="special">/</span><span class="identifier">iterator_facade</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">iterator_facade</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
<a name="fusion.extension.iterator_facade.example"></a><h5>
|
||||
<a name="id744854"></a>
|
||||
<a class="link" href="iterator_facade.html#fusion.extension.iterator_facade.example">Example</a>
|
||||
</h5>
|
||||
<a name="fusion.extension.iterator_facade.example"></a><h4>
|
||||
<a name="id609138"></a>
|
||||
<a href="iterator_facade.html#fusion.extension.iterator_facade.example">Example</a>
|
||||
</h4>
|
||||
<p>
|
||||
A full working example using <a class="link" href="iterator_facade.html" title="Iterator Facade"><code class="computeroutput"><span class="identifier">iterator_facade</span></code></a> is provided in triple.cpp
|
||||
A full working example using <a href="iterator_facade.html" title="Iterator Facade"><tt class="computeroutput"><span class="identifier">iterator_facade</span></tt></a> is provided in triple.cpp
|
||||
in the extension examples.
|
||||
</p>
|
||||
</div>
|
||||
|
@ -3,10 +3,10 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Sequence Facade</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
|
||||
<link rel="home" href="../../index.html" title="Chapter<65>1.<2E>Fusion 2.0">
|
||||
<link rel="up" href="../extension.html" title="Extension">
|
||||
<link rel="prev" href="ext_full.html" title="The Full Extension Mechanism">
|
||||
<link rel="previous" href="ext_full.html" title=" The Full Extension Mechanism">
|
||||
<link rel="next" href="iterator_facade.html" title="Iterator Facade">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
@ -22,36 +22,39 @@
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="ext_full.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../extension.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="iterator_facade.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section" title="Sequence Facade">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
<a name="fusion.extension.sequence_facade"></a><a class="link" href="sequence_facade.html" title="Sequence Facade">Sequence Facade</a>
|
||||
</h3></div></div></div>
|
||||
<a name="fusion.extension.sequence_facade.description"></a><h5>
|
||||
<a name="id742001"></a>
|
||||
<a class="link" href="sequence_facade.html#fusion.extension.sequence_facade.description">Description</a>
|
||||
</h5>
|
||||
<div class="section" lang="en">
|
||||
<div class="titlepage">
|
||||
<div><div><h3 class="title">
|
||||
<a name="fusion.extension.sequence_facade"></a><a href="sequence_facade.html" title="Sequence Facade">Sequence Facade</a>
|
||||
</h3></div></div>
|
||||
<div></div>
|
||||
</div>
|
||||
<a name="fusion.extension.sequence_facade.description"></a><h4>
|
||||
<a name="id605596"></a>
|
||||
<a href="sequence_facade.html#fusion.extension.sequence_facade.description">Description</a>
|
||||
</h4>
|
||||
<p>
|
||||
The <a class="link" href="sequence_facade.html" title="Sequence Facade"><code class="computeroutput"><span class="identifier">sequence_facade</span></code></a>
|
||||
The <a href="sequence_facade.html" title="Sequence Facade"><tt class="computeroutput"><span class="identifier">sequence_facade</span></tt></a>
|
||||
template provides an intrusive mechanism for producing a conforming Fusion
|
||||
iterator.
|
||||
</p>
|
||||
<a name="fusion.extension.sequence_facade.synopsis"></a><h5>
|
||||
<a name="id742027"></a>
|
||||
<a class="link" href="sequence_facade.html#fusion.extension.sequence_facade.synopsis">Synopsis</a>
|
||||
</h5>
|
||||
<a name="fusion.extension.sequence_facade.synopsis"></a><h4>
|
||||
<a name="id605644"></a>
|
||||
<a href="sequence_facade.html#fusion.extension.sequence_facade.synopsis">Synopsis</a>
|
||||
</h4>
|
||||
<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Derived</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">TravesalTag</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">IsView</span> <span class="special">=</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span><span class="special">></span>
|
||||
<span class="keyword">struct</span> <span class="identifier">sequence_facade</span><span class="special">;</span>
|
||||
</pre>
|
||||
<a name="fusion.extension.sequence_facade.usage"></a><h5>
|
||||
<a name="id742121"></a>
|
||||
<a class="link" href="sequence_facade.html#fusion.extension.sequence_facade.usage">Usage</a>
|
||||
</h5>
|
||||
<a name="fusion.extension.sequence_facade.usage"></a><h4>
|
||||
<a name="id605777"></a>
|
||||
<a href="sequence_facade.html#fusion.extension.sequence_facade.usage">Usage</a>
|
||||
</h4>
|
||||
<p>
|
||||
The user of <a class="link" href="sequence_facade.html" title="Sequence Facade"><code class="computeroutput"><span class="identifier">sequence_facade</span></code></a> derives his sequence
|
||||
type from a specialization of <a class="link" href="sequence_facade.html" title="Sequence Facade"><code class="computeroutput"><span class="identifier">sequence_facade</span></code></a> and passes the derived
|
||||
The user of <a href="sequence_facade.html" title="Sequence Facade"><tt class="computeroutput"><span class="identifier">sequence_facade</span></tt></a> derives his sequence
|
||||
type from a specialization of <a href="sequence_facade.html" title="Sequence Facade"><tt class="computeroutput"><span class="identifier">sequence_facade</span></tt></a> and passes the derived
|
||||
sequence type as the first template parameter. The second template parameter
|
||||
should be the traversal category of the sequence being implemented. The 3rd
|
||||
parameter should be set to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
|
||||
parameter should be set to <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></tt>
|
||||
if the sequence is a view.
|
||||
</p>
|
||||
<p>
|
||||
@ -59,202 +62,150 @@
|
||||
type.
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id742172"></a><p class="title"><b>Table<EFBFBD>1.91.<2E>Parameters</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Parameters">
|
||||
<a name="id605864"></a><p class="title"><b>Table<EFBFBD>1.91.<2E>Parameters</b></p>
|
||||
<table class="table" summary="Parameters">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>
|
||||
<p>
|
||||
<th><p>
|
||||
Name
|
||||
</p>
|
||||
</th>
|
||||
<th>
|
||||
<p>
|
||||
</p></th>
|
||||
<th><p>
|
||||
Description
|
||||
</p>
|
||||
</th>
|
||||
</p></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">sequence</span></code>, <code class="computeroutput"><span class="identifier">Seq</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
A type derived from <a class="link" href="sequence_facade.html" title="Sequence Facade"><code class="computeroutput"><span class="identifier">sequence_facade</span></code></a>
|
||||
</p>
|
||||
</td>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">sequence</span></tt>, <tt class="computeroutput"><span class="identifier">Seq</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
A type derived from <a href="sequence_facade.html" title="Sequence Facade"><tt class="computeroutput"><span class="identifier">sequence_facade</span></tt></a>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">N</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">N</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
An <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
|
||||
Integral Constant</a>
|
||||
</p>
|
||||
</td>
|
||||
</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</table>
|
||||
</div>
|
||||
<br class="table-break"><div class="table">
|
||||
<a name="id742279"></a><p class="title"><b>Table<EFBFBD>1.92.<2E>Key Expressions</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Key Expressions">
|
||||
<div class="table">
|
||||
<a name="id605998"></a><p class="title"><b>Table<EFBFBD>1.92.<2E>Key Expressions</b></p>
|
||||
<table class="table" summary="Key Expressions">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<thead><tr>
|
||||
<th>
|
||||
<p>
|
||||
<th><p>
|
||||
Expression
|
||||
</p>
|
||||
</th>
|
||||
<th>
|
||||
<p>
|
||||
</p></th>
|
||||
<th><p>
|
||||
Result
|
||||
</p>
|
||||
</th>
|
||||
</p></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">begin</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The type of an iterator to the beginning of a sequence of type <code class="computeroutput"><span class="identifier">Seq</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">begin</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
The type of an iterator to the beginning of a sequence of type <tt class="computeroutput"><span class="identifier">Seq</span></tt>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">begin</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">seq</span><span class="special">)</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
An iterator to the beginning of sequence <code class="computeroutput"><span class="identifier">seq</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">begin</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">seq</span><span class="special">)</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
An iterator to the beginning of sequence <tt class="computeroutput"><span class="identifier">seq</span></tt>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">end</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The type of an iterator to the end of a sequence of type <code class="computeroutput"><span class="identifier">Seq</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">end</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
The type of an iterator to the end of a sequence of type <tt class="computeroutput"><span class="identifier">Seq</span></tt>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">end</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">seq</span><span class="special">)</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
An iterator to the end of sequence <code class="computeroutput"><span class="identifier">seq</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">end</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">seq</span><span class="special">)</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
An iterator to the end of sequence <tt class="computeroutput"><span class="identifier">seq</span></tt>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">size</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The size of a sequence of type <code class="computeroutput"><span class="identifier">Seq</span></code>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">size</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
The size of a sequence of type <tt class="computeroutput"><span class="identifier">Seq</span></tt>
|
||||
as an <a href="http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
|
||||
Integral Constant</a>
|
||||
</p>
|
||||
</td>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">size</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">seq</span><span class="special">)</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The size of sequence <code class="computeroutput"><span class="identifier">seq</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">size</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">seq</span><span class="special">)</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
The size of sequence <tt class="computeroutput"><span class="identifier">seq</span></tt>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">at</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">,</span> <span class="identifier">N</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The type of element <code class="computeroutput"><span class="identifier">N</span></code>
|
||||
in a sequence of type <code class="computeroutput"><span class="identifier">Seq</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">at</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">,</span> <span class="identifier">N</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
The type of element <tt class="computeroutput"><span class="identifier">N</span></tt>
|
||||
in a sequence of type <tt class="computeroutput"><span class="identifier">Seq</span></tt>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">at</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">,</span> <span class="identifier">N</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">seq</span><span class="special">)</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Element <code class="computeroutput"><span class="identifier">N</span></code> in sequence
|
||||
<code class="computeroutput"><span class="identifier">seq</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">at</span><span class="special"><</span><span class="identifier">Seq</span><span class="special">,</span> <span class="identifier">N</span><span class="special">>::</span><span class="identifier">call</span><span class="special">(</span><span class="identifier">seq</span><span class="special">)</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
Element <tt class="computeroutput"><span class="identifier">N</span></tt> in sequence
|
||||
<tt class="computeroutput"><span class="identifier">seq</span></tt>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">value_at</span><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">N</span><span class="special">>::</span><span class="identifier">type</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
The type of the <code class="computeroutput"><span class="identifier">N</span></code>th
|
||||
element in a sequence of type <code class="computeroutput"><span class="identifier">Seq</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td><p>
|
||||
<tt class="computeroutput"><span class="identifier">sequence</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">value_at</span><span class="special"><</span><span class="identifier">Sequence</span><span class="special">,</span> <span class="identifier">N</span><span class="special">>::</span><span class="identifier">type</span></tt>
|
||||
</p></td>
|
||||
<td><p>
|
||||
The type of the <tt class="computeroutput"><span class="identifier">N</span></tt>th
|
||||
element in a sequence of type <tt class="computeroutput"><span class="identifier">Seq</span></tt>
|
||||
</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</table>
|
||||
</div>
|
||||
<br class="table-break"><a name="fusion.extension.sequence_facade.include"></a><h5>
|
||||
<a name="id742934"></a>
|
||||
<a class="link" href="sequence_facade.html#fusion.extension.sequence_facade.include">Include</a>
|
||||
</h5>
|
||||
<a name="fusion.extension.sequence_facade.include"></a><h4>
|
||||
<a name="id606877"></a>
|
||||
<a href="sequence_facade.html#fusion.extension.sequence_facade.include">Include</a>
|
||||
</h4>
|
||||
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">/</span><span class="identifier">sequence_facade</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">sequence_facade</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||
</pre>
|
||||
<a name="fusion.extension.sequence_facade.example"></a><h5>
|
||||
<a name="id743042"></a>
|
||||
<a class="link" href="sequence_facade.html#fusion.extension.sequence_facade.example">Example</a>
|
||||
</h5>
|
||||
<a name="fusion.extension.sequence_facade.example"></a><h4>
|
||||
<a name="id607033"></a>
|
||||
<a href="sequence_facade.html#fusion.extension.sequence_facade.example">Example</a>
|
||||
</h4>
|
||||
<p>
|
||||
A full working example using <a class="link" href="sequence_facade.html" title="Sequence Facade"><code class="computeroutput"><span class="identifier">sequence_facade</span></code></a> is provided in triple.cpp
|
||||
A full working example using <a href="sequence_facade.html" title="Sequence Facade"><tt class="computeroutput"><span class="identifier">sequence_facade</span></tt></a> is provided in triple.cpp
|
||||
in the extension examples.
|
||||
</p>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user