Imported Upstream version 1.49.0
[platform/upstream/boost.git] / doc / html / PrimitiveTransform.html
1 <html>
2 <head>
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">
11 </head>
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>
20 </tr></table>
21 <hr>
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>
24 </div>
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>
30 </div>
31 <div class="refsect1">
32 <a name="id2894816"></a><h2>Description</h2>
33 <p>
34       A PrimitiveTransform is a class type that
35       has a nested class template called
36       <code class="computeroutput">impl&lt;&gt;</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&lt;&gt;</code> template.
45     </p>
46 </div>
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&lt;Expr, State, Data&gt;::result_type</pre>
52 <p>
53       </p>
54 <p>The return type of the overloaded function call operator.</p>
55 <p>
56     </p>
57 </li></ul></div>
58 </div>
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>
78 </dl></div>
79 </div>
80 <div class="refsect1">
81 <a name="id2894975"></a><h2>Valid expressions</h2>
82 <div class="informaltable"><table class="table">
83 <colgroup>
84 <col>
85 <col>
86 <col>
87 <col>
88 </colgroup>
89 <thead><tr>
90 <th>Name</th>
91 <th>Expression</th>
92 <th>Type</th>
93 <th>Semantics</th>
94 </tr></thead>
95 <tbody>
96 <tr>
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>
101 </tr>
102 <tr>
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>
107 </tr>
108 <tr>
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>
113 </tr>
114 <tr>
115 <td><p>Monomorphic Function Call</p></td>
116 <td><p>typename Fn::template impl&lt; Expr, State, Data &gt;()(expr, state, data)</p></td>
117 <td><p><span class="type">result_type</span></p></td>
118 <td><p>Applies the transform.</p></td>
119 </tr>
120 </tbody>
121 </table></div>
122 </div>
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&lt; 0 &gt;</span></span></li></ul></div>
126 </div>
127 </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 &#169; 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>)
133       </p>
134 </div></td>
135 </tr></table>
136 <hr>
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>
139 </div>
140 </body>
141 </html>