]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/proto/doc/reference/concepts/CallableTransform.xml
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / proto / doc / reference / concepts / CallableTransform.xml
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="CallableTransform" category="utility">
10 <param name="Fn" role="polymorphic-function-object-type" />
11 <param name="Tn" role="transform-type" />
12 <param name="Expr" role="expression-type" />
13 <param name="State" role="state-type" />
14 <param name="Data" role="data-type" />
15
16 <models-sentence>
17 The type <arg num="1" /> must be a model of <conceptname name="PolymorphicFunctionObject"/>.
18 The type <arg num="2" /> must be a model of <conceptname name="Transform"/>.
19 </models-sentence>
20
21 <description>
22 <para>
23 A CallableTransform is a function type or a function
24 pointer type where the return type Fn is a
25 PolymorphicFunctionObject and the arguments are
26 Transforms. is_callable&lt; Fn &gt;::value
27 must be true. The CallableTransform, when applied,
28 has the effect of invoking the polymorphic function
29 object Fn, passing as arguments the result(s)
30 of applying transform(s) Tn.
31 </para>
32 </description>
33
34 <notation variables="fn">
35 <sample-value>
36 <type name="Fn" />
37 </sample-value>
38 </notation>
39
40 <notation variables="expr">
41 <sample-value>
42 <type name="Expr" />
43 </sample-value>
44 </notation>
45
46 <notation variables="state">
47 <sample-value>
48 <type name="State" />
49 </sample-value>
50 </notation>
51
52 <notation variables="data">
53 <sample-value>
54 <type name="Data" />
55 </sample-value>
56 </notation>
57
58 <associated-type name="result_type">
59 <get-member-type name="type">
60 <apply-template name="boost::result_of">
61 <type name="Fn(Transform&lt;Tn, Expr, State, Data&gt;::result_type...)"/>
62 </apply-template>
63 </get-member-type>
64 <description>
65 <simpara>The result of applying the CallableTransform.</simpara>
66 </description>
67 </associated-type>
68
69 <valid-expression name="Apply Transform">
70 <apply-function name="when&lt; _, Fn(Tn...)&gt;()">
71 <sample-value>
72 <type name="Expr" />
73 </sample-value>
74 <sample-value>
75 <type name="State" />
76 </sample-value>
77 <sample-value>
78 <type name="Data" />
79 </sample-value>
80 </apply-function>
81 <return-type>
82 <require-same-type testable="yes">
83 <type name="result_type"/>
84 </require-same-type>
85 </return-type>
86 <semantics>Applies the transform.</semantics>
87 </valid-expression>
88
89 <example-model>
90 <type name="boost::proto::_child(boost::proto::_left)" />
91 </example-model>
92
93 </concept>