forked from boostorg/fusion
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<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.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.0-pre">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.0">
|
||||
<link rel="up" href="../extension.html" title="Extension">
|
||||
<link rel="prev" href="../extension.html" title="Extension">
|
||||
@ -37,19 +37,20 @@
|
||||
</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>
|
||||
mechanism used by Fusion for your sequence type
|
||||
</li>
|
||||
Enable the <a class="link" 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">
|
||||
Design an iterator type for the sequence
|
||||
</li>
|
||||
Design an iterator type for the sequence
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Provide specialized behaviour for the intrinsic operations of the new Fusion
|
||||
sequence
|
||||
</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="id1076701"></a>
|
||||
<a name="id960308"></a>
|
||||
<a class="link" href="ext_full.html#fusion.extension.ext_full.our_example">Our example</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -79,7 +80,7 @@
|
||||
Start</a> guide.
|
||||
</p>
|
||||
<a name="fusion.extension.ext_full.enabling_tag_dispatching"></a><h5>
|
||||
<a name="id1076905"></a>
|
||||
<a name="id960598"></a>
|
||||
<a class="link" href="ext_full.html#fusion.extension.ext_full.enabling_tag_dispatching">Enabling
|
||||
Tag Dispatching</a>
|
||||
</h5>
|
||||
@ -120,7 +121,7 @@
|
||||
<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="id1077341"></a>
|
||||
<a name="id961218"></a>
|
||||
<a class="link" href="ext_full.html#fusion.extension.ext_full.designing_a_suitable_iterator">Designing
|
||||
a suitable iterator</a>
|
||||
</h5>
|
||||
@ -154,23 +155,23 @@
|
||||
</p>
|
||||
<div class="orderedlist"><ol class="orderedlist" type="1">
|
||||
<li class="listitem">
|
||||
The iterator is parameterized by the type it is iterating over, and the
|
||||
index of the current element.
|
||||
</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
|
||||
access to information we will need later in the implementation.
|
||||
</li>
|
||||
The typedefs <code class="computeroutput"><span class="identifier">struct_type</span></code>
|
||||
and <code class="computeroutput"><span class="identifier">index</span></code> 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>
|
||||
metafunction to establish the traversal category of the iterator.
|
||||
</li>
|
||||
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>
|
||||
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>
|
||||
being iterated over.
|
||||
</li>
|
||||
The constructor stores a reference to the <code class="computeroutput"><span class="identifier">example_struct</span></code>
|
||||
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
|
||||
@ -182,7 +183,7 @@
|
||||
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="id1077799"></a>
|
||||
<a name="id961890"></a>
|
||||
<a class="link" href="ext_full.html#fusion.extension.ext_full.a_first_couple_of_instructive_features">A
|
||||
first couple of instructive features</a>
|
||||
</h5>
|
||||
@ -322,7 +323,7 @@
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<a name="fusion.extension.ext_full.implementing_the_remaining_iterator_functionality"></a><h5>
|
||||
<a name="id1079984"></a>
|
||||
<a name="id964227"></a>
|
||||
<a class="link" href="ext_full.html#fusion.extension.ext_full.implementing_the_remaining_iterator_functionality">Implementing
|
||||
the remaining iterator functionality</a>
|
||||
</h5>
|
||||
@ -373,7 +374,7 @@
|
||||
are provided in the example code.
|
||||
</p>
|
||||
<a name="fusion.extension.ext_full.implementing_the_intrinsic_functions_of_the_sequence"></a><h5>
|
||||
<a name="id1080428"></a>
|
||||
<a name="id964885"></a>
|
||||
<a class="link" href="ext_full.html#fusion.extension.ext_full.implementing_the_intrinsic_functions_of_the_sequence">Implementing
|
||||
the intrinsic functions of the sequence</a>
|
||||
</h5>
|
||||
@ -429,7 +430,7 @@
|
||||
<code class="computeroutput"><span class="identifier">value_at_impl</span></code> and <code class="computeroutput"><span class="identifier">at_impl</span></code>.
|
||||
</p>
|
||||
<a name="fusion.extension.ext_full.enabling_our_type_as_an_associative_sequence"></a><h5>
|
||||
<a name="id1080840"></a>
|
||||
<a name="id965488"></a>
|
||||
<a class="link" href="ext_full.html#fusion.extension.ext_full.enabling_our_type_as_an_associative_sequence">Enabling
|
||||
our type as an associative sequence</a>
|
||||
</h5>
|
||||
@ -493,7 +494,7 @@
|
||||
are provided in the example code.
|
||||
</p>
|
||||
<a name="fusion.extension.ext_full.summary"></a><h5>
|
||||
<a name="id1081554"></a>
|
||||
<a name="id966521"></a>
|
||||
<a class="link" href="ext_full.html#fusion.extension.ext_full.summary">Summary</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Iterator Facade</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.0-pre">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.0">
|
||||
<link rel="up" href="../extension.html" title="Extension">
|
||||
<link rel="prev" href="sequence_facade.html" title="Sequence Facade">
|
||||
@ -27,7 +27,7 @@
|
||||
<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="id1082713"></a>
|
||||
<a name="id968149"></a>
|
||||
<a class="link" href="iterator_facade.html#fusion.extension.iterator_facade.description">Description</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -36,14 +36,14 @@
|
||||
iterator.
|
||||
</p>
|
||||
<a name="fusion.extension.iterator_facade.synopsis"></a><h5>
|
||||
<a name="id1082740"></a>
|
||||
<a name="id968196"></a>
|
||||
<a class="link" href="iterator_facade.html#fusion.extension.iterator_facade.synopsis">Synopsis</a>
|
||||
</h5>
|
||||
<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="id1082803"></a>
|
||||
<a name="id968289"></a>
|
||||
<a class="link" href="iterator_facade.html#fusion.extension.iterator_facade.usage">Usage</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -57,7 +57,7 @@
|
||||
type.
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id1082820"></a><p class="title"><b>Table 1.97. Parameters</b></p>
|
||||
<a name="id968314"></a><p class="title"><b>Table 1.97. Parameters</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Parameters">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -106,7 +106,7 @@
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break"><div class="table">
|
||||
<a name="id1082945"></a><p class="title"><b>Table 1.98. Key Expressions</b></p>
|
||||
<a name="id968476"></a><p class="title"><b>Table 1.98. Key Expressions</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Key Expressions">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -439,14 +439,14 @@
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break"><a name="fusion.extension.iterator_facade.header"></a><h5>
|
||||
<a name="id1086739"></a>
|
||||
<a name="id970438"></a>
|
||||
<a class="link" href="iterator_facade.html#fusion.extension.iterator_facade.header">Header</a>
|
||||
</h5>
|
||||
<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="id1086847"></a>
|
||||
<a name="id970595"></a>
|
||||
<a class="link" href="iterator_facade.html#fusion.extension.iterator_facade.example">Example</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Sequence Facade</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.76.0-pre">
|
||||
<link rel="home" href="../../index.html" title="Chapter 1. Fusion 2.0">
|
||||
<link rel="up" href="../extension.html" title="Extension">
|
||||
<link rel="prev" href="ext_full.html" title="The Full Extension Mechanism">
|
||||
@ -27,7 +27,7 @@
|
||||
<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="id1081619"></a>
|
||||
<a name="id966629"></a>
|
||||
<a class="link" href="sequence_facade.html#fusion.extension.sequence_facade.description">Description</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -36,14 +36,14 @@
|
||||
iterator.
|
||||
</p>
|
||||
<a name="fusion.extension.sequence_facade.synopsis"></a><h5>
|
||||
<a name="id1081645"></a>
|
||||
<a name="id966677"></a>
|
||||
<a class="link" href="sequence_facade.html#fusion.extension.sequence_facade.synopsis">Synopsis</a>
|
||||
</h5>
|
||||
<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="id1081739"></a>
|
||||
<a name="id966809"></a>
|
||||
<a class="link" href="sequence_facade.html#fusion.extension.sequence_facade.usage">Usage</a>
|
||||
</h5>
|
||||
<p>
|
||||
@ -59,7 +59,7 @@
|
||||
type.
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id1081790"></a><p class="title"><b>Table 1.95. Parameters</b></p>
|
||||
<a name="id966897"></a><p class="title"><b>Table 1.95. Parameters</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Parameters">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -107,7 +107,7 @@
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break"><div class="table">
|
||||
<a name="id1081901"></a><p class="title"><b>Table 1.96. Key Expressions</b></p>
|
||||
<a name="id967035"></a><p class="title"><b>Table 1.96. Key Expressions</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Key Expressions">
|
||||
<colgroup>
|
||||
<col>
|
||||
@ -244,14 +244,14 @@
|
||||
</table></div>
|
||||
</div>
|
||||
<br class="table-break"><a name="fusion.extension.sequence_facade.include"></a><h5>
|
||||
<a name="id1082568"></a>
|
||||
<a name="id967927"></a>
|
||||
<a class="link" href="sequence_facade.html#fusion.extension.sequence_facade.include">Include</a>
|
||||
</h5>
|
||||
<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="id1082676"></a>
|
||||
<a name="id968083"></a>
|
||||
<a class="link" href="sequence_facade.html#fusion.extension.sequence_facade.example">Example</a>
|
||||
</h5>
|
||||
<p>
|
||||
|
Reference in New Issue
Block a user