1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446
|
<?xml version="1.0" encoding="utf-8"?>
<header name="boost/proto/make_expr.hpp">
<para>
Definition of the <computeroutput><functionname alt="boost::proto::make_expr">proto::make_expr()</functionname>
</computeroutput> and <computeroutput><functionname alt="boost::proto::unpack_expr">proto::unpack_expr()</functionname>
</computeroutput> utilities for building Proto expression nodes from child nodes or from a Fusion sequence of child
nodes, respectively.
</para>
<namespace name="boost">
<namespace name="proto">
<namespace name="functional">
<!-- proto::functional::make_expr -->
<struct name="make_expr">
<template>
<template-type-parameter name="Tag"/>
<template-type-parameter name="Domain">
<default><classname>proto::deduce_domain</classname></default>
</template-type-parameter>
</template>
<purpose>A <conceptname>PolymorphicFunctionObject</conceptname> equivalent to the <computeroutput>
<functionname alt="proto::make_expr">proto::make_expr()</functionname></computeroutput> function.</purpose>
<description>
<para>
In all cases, <computeroutput>proto::functional::make_expr<Tag, Domain>()(a...)</computeroutput>
is equivalent to <computeroutput><functionname>proto::make_expr</functionname><Tag, Domain>(a...)</computeroutput>.
</para>
<para>
<computeroutput>proto::functional::make_expr<Tag>()(a...)</computeroutput> is equivalent to
<computeroutput><functionname>proto::make_expr</functionname><Tag>(a...)</computeroutput>.
</para>
</description>
<inherit>
<type><classname>proto::callable</classname></type>
</inherit>
<struct-specialization name="result">
<template>
<template-type-parameter name="This"/>
<template-type-parameter name="A" pack="1"/>
</template>
<specialization>
<template-arg>This(A...)</template-arg>
</specialization>
<inherit>
<type>
<classname>proto::result_of::make_expr</classname>< Tag, Domain, A... ></type>
</inherit>
</struct-specialization>
<method-group name="public member functions">
<method name="operator()" cv="const">
<type>typename <classname>proto::result_of::make_expr</classname>< Tag, Domain, A const... >::type const</type>
<template>
<template-type-parameter name="A" pack="1"/>
</template>
<parameter name="a" pack="1">
<paramtype>A const &</paramtype>
</parameter>
<description>
<para>
Construct an expression node with tag type <computeroutput>Tag</computeroutput> and in the
domain <computeroutput>Domain</computeroutput>.
</para>
<para>
</para>
</description>
<returns>
<para>
<computeroutput><functionname>proto::make_expr</functionname><Tag, Domain>(a...)</computeroutput>
</para>
</returns>
</method>
</method-group>
</struct>
<!-- proto::functional::unpack_expr -->
<struct name="unpack_expr">
<template>
<template-type-parameter name="Tag"/>
<template-type-parameter name="Domain">
<default><classname>proto::deduce_domain</classname></default>
</template-type-parameter>
</template>
<purpose>A <conceptname>PolymorphicFunctionObject</conceptname> equivalent to the
<computeroutput><functionname alt="proto::unpack_expr">proto::unpack_expr()</functionname></computeroutput> function.
</purpose>
<description>
<para>
In all cases, <computeroutput>proto::functional::unpack_expr<Tag, Domain>()(seq)</computeroutput> is
equivalent to <computeroutput><functionname alt="proto::unpack_expr">proto::unpack_expr()</functionname><Tag,
Domain>(seq)</computeroutput>.
</para>
<para>
<computeroutput>proto::functional::unpack_expr<Tag>()(seq)</computeroutput> is equivalent to
<computeroutput><functionname alt="proto::unpack_expr">proto::unpack_expr()</functionname><Tag>(seq)</computeroutput>.
</para>
</description>
<inherit>
<type><classname>proto::callable</classname></type>
</inherit>
<struct-specialization name="result">
<template>
<template-type-parameter name="This"/>
<template-type-parameter name="Sequence"/>
</template>
<specialization>
<template-arg>This(Sequence)</template-arg>
</specialization>
<inherit>
<type>
<classname>proto::result_of::unpack_expr</classname><
Tag,
Domain,
typename boost::remove_reference< Sequence >::type
></type>
</inherit>
</struct-specialization>
<method-group name="public member functions">
<method name="operator()" cv="const">
<type>typename <classname>proto::result_of::unpack_expr</classname>< Tag, Domain, Sequence const >::type const</type>
<template>
<template-type-parameter name="Sequence"/>
</template>
<parameter name="sequence">
<paramtype>Sequence const &</paramtype>
<description>
<para>A Fusion Forward Sequence </para>
</description>
</parameter>
<description>
<para>
Construct an expression node with tag type <computeroutput>Tag</computeroutput> and in the
domain <computeroutput>Domain</computeroutput>.
</para>
</description>
<returns>
<para>
<computeroutput><functionname>proto::unpack_expr</functionname><Tag, Domain>(sequence)</computeroutput>
</para>
</returns>
</method>
</method-group>
</struct>
</namespace>
<namespace name="result_of">
<!-- proto::result_of::make_expr -->
<struct name="make_expr">
<template>
<template-type-parameter name="Tag"/>
<template-type-parameter name="A" pack="1"/>
</template>
<purpose>Metafunction that computes the return type of the
<computeroutput><functionname alt="proto::make_expr">proto::make_expr()</functionname></computeroutput>
function, with a domain deduced from the domains of the children.</purpose>
<description>
<para>
Computes the return type of the
<computeroutput><functionname alt="proto::make_expr">proto::make_expr()</functionname></computeroutput> function.
</para>
<para>
In this specialization, the domain is deduced from the domains of the child types.
If <computeroutput><classname>proto::is_domain</classname><A<subscript>0</subscript>>::value</computeroutput>
is <computeroutput>true</computeroutput>, then another specialization is selected.
</para>
</description>
<typedef name="D">
<purpose>For exposition only</purpose>
<type><replaceable>domain-deduced-from-child-types</replaceable></type>
<description>
<para>
For each <computeroutput>x</computeroutput> in <computeroutput>[0,N)</computeroutput>
(proceeding in order beginning with <computeroutput>x=0</computeroutput>), if
<computeroutput><classname>proto::domain_of</classname><A<subscript>x</subscript>>::type</computeroutput> is not
<computeroutput><classname>proto::default_domain</classname></computeroutput>, then
<computeroutput>D</computeroutput> is
<computeroutput><classname>proto::domain_of</classname><A<subscript>x</subscript>>::type</computeroutput>.
Otherwise, <computeroutput>D</computeroutput> is
<computeroutput><classname>proto::default_domain</classname></computeroutput>.
</para>
</description>
</typedef>
<typedef name="type">
<type>typename <classname>proto::result_of::make_expr</classname><Tag, D, A...>::type</type>
</typedef>
</struct>
<struct-specialization name="make_expr">
<template>
<template-type-parameter name="Tag"/>
<template-type-parameter name="Domain"/>
<template-type-parameter name="A" pack="1"/>
</template>
<specialization>
<template-arg>Tag</template-arg>
<template-arg>Domain</template-arg>
<template-arg pack="1">A</template-arg>
</specialization>
<purpose>Metafunction that computes the return type of the
<computeroutput><functionname alt="proto::make_expr">proto::make_expr()</functionname></computeroutput>
function, within the specified domain.</purpose>
<description>
<para>
Computes the return type of the
<computeroutput><functionname alt="proto::make_expr">proto::make_expr()</functionname></computeroutput>
function.
</para>
</description>
<typedef name="type">
<description>
<para>
If <computeroutput>Tag</computeroutput> is
<computeroutput><classname>proto::tag::terminal</classname></computeroutput>, then
<computeroutput>type</computeroutput> is a typedef for
<computeroutput>boost::result_of<Domain(<classname>proto::expr</classname><
<classname>proto::tag::terminal</classname>, <classname>proto::term</classname><
A<subscript>0</subscript> > >)>::type</computeroutput>.
</para>
<para>
Otherwise, <computeroutput>type</computeroutput> is a typedef for
<computeroutput>boost::result_of<Domain(<classname>proto::expr</classname><
Tag, <classname alt="proto::listN">proto::list<emphasis>N</emphasis></classname><
typename <classname>proto::result_of::as_child</classname><A>::type...> >)>::type</computeroutput>
</para>
</description>
<type><emphasis>see-below</emphasis></type>
</typedef>
</struct-specialization>
<!-- proto::result_of::unpack_expr -->
<struct name="unpack_expr">
<template>
<template-type-parameter name="Tag"/>
<template-type-parameter name="Sequence"/>
<template-type-parameter name="Void">
<default><type>void</type></default>
</template-type-parameter>
</template>
<purpose>Metafunction that computes the return type of the
<computeroutput><functionname alt="proto::unpack_expr">proto::unpack_expr()</functionname></computeroutput>
function, with a domain deduced from the domains of the children.
</purpose>
<description>
<para>
Compute the return type of the
<computeroutput><functionname alt="proto::unpack_expr">proto::unpack_expr()</functionname></computeroutput>
function.
</para>
<para>
<computeroutput>Sequence</computeroutput> is a Fusion Forward Sequence.
</para>
<para>
In this specialization, the domain is deduced from the domains of the child types.
If <computeroutput><classname>proto::is_domain</classname><Sequence>::value</computeroutput>
is <computeroutput>true</computeroutput>, then another specialization is selected.
</para>
</description>
<typedef name="type">
<purpose>Where S is a RandomAccessSequence equivalent to Sequence, and N is the size of S.</purpose>
<type>
typename <classname>proto::result_of::make_expr</classname><
Tag,
typename fusion::result_of::value_at_c<<replaceable>S</replaceable>, 0>::type,
...
typename fusion::result_of::value_at_c<<replaceable>S</replaceable>, <replaceable>N</replaceable>-1>::type
>::type
</type>
</typedef>
</struct>
<struct-specialization name="unpack_expr">
<template>
<template-type-parameter name="Tag"/>
<template-type-parameter name="Domain"/>
<template-type-parameter name="Sequence"/>
</template>
<specialization>
<template-arg>Tag</template-arg>
<template-arg>Domain</template-arg>
<template-arg>Sequence</template-arg>
</specialization>
<purpose>Metafunction that computes the return type of the
<computeroutput><functionname alt="proto::unpack_expr">proto::unpack_expr()</functionname></computeroutput>
function, within the specified domain.
</purpose>
<description>
<para>
Computes the return type of the
<computeroutput><functionname alt="proto::unpack_expr">proto::unpack_expr()</functionname></computeroutput>
function.
</para>
</description>
<typedef name="type">
<purpose>Where S is a RandomAccessSequence equivalent to Sequence, and N is the size of S.</purpose>
<type>
typename <classname>proto::result_of::make_expr</classname><
Tag,
Domain,
typename fusion::result_of::value_at_c<<replaceable>S</replaceable>, 0>::type,
...
typename fusion::result_of::value_at_c<<replaceable>S</replaceable>, <replaceable>N</replaceable>-1>::type
>::type
</type>
</typedef>
</struct-specialization>
</namespace>
<!-- proto::make_expr() -->
<overloaded-function name="make_expr">
<signature>
<type>typename <classname>proto::result_of::make_expr</classname><Tag, A const...>::type const</type>
<template>
<template-type-parameter name="Tag"/>
<template-type-parameter name="A" pack="1"/>
</template>
<parameter name="a" pack="1">
<paramtype>A const &</paramtype>
</parameter>
</signature>
<signature>
<type>typename <classname>proto::result_of::make_expr</classname><Tag, Domain, A const...>::type const</type>
<template>
<template-type-parameter name="Tag"/>
<template-type-parameter name="Domain"/>
<template-type-parameter name="A" pack="1"/>
</template>
<parameter name="a" pack="1">
<paramtype>A const &</paramtype>
</parameter>
</signature>
<purpose>Construct an expression of the requested tag type with a domain and with the specified
arguments as children.</purpose>
<description>
<para>
This function template may be invoked either with or without specifying a
<computeroutput>Domain</computeroutput> template parameter. If no domain is specified, the domain
is deduced by examining in order the domains of the given arguments and taking the first that is
not <computeroutput><classname>proto::default_domain</classname></computeroutput>, if any such
domain exists, or <computeroutput><classname>proto::default_domain</classname></computeroutput>
otherwise.
</para>
<para>
Let <computeroutput><replaceable>WRAP</replaceable>(x)</computeroutput> be defined such that:
<itemizedlist>
<listitem>
<para>
If <computeroutput>x</computeroutput> is a <computeroutput>boost::reference_wrapper<></computeroutput>,
<computeroutput><replaceable>WRAP</replaceable>(x)</computeroutput> is equivalent to
<computeroutput><functionname>proto::as_child</functionname><Domain>(x.get())</computeroutput>.
</para>
</listitem>
<listitem>
<para>
Otherwise, <computeroutput><replaceable>WRAP</replaceable>(x)</computeroutput> is equivalent to
<computeroutput><functionname>proto::as_expr</functionname><Domain>(x)</computeroutput>.
</para>
</listitem>
</itemizedlist>
Let <computeroutput><replaceable>MAKE</replaceable><Tag>(a...)</computeroutput> be defined as
<computeroutput><classname>proto::expr</classname><Tag,
<classname alt="proto::listN">proto::list<emphasis>N</emphasis></classname><A...> >::make(a...)</computeroutput>
where
<computeroutput>A<subscript>x</subscript></computeroutput> is the type of
<computeroutput>a<subscript>x</subscript></computeroutput>.
</para>
<para>
</para>
</description>
<returns>
<para>
<computeroutput>Domain()(<replaceable>MAKE</replaceable><Tag>(<replaceable>WRAP</replaceable>(a)...))</computeroutput>.
</para>
</returns>
</overloaded-function>
<!-- proto::unpack_expr() -->
<overloaded-function name="unpack_expr">
<signature>
<type>typename <classname>proto::result_of::unpack_expr</classname><Tag, Sequence const>::type const</type>
<template>
<template-type-parameter name="Tag"/>
<template-type-parameter name="Sequence"/>
</template>
<parameter name="sequence">
<paramtype>Sequence const &</paramtype>
<description>
<para>A Fusion Forward Sequence.</para>
</description>
</parameter>
</signature>
<signature>
<type>typename <classname>proto::result_of::unpack_expr</classname><Tag, Domain, Sequence const>::type const</type>
<template>
<template-type-parameter name="Tag"/>
<template-type-parameter name="Domain"/>
<template-type-parameter name="Sequence"/>
</template>
<parameter name="sequence">
<paramtype>Sequence const &</paramtype>
</parameter>
</signature>
<purpose>Construct an expression of the requested tag type with a domain and with children
from the specified Fusion Forward Sequence.</purpose>
<description>
<para>
This function template may be invoked either with or without specifying a
<computeroutput>Domain</computeroutput> argument. If no domain is specified, the domain is
deduced by examining in order the domains of the elements of <computeroutput>sequence</computeroutput>
and taking the first that is not
<computeroutput><classname>proto::default_domain</classname></computeroutput>, if any such domain
exists, or <computeroutput><classname>proto::default_domain</classname></computeroutput> otherwise.
</para>
<para>
Let <computeroutput>s</computeroutput> be a Fusion Random Access Sequence equivalent to
<computeroutput>sequence</computeroutput>.
Let <computeroutput><replaceable>WRAP</replaceable><N>(s)</computeroutput>, where
<computeroutput>s</computeroutput> has type <computeroutput>S</computeroutput>, be defined such that:
<itemizedlist>
<listitem>
<para>
If <computeroutput>fusion::result_of::value_at_c<S,N>::type</computeroutput> is a reference,
<computeroutput><replaceable>WRAP</replaceable><N>(s)</computeroutput> is equivalent to
<computeroutput><functionname>proto::as_child</functionname><Domain>(fusion::at_c<N>(s))</computeroutput>.
</para>
</listitem>
<listitem>
<para>
Otherwise, <computeroutput><replaceable>WRAP</replaceable><N>(s)</computeroutput> is equivalent to
<computeroutput><functionname>proto::as_expr</functionname><Domain>(fusion::at_c<N>(s))</computeroutput>.
</para>
</listitem>
</itemizedlist>
Let <computeroutput><replaceable>MAKE</replaceable><Tag>(a...)</computeroutput> be defined as
<computeroutput><classname>proto::expr</classname><Tag,
<classname alt="proto::listN">proto::list<emphasis>N</emphasis></classname><A...> >::make(a...)</computeroutput>
where
<computeroutput>A<subscript>x</subscript></computeroutput> is the type of
<computeroutput>a<subscript>x</subscript></computeroutput>.
</para>
</description>
<returns>
<para>
<computeroutput>Domain()(<replaceable>MAKE</replaceable><Tag>(<replaceable>WRAP</replaceable><0>(s),...
<replaceable>WRAP</replaceable><<replaceable>N</replaceable>-1>(s)))</computeroutput>, where
<replaceable>N</replaceable> is the size of <computeroutput>Sequence</computeroutput>.
</para>
</returns>
</overloaded-function>
</namespace>
</namespace>
</header>
|