1<?xml version="1.0" ?>
2<!--
3  Copyright 2008 Eric Niebler
4
5  Distributed under the Boost
6  Software License, Version 1.0. (See accompanying
7  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8  -->
9<concept name="Transform" category="utility">
10  <param name="Tn" role="transform-type" />
11  <param name="Expr" role="expression-type" />
12  <param name="State" role="state-type" />
13  <param name="Data" role="data-type" />
14
15  <models-sentence>
16    The type <arg num="1" /> must be a model of <self/>.
17  </models-sentence>
18
19  <description>
20    <para>
21      A Transform is a PrimitiveTransform, a CallableTransform
22      or an ObjectTransform.
23    </para>
24  </description>
25
26  <notation variables="expr">
27    <sample-value>
28      <type name="Expr" />
29    </sample-value>
30  </notation>
31
32  <notation variables="state">
33    <sample-value>
34      <type name="State" />
35    </sample-value>
36  </notation>
37
38  <notation variables="data">
39    <sample-value>
40      <type name="Data" />
41    </sample-value>
42  </notation>
43
44  <associated-type name="result_type">
45    <get-member-type name="type">
46      <apply-template name="boost::result_of">
47        <type name="when&lt; _, Tn &gt;(Expr, State, Data)"/>
48      </apply-template>
49    </get-member-type>
50    <description>
51      <simpara>The result of applying the Transform.</simpara>
52    </description>
53  </associated-type>
54
55  <valid-expression name="Apply Transform">
56    <apply-function name="when&lt; _, Tn &gt;()">
57      <sample-value>
58        <type name="Expr" />
59      </sample-value>
60      <sample-value>
61        <type name="State" />
62      </sample-value>
63      <sample-value>
64        <type name="Data" />
65      </sample-value>
66    </apply-function>
67    <return-type>
68      <require-same-type testable="yes">
69        <type name="result_type"/>
70      </require-same-type>
71    </return-type>
72    <semantics>Applies the transform.</semantics>
73  </valid-expression>
74
75  <example-model>
76    <type name="boost::proto::_child(boost::proto::_left)" />
77  </example-model>
78
79</concept>
80