123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- <?xml version="1.0" encoding="utf-8"?>
- <!--
- Copyright 2012 Eric Niebler
- Distributed under the Boost
- Software License, Version 1.0. (See accompanying
- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- -->
- <header name="boost/proto/fusion.hpp">
- <para>Make any Proto expression a valid Fusion sequence </para>
- <namespace name="boost">
- <namespace name="proto">
- <namespace name="functional">
- <!-- proto::functional::flatten -->
- <struct name="flatten">
- <purpose>A <conceptname>PolymorphicFunctionObject</conceptname> type that returns a "flattened"
- view of a Proto expression tree. </purpose>
- <description>
- <para>
- A <conceptname>PolymorphicFunctionObject</conceptname> type that returns a "flattened" view
- of a Proto expression tree. For a tree with a top-most node tag of type
- <computeroutput>T</computeroutput>, the elements of the flattened sequence are determined by
- recursing into each child node with the same tag type and returning those nodes of different
- type. So for instance, the Proto expression tree corresponding to the expression
- <computeroutput>a | b | c</computeroutput> has a flattened view with elements [a, b, c], even
- though the tree is grouped as <computeroutput>((a | b) | c)</computeroutput>.
- </para>
- <para>
- The resulting view is a Fusion Forward Sequence.
- </para>
- </description>
- <inherit>
- <type><classname>proto::callable</classname></type>
- </inherit>
- <struct-specialization name="result">
- <template>
- <template-type-parameter name="This"/>
- <template-type-parameter name="Expr"/>
- </template>
- <specialization>
- <template-arg>This(Expr)</template-arg>
- </specialization>
- <inherit>
- <type>result< This(Expr const &) ></type>
- </inherit>
- </struct-specialization>
- <struct-specialization name="result">
- <template>
- <template-type-parameter name="This"/>
- <template-type-parameter name="Expr"/>
- </template>
- <specialization>
- <template-arg>This(Expr &)</template-arg>
- </specialization>
- <inherit>
- <type><classname>proto::result_of::flatten</classname>< Expr ></type>
- </inherit>
- </struct-specialization>
- <method-group name="public member functions">
- <method name="operator()" cv="const">
- <type>typename <classname>proto::result_of::flatten</classname>< Expr >::type const</type>
- <template>
- <template-type-parameter name="Expr"/>
- </template>
- <parameter name="expr">
- <paramtype>Expr &</paramtype>
- </parameter>
- <description>
- <para>
- Returns a Fusion Forward Sequence representing a flattened view of <computeroutput>expr</computeroutput>.
- </para>
- </description>
- </method>
- <method name="operator()" cv="const">
- <type>typename <classname>proto::result_of::flatten</classname>< Expr const >::type const</type>
- <template>
- <template-type-parameter name="Expr"/>
- </template>
- <parameter name="expr">
- <paramtype>Expr const &</paramtype>
- </parameter>
- <description>
- <para>
- Returns a Fusion Forward Sequence representing a flattened view of <computeroutput>expr</computeroutput>.
- </para>
- </description>
- </method>
- </method-group>
- </struct>
- </namespace>
-
- <namespace name="result_of">
- <!-- proto::result_of::flatten -->
- <struct name="flatten">
- <template>
- <template-type-parameter name="Expr"/>
- </template>
- <purpose>Metafunction that computes the return type of <computeroutput>
- <functionname alt="proto::flatten">proto::flatten()</functionname></computeroutput></purpose>
- <typedef name="type">
- <type><emphasis>unspecified</emphasis></type>
- <purpose>A Fusion Forward Sequence</purpose>
- </typedef>
- </struct>
- </namespace>
- <!-- proto::flatten() -->
- <overloaded-function name="flatten">
- <signature>
- <type>typename <classname>proto::result_of::flatten</classname>< Expr >::type const</type>
- <template>
- <template-type-parameter name="Expr"/>
- </template>
- <parameter name="expr">
- <paramtype>Expr &</paramtype>
- </parameter>
- </signature>
- <signature>
- <type>typename <classname>proto::result_of::flatten</classname>< Expr const >::type const</type>
- <template>
- <template-type-parameter name="Expr"/>
- </template>
- <parameter name="expr">
- <paramtype>Expr const &</paramtype>
- </parameter>
- </signature>
- <purpose>A function that returns a "flattened" view of a Proto expression tree. </purpose>
- <description>
- <para>
- For a tree with a top-most node tag of type <computeroutput>T</computeroutput>, the elements
- of the flattened sequence are determined by recursing into each child node with the same tag
- type and returning those nodes of different type. So for instance, the Proto expression tree
- corresponding to the expression <computeroutput>a | b | c</computeroutput> has a flattened
- view with elements [a, b, c], even though the tree is grouped as
- <computeroutput>((a | b) | c)</computeroutput>.
- </para>
- <para>
- The returned view is a Fusion Forward Sequence.
- </para>
- </description>
- </overloaded-function>
- </namespace>
- </namespace>
- </header>
|