3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Concept PrimitiveTransform</title>
5 <link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
8 <link rel="up" href="proto/reference.html" title="Reference">
9 <link rel="prev" href="PolymorphicFunctionObject.html" title="Concept PolymorphicFunctionObject">
10 <link rel="next" href="Transform.html" title="Concept Transform">
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../boost.png"></td>
15 <td align="center"><a href="../../index.html">Home</a></td>
16 <td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../more/index.htm">More</a></td>
22 <div class="spirit-nav">
23 <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 class="refentry">
26 <a name="PrimitiveTransform"></a><div class="titlepage"></div>
27 <div class="refnamediv">
28 <h2><span class="refentrytitle">Concept PrimitiveTransform</span></h2>
29 <p>PrimitiveTransform</p>
31 <div class="refsect1">
32 <a name="id2894816"></a><h2>Description</h2>
34 A PrimitiveTransform is a class type that
35 has a nested class template called
36 <code class="computeroutput">impl<></code> that takes
37 three template parameters representing an expression
38 type, a state type and a data type. Specializations
39 of the nested impl template are ternary monomorphic
40 function objects that accept expression, state, and
41 data parameters. A PrimitiveTransform is also a
42 <a class="link" href="PolymorphicFunctionObject.html" title="Concept PolymorphicFunctionObject">PolymorphicFunctionObject</a>
43 implemented in terms of the nested
44 <code class="computeroutput">impl<></code> template.
47 <div class="refsect1">
48 <a name="id2894851"></a><h2>Associated types</h2>
49 <div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
50 <p><span class="bold"><strong>result_type</strong></span></p>
51 <pre class="literallayout">typename Fn::template impl<Expr, State, Data>::result_type</pre>
54 <p>The return type of the overloaded function call operator.</p>
59 <div class="refsect1">
60 <a name="id2894877"></a><h2>Notation</h2>
61 <div class="variablelist"><dl>
62 <dt><span class="term">Fn</span></dt>
63 <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>
64 <dt><span class="term">Expr</span></dt>
65 <dd>A type playing the role of expression-type in the <a class="link" href="PrimitiveTransform.html" title="Concept PrimitiveTransform">PrimitiveTransform</a> concept.</dd>
66 <dt><span class="term">State</span></dt>
67 <dd>A type playing the role of state-type in the <a class="link" href="PrimitiveTransform.html" title="Concept PrimitiveTransform">PrimitiveTransform</a> concept.</dd>
68 <dt><span class="term">Data</span></dt>
69 <dd>A type playing the role of data-type in the <a class="link" href="PrimitiveTransform.html" title="Concept PrimitiveTransform">PrimitiveTransform</a> concept.</dd>
70 <dt><span class="term"><code class="varname">fn</code></span></dt>
71 <dd>Object of type Fn</dd>
72 <dt><span class="term"><code class="varname">expr</code></span></dt>
73 <dd>Object of type Expr</dd>
74 <dt><span class="term"><code class="varname">state</code></span></dt>
75 <dd>Object of type State</dd>
76 <dt><span class="term"><code class="varname">data</code></span></dt>
77 <dd>Object of type Data</dd>
80 <div class="refsect1">
81 <a name="id2894975"></a><h2>Valid expressions</h2>
82 <div class="informaltable"><table class="table">
97 <td><p>Polymorphic Function Call 1</p></td>
98 <td><p>fn(expr)</p></td>
99 <td><p><span class="type">result_type</span></p></td>
100 <td><p>Applies the transform.</p></td>
103 <td><p>Polymorphic Function Call 2</p></td>
104 <td><p>fn(expr, state)</p></td>
105 <td><p><span class="type">result_type</span></p></td>
106 <td><p>Applies the transform.</p></td>
109 <td><p>Polymorphic Function Call 3</p></td>
110 <td><p>fn(expr, state, data)</p></td>
111 <td><p><span class="type">result_type</span></p></td>
112 <td><p>Applies the transform.</p></td>
115 <td><p>Monomorphic Function Call</p></td>
116 <td><p>typename Fn::template impl< Expr, State, Data >()(expr, state, data)</p></td>
117 <td><p><span class="type">result_type</span></p></td>
118 <td><p>Applies the transform.</p></td>
123 <div class="refsect1">
124 <a name="id2895065"></a><h2>Models</h2>
125 <div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><span class="simplelist"><span class="type">boost::proto::_child_c< 0 ></span></span></li></ul></div>
128 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
129 <td align="left"></td>
130 <td align="right"><div class="copyright-footer">Copyright © 2008 Eric Niebler<p>
131 Distributed under the Boost Software License, Version 1.0. (See accompanying
132 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>)
137 <div class="spirit-nav">
138 <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>