forked from boostorg/fusion
merge from trunk
[SVN r47205]
This commit is contained in:
@ -3,19 +3,19 @@
|
||||
<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.73.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
|
||||
<link rel="start" 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="prev" 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">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
||||
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
||||
<td align="center"><a href="../../../../../../index.htm">Home</a></td>
|
||||
<td align="center"><a href="../../../../../libraries.htm">Libraries</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/people/people.htm">People</a></td>
|
||||
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../people/people.htm">People</a></td>
|
||||
<td align="center"><a href="../../../../../../more/faq.htm">FAQ</a></td>
|
||||
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
@ -24,35 +24,34 @@
|
||||
</div>
|
||||
<div class="section" lang="en">
|
||||
<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="id2808773"></a>
|
||||
<a class="link" href="sequence_facade.html#fusion.extension.sequence_facade.description">Description</a>
|
||||
</h5>
|
||||
<a name="fusion.extension.sequence_facade"></a><a href="sequence_facade.html" title="Sequence Facade">Sequence Facade</a></h3></div></div></div>
|
||||
<a name="fusion.extension.sequence_facade.description"></a><h4>
|
||||
<a name="id650261"></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="id2808814"></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="id650310"></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="id2808936"></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="id650445"></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>
|
||||
@ -60,8 +59,8 @@
|
||||
type.
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id2809016"></a><p class="title"><b>Table<EFBFBD>1.91.<2E>Parameters</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Parameters">
|
||||
<a name="id650534"></a><p class="title"><b>Table<EFBFBD>1.91.<2E>Parameters</b></p>
|
||||
<table class="table" summary="Parameters">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@ -82,19 +81,19 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">sequence</span></code>, <code class="computeroutput"><span class="identifier">Seq</span></code>
|
||||
<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 class="link" href="sequence_facade.html" title="Sequence Facade"><code class="computeroutput"><span class="identifier">sequence_facade</span></code></a>
|
||||
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>
|
||||
<tt class="computeroutput"><span class="identifier">N</span></tt>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
@ -105,11 +104,11 @@
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</table>
|
||||
</div>
|
||||
<br class="table-break"><div class="table">
|
||||
<a name="id2809138"></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="id650668"></a><p class="title"><b>Table<EFBFBD>1.92.<2E>Key Expressions</b></p>
|
||||
<table class="table" summary="Key Expressions">
|
||||
<colgroup>
|
||||
<col>
|
||||
<col>
|
||||
@ -130,60 +129,60 @@
|
||||
<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>
|
||||
<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 <code class="computeroutput"><span class="identifier">Seq</span></code>
|
||||
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>
|
||||
<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 <code class="computeroutput"><span class="identifier">seq</span></code>
|
||||
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>
|
||||
<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 <code class="computeroutput"><span class="identifier">Seq</span></code>
|
||||
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>
|
||||
<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 <code class="computeroutput"><span class="identifier">seq</span></code>
|
||||
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>
|
||||
<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 <code class="computeroutput"><span class="identifier">Seq</span></code>
|
||||
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>
|
||||
@ -192,71 +191,71 @@
|
||||
<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>
|
||||
<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 <code class="computeroutput"><span class="identifier">seq</span></code>
|
||||
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>
|
||||
<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 <code class="computeroutput"><span class="identifier">N</span></code>
|
||||
in a sequence of type <code class="computeroutput"><span class="identifier">Seq</span></code>
|
||||
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>
|
||||
<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 <code class="computeroutput"><span class="identifier">N</span></code> in sequence
|
||||
<code class="computeroutput"><span class="identifier">seq</span></code>
|
||||
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>
|
||||
<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 <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>
|
||||
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="id2809933"></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="id651548"></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="id2810075"></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="id651706"></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