• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html>
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5<title>Concept PrimitiveTransform</title>
6<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
7<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
8<link rel="home" href="index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
9<link rel="up" href="proto/reference.html" title="Reference">
10<link rel="prev" href="PolymorphicFunctionObject.html" title="Concept PolymorphicFunctionObject">
11<link rel="next" href="Transform.html" title="Concept Transform">
12</head>
13<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
14<table cellpadding="2" width="100%"><tr>
15<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../boost.png"></td>
16<td align="center"><a href="../../index.html">Home</a></td>
17<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
18<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
19<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
20<td align="center"><a href="../../more/index.htm">More</a></td>
21</tr></table>
22<hr>
23<div class="spirit-nav">
24<a accesskey="p" href="PolymorphicFunctionObject.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="proto/reference.html"><img src="../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="Transform.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
25</div>
26<div class="refentry">
27<a name="PrimitiveTransform"></a><div class="titlepage"></div>
28<div class="refnamediv">
29<h2><span class="refentrytitle">Concept PrimitiveTransform</span></h2>
30<p>PrimitiveTransform</p>
31</div>
32<div class="refsect1">
33<a name="id-1.3.33.5.64.3"></a><h2>Description</h2>
34<p>
35      A PrimitiveTransform is a class type that
36      has a nested class template called
37      <code class="computeroutput">impl&lt;&gt;</code> that takes
38      three template parameters representing an expression
39      type, a state type and a data type. Specializations
40      of the nested impl template are ternary monomorphic
41      function objects that accept expression, state, and
42      data parameters. A PrimitiveTransform is also a
43      <a class="link" href="PolymorphicFunctionObject.html" title="Concept PolymorphicFunctionObject">PolymorphicFunctionObject</a>
44      implemented in terms of the nested
45      <code class="computeroutput">impl&lt;&gt;</code> template.
46    </p>
47</div>
48<div class="refsect1">
49<a name="id-1.3.33.5.64.4"></a><h2>Associated types</h2>
50<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
51<p><span class="bold"><strong>result_type</strong></span></p>
52<pre class="literallayout">typename Fn::template impl&lt;Expr, State, Data&gt;::result_type</pre>
53<p>
54      </p>
55<p>The return type of the overloaded function call operator.</p>
56<p>
57    </p>
58</li></ul></div>
59</div>
60<div class="refsect1">
61<a name="id-1.3.33.5.64.5"></a><h2>Notation</h2>
62<div class="variablelist"><dl class="variablelist">
63<dt><span class="term">Fn</span></dt>
64<dd>A type playing the role of primitive-transform-type in the <a class="link" href="PrimitiveTransform.html" title="Concept PrimitiveTransform">PrimitiveTransform</a> concept.</dd>
65<dt><span class="term">Expr</span></dt>
66<dd>A type playing the role of expression-type in the <a class="link" href="PrimitiveTransform.html" title="Concept PrimitiveTransform">PrimitiveTransform</a> concept.</dd>
67<dt><span class="term">State</span></dt>
68<dd>A type playing the role of state-type in the <a class="link" href="PrimitiveTransform.html" title="Concept PrimitiveTransform">PrimitiveTransform</a> concept.</dd>
69<dt><span class="term">Data</span></dt>
70<dd>A type playing the role of data-type in the <a class="link" href="PrimitiveTransform.html" title="Concept PrimitiveTransform">PrimitiveTransform</a> concept.</dd>
71<dt><span class="term"><code class="varname">fn</code></span></dt>
72<dd>Object of type Fn</dd>
73<dt><span class="term"><code class="varname">expr</code></span></dt>
74<dd>Object of type Expr</dd>
75<dt><span class="term"><code class="varname">state</code></span></dt>
76<dd>Object of type State</dd>
77<dt><span class="term"><code class="varname">data</code></span></dt>
78<dd>Object of type Data</dd>
79</dl></div>
80</div>
81<div class="refsect1">
82<a name="id-1.3.33.5.64.6"></a><h2>Valid expressions</h2>
83<div class="informaltable"><table class="table">
84<colgroup>
85<col>
86<col>
87<col>
88<col>
89</colgroup>
90<thead><tr>
91<th>Name</th>
92<th>Expression</th>
93<th>Type</th>
94<th>Semantics</th>
95</tr></thead>
96<tbody>
97<tr>
98<td><p>Polymorphic Function Call 1</p></td>
99<td><p>fn(expr)</p></td>
100<td><p><span class="type">result_type</span></p></td>
101<td><p>Applies the transform.</p></td>
102</tr>
103<tr>
104<td><p>Polymorphic Function Call 2</p></td>
105<td><p>fn(expr, state)</p></td>
106<td><p><span class="type">result_type</span></p></td>
107<td><p>Applies the transform.</p></td>
108</tr>
109<tr>
110<td><p>Polymorphic Function Call 3</p></td>
111<td><p>fn(expr, state, data)</p></td>
112<td><p><span class="type">result_type</span></p></td>
113<td><p>Applies the transform.</p></td>
114</tr>
115<tr>
116<td><p>Monomorphic Function Call</p></td>
117<td><p>typename Fn::template impl&lt; Expr, State, Data &gt;()(expr, state, data)</p></td>
118<td><p><span class="type">result_type</span></p></td>
119<td><p>Applies the transform.</p></td>
120</tr>
121</tbody>
122</table></div>
123</div>
124<div class="refsect1">
125<a name="id-1.3.33.5.64.7"></a><h2>Models</h2>
126<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><span class="simplelist"><span class="type">boost::proto::_child_c&lt; 0 &gt;</span></span></li></ul></div>
127</div>
128</div>
129<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
130<td align="left"></td>
131<td align="right"><div class="copyright-footer">Copyright © 2008 Eric Niebler<p>
132        Distributed under the Boost Software License, Version 1.0. (See accompanying
133        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
134      </p>
135</div></td>
136</tr></table>
137<hr>
138<div class="spirit-nav">
139<a accesskey="p" href="PolymorphicFunctionObject.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="proto/reference.html"><img src="../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="Transform.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
140</div>
141</body>
142</html>
143