]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <!-- | |
3 | Copyright 2012 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 | <header name="boost/proto/fusion.hpp"> | |
10 | <para>Make any Proto expression a valid Fusion sequence </para> | |
11 | <namespace name="boost"> | |
12 | <namespace name="proto"> | |
13 | <namespace name="functional"> | |
14 | ||
15 | <!-- proto::functional::flatten --> | |
16 | <struct name="flatten"> | |
17 | <purpose>A <conceptname>PolymorphicFunctionObject</conceptname> type that returns a "flattened" | |
18 | view of a Proto expression tree. </purpose> | |
19 | <description> | |
20 | <para> | |
21 | A <conceptname>PolymorphicFunctionObject</conceptname> type that returns a "flattened" view | |
22 | of a Proto expression tree. For a tree with a top-most node tag of type | |
23 | <computeroutput>T</computeroutput>, the elements of the flattened sequence are determined by | |
24 | recursing into each child node with the same tag type and returning those nodes of different | |
25 | type. So for instance, the Proto expression tree corresponding to the expression | |
26 | <computeroutput>a | b | c</computeroutput> has a flattened view with elements [a, b, c], even | |
27 | though the tree is grouped as <computeroutput>((a | b) | c)</computeroutput>. | |
28 | </para> | |
29 | <para> | |
30 | The resulting view is a Fusion Forward Sequence. | |
31 | </para> | |
32 | </description> | |
33 | <inherit> | |
34 | <type><classname>proto::callable</classname></type> | |
35 | </inherit> | |
36 | <struct-specialization name="result"> | |
37 | <template> | |
38 | <template-type-parameter name="This"/> | |
39 | <template-type-parameter name="Expr"/> | |
40 | </template> | |
41 | <specialization> | |
42 | <template-arg>This(Expr)</template-arg> | |
43 | </specialization> | |
44 | <inherit> | |
45 | <type>result< This(Expr const &) ></type> | |
46 | </inherit> | |
47 | </struct-specialization> | |
48 | <struct-specialization name="result"> | |
49 | <template> | |
50 | <template-type-parameter name="This"/> | |
51 | <template-type-parameter name="Expr"/> | |
52 | </template> | |
53 | <specialization> | |
54 | <template-arg>This(Expr &)</template-arg> | |
55 | </specialization> | |
56 | <inherit> | |
57 | <type><classname>proto::result_of::flatten</classname>< Expr ></type> | |
58 | </inherit> | |
59 | </struct-specialization> | |
60 | <method-group name="public member functions"> | |
61 | <method name="operator()" cv="const"> | |
62 | <type>typename <classname>proto::result_of::flatten</classname>< Expr >::type const</type> | |
63 | <template> | |
64 | <template-type-parameter name="Expr"/> | |
65 | </template> | |
66 | <parameter name="expr"> | |
67 | <paramtype>Expr &</paramtype> | |
68 | </parameter> | |
69 | <description> | |
70 | <para> | |
71 | Returns a Fusion Forward Sequence representing a flattened view of <computeroutput>expr</computeroutput>. | |
72 | </para> | |
73 | </description> | |
74 | </method> | |
75 | <method name="operator()" cv="const"> | |
76 | <type>typename <classname>proto::result_of::flatten</classname>< Expr const >::type const</type> | |
77 | <template> | |
78 | <template-type-parameter name="Expr"/> | |
79 | </template> | |
80 | <parameter name="expr"> | |
81 | <paramtype>Expr const &</paramtype> | |
82 | </parameter> | |
83 | <description> | |
84 | <para> | |
85 | Returns a Fusion Forward Sequence representing a flattened view of <computeroutput>expr</computeroutput>. | |
86 | </para> | |
87 | </description> | |
88 | </method> | |
89 | </method-group> | |
90 | </struct> | |
91 | ||
92 | </namespace> | |
93 | ||
94 | <namespace name="result_of"> | |
95 | <!-- proto::result_of::flatten --> | |
96 | <struct name="flatten"> | |
97 | <template> | |
98 | <template-type-parameter name="Expr"/> | |
99 | </template> | |
100 | <purpose>Metafunction that computes the return type of <computeroutput> | |
101 | <functionname alt="proto::flatten">proto::flatten()</functionname></computeroutput></purpose> | |
102 | <typedef name="type"> | |
103 | <type><emphasis>unspecified</emphasis></type> | |
104 | <purpose>A Fusion Forward Sequence</purpose> | |
105 | </typedef> | |
106 | </struct> | |
107 | </namespace> | |
108 | ||
109 | <!-- proto::flatten() --> | |
110 | <overloaded-function name="flatten"> | |
111 | <signature> | |
112 | <type>typename <classname>proto::result_of::flatten</classname>< Expr >::type const</type> | |
113 | <template> | |
114 | <template-type-parameter name="Expr"/> | |
115 | </template> | |
116 | <parameter name="expr"> | |
117 | <paramtype>Expr &</paramtype> | |
118 | </parameter> | |
119 | </signature> | |
120 | <signature> | |
121 | <type>typename <classname>proto::result_of::flatten</classname>< Expr const >::type const</type> | |
122 | <template> | |
123 | <template-type-parameter name="Expr"/> | |
124 | </template> | |
125 | <parameter name="expr"> | |
126 | <paramtype>Expr const &</paramtype> | |
127 | </parameter> | |
128 | </signature> | |
129 | <purpose>A function that returns a "flattened" view of a Proto expression tree. </purpose> | |
130 | <description> | |
131 | <para> | |
132 | For a tree with a top-most node tag of type <computeroutput>T</computeroutput>, the elements | |
133 | of the flattened sequence are determined by recursing into each child node with the same tag | |
134 | type and returning those nodes of different type. So for instance, the Proto expression tree | |
135 | corresponding to the expression <computeroutput>a | b | c</computeroutput> has a flattened | |
136 | view with elements [a, b, c], even though the tree is grouped as | |
137 | <computeroutput>((a | b) | c)</computeroutput>. | |
138 | </para> | |
139 | <para> | |
140 | The returned view is a Fusion Forward Sequence. | |
141 | </para> | |
142 | </description> | |
143 | </overloaded-function> | |
144 | </namespace> | |
145 | </namespace> | |
146 | </header> |