• 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 ObjectTransform</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="Expr.html" title="Concept Expr">
11<link rel="next" href="PolymorphicFunctionObject.html" title="Concept PolymorphicFunctionObject">
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="Expr.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="PolymorphicFunctionObject.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
25</div>
26<div class="refentry">
27<a name="ObjectTransform"></a><div class="titlepage"></div>
28<div class="refnamediv">
29<h2><span class="refentrytitle">Concept ObjectTransform</span></h2>
30<p>ObjectTransform</p>
31</div>
32<div class="refsect1">
33<a name="id-1.3.33.5.62.3"></a><h2>Description</h2>
34<p>
35      An ObjectTransform is a function type or a function
36      pointer type where the return type Obj is a
37      an object type and the arguments are
38      Transforms. is_callable&lt; Obj &gt;::value
39      must be false. The ObjectTransform, when applied,
40      has the effect of constructing an object of type
41      Obj' (see below), passing as construction parameters
42      the result(s) of applying transform(s) Tn.
43    </p>
44<p>
45      The type Obj may be a template specialization representing
46      a compile-time lambda expression. For instance, if Obj is
47      std::pair&lt; proto::_value, int &gt;, the result type of the
48      ObjectTransform is computed by replacing the type proto::_value
49      with the result of applying the proto::_value transform. For
50      given types Obj, Expr, State and Data, we can say that the
51      type Obj' represents the type Obj after all nested transforms
52      have been replaced with the results of applying the transforms
53      with Expr, State and Data as transform arguments.
54    </p>
55<p>
56      If the type Obj is not a template specialization representing
57      a compile-time lambda expression, then the result type Obj' is
58      the same as Obj.
59    </p>
60</div>
61<div class="refsect1">
62<a name="id-1.3.33.5.62.4"></a><h2>Notation</h2>
63<div class="variablelist"><dl class="variablelist">
64<dt><span class="term">Obj</span></dt>
65<dd>A type playing the role of object-type in the <a class="link" href="ObjectTransform.html" title="Concept ObjectTransform">ObjectTransform</a> concept.</dd>
66<dt><span class="term">Tn</span></dt>
67<dd>A type playing the role of transform-type in the <a class="link" href="ObjectTransform.html" title="Concept ObjectTransform">ObjectTransform</a> concept.</dd>
68<dt><span class="term">Expr</span></dt>
69<dd>A type playing the role of expression-type in the <a class="link" href="ObjectTransform.html" title="Concept ObjectTransform">ObjectTransform</a> concept.</dd>
70<dt><span class="term">State</span></dt>
71<dd>A type playing the role of state-type in the <a class="link" href="ObjectTransform.html" title="Concept ObjectTransform">ObjectTransform</a> concept.</dd>
72<dt><span class="term">Data</span></dt>
73<dd>A type playing the role of data-type in the <a class="link" href="ObjectTransform.html" title="Concept ObjectTransform">ObjectTransform</a> concept.</dd>
74<dt><span class="term"><code class="varname">expr</code></span></dt>
75<dd>Object of type Expr</dd>
76<dt><span class="term"><code class="varname">state</code></span></dt>
77<dd>Object of type State</dd>
78<dt><span class="term"><code class="varname">data</code></span></dt>
79<dd>Object of type Data</dd>
80</dl></div>
81</div>
82<div class="refsect1">
83<a name="id-1.3.33.5.62.5"></a><h2>Valid expressions</h2>
84<div class="informaltable"><table class="table">
85<colgroup>
86<col>
87<col>
88<col>
89<col>
90</colgroup>
91<thead><tr>
92<th>Name</th>
93<th>Expression</th>
94<th>Type</th>
95<th>Semantics</th>
96</tr></thead>
97<tbody><tr>
98<td><p>Apply Transform</p></td>
99<td><p>when&lt; _, Obj(Tn...)&gt;()(expr, state, data)</p></td>
100<td><p><span class="type">Obj'</span></p></td>
101<td><p>Applies the transform.</p></td>
102</tr></tbody>
103</table></div>
104</div>
105<div class="refsect1">
106<a name="id-1.3.33.5.62.6"></a><h2>Models</h2>
107<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><span class="simplelist"><span class="type">std::pair&lt; boost::proto::_value, int &gt;(boost::proto::_value, int())</span></span></li></ul></div>
108</div>
109</div>
110<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
111<td align="left"></td>
112<td align="right"><div class="copyright-footer">Copyright © 2008 Eric Niebler<p>
113        Distributed under the Boost Software License, Version 1.0. (See accompanying
114        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>)
115      </p>
116</div></td>
117</tr></table>
118<hr>
119<div class="spirit-nav">
120<a accesskey="p" href="Expr.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="PolymorphicFunctionObject.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
121</div>
122</body>
123</html>
124