123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496 |
- <?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/expr.hpp">
- <namespace name="boost">
- <namespace name="proto">
- <!-- boost::proto::basic_expr -->
- <struct name="basic_expr">
- <template>
- <template-type-parameter name="Tag"/>
- <template-type-parameter name="Args"/>
- <template-nontype-parameter name="Arity">
- <type>long</type>
- <default>Args::arity</default>
- </template-nontype-parameter>
- </template>
- <purpose>Simplified representation of a node in an expression tree.</purpose>
- <description>
- <para>
- <computeroutput>proto::basic_expr<></computeroutput> is a node in an expression
- template tree. It is a container for its child sub-trees. It also serves as the
- terminal nodes of the tree.
- </para>
- <para>
- <computeroutput>Tag</computeroutput> is type that represents the operation
- encoded by this expression. It is typically one of the structs in the
- <computeroutput>boost::proto::tag</computeroutput> namespace, but it doesn't
- have to be. If <computeroutput>Arity</computeroutput> is 0 then this
- <computeroutput>expr<></computeroutput> type represents a leaf in the
- expression tree.
- </para>
- <para>
- <computeroutput>Args</computeroutput> is a list of types representing
- the children of this expression. It is an instantiation of one of
- <computeroutput><classname alt="proto::listN">proto::list1<></classname></computeroutput>,
- <computeroutput><classname alt="proto::listN">proto::list2<></classname></computeroutput>,
- etc. The child types
- must all themselves be either <computeroutput>proto::expr<></computeroutput>
- or <computeroutput>proto::basic_expr<>&</computeroutput> (or extensions thereof via
- <computeroutput><classname>proto::extends<></classname></computeroutput> or
- <computeroutput><macroname>BOOST_PROTO_EXTENDS</macroname>()</computeroutput>), unless
- <computeroutput>Arity</computeroutput> is 0, in which case
- <computeroutput>Args</computeroutput> must be
- <computeroutput>proto::term<T></computeroutput>, where
- <computeroutput>T</computeroutput> can be any type.
- </para>
- <para>
- <computeroutput>proto::basic_expr<></computeroutput> is a valid Fusion
- random-access sequence, where the elements of the sequence are the child
- expressions.
- </para>
- </description>
- <!-- typedefs -->
- <typedef name="proto_tag">
- <type>Tag</type>
- </typedef>
- <typedef name="proto_args">
- <type>Args</type>
- </typedef>
- <typedef name="proto_arity">
- <type>mpl::long_< Arity ></type>
- </typedef>
- <typedef name="proto_domain">
- <type><classname>proto::basic_default_domain</classname></type>
- </typedef>
- <typedef name="proto_grammar">
- <type>basic_expr</type>
- </typedef>
- <typedef name="proto_base_expr">
- <type>basic_expr</type>
- </typedef>
- <typedef name="proto_derived_expr">
- <type>basic_expr</type>
- </typedef>
- <typedef name="proto_childN">
- <type>typename Args::child<replaceable>N</replaceable></type>
- <purpose>For each <replaceable>N</replaceable> in <replaceable>[0,max(Arity,1))</replaceable>.</purpose>
- </typedef>
- <method-group name="public static functions">
- <!-- make -->
- <method name="make" specifiers="static">
- <type>basic_expr const</type>
- <template>
- <template-type-parameter name="A" pack="1"/>
- </template>
- <parameter name="a" pack="1">
- <paramtype>A const &</paramtype>
- </parameter>
- <requires>
- <para>
- The number of supplied arguments must be <computeroutput>max(Arity,1)</computeroutput>.
- </para>
- </requires>
- <returns>
- <para>
- A new <computeroutput>basic_expr</computeroutput> object initialized with the specified arguments.
- </para>
- </returns>
- </method>
- </method-group>
- <method-group name="public member functions">
- <method name="proto_base">
- <type>basic_expr &</type>
- <returns>
- <para>
- <computeroutput>*this</computeroutput>
- </para>
- </returns>
- </method>
- <method name="proto_base" cv="const">
- <type>basic_expr const &</type>
- <description>
- <para>
- This is an overloaded member function, provided for convenience. It differs from
- the above function only in what argument(s) it accepts.
- </para>
- </description>
- </method>
- </method-group>
- </struct>
- <!-- boost::proto::expr -->
- <struct name="expr">
- <template>
- <template-type-parameter name="Tag"/>
- <template-type-parameter name="Args"/>
- <template-nontype-parameter name="Arity">
- <type>long</type>
- <default>Args::arity</default>
- </template-nontype-parameter>
- </template>
- <purpose>Representation of a node in an expression tree.</purpose>
- <description>
- <para>
- <computeroutput>proto::expr<></computeroutput> is a node in an expression
- template tree. It is a container for its child sub-trees. It also serves as the
- terminal nodes of the tree.
- </para>
- <para>
- <computeroutput>Tag</computeroutput> is type that represents the operation
- encoded by this expression. It is typically one of the structs in the
- <computeroutput>boost::proto::tag</computeroutput> namespace, but it doesn't
- have to be. If <computeroutput>Arity</computeroutput> is 0 then this
- <computeroutput>expr<></computeroutput> type represents a leaf in the
- expression tree.
- </para>
- <para>
- <computeroutput>Args</computeroutput> is a list of types representing
- the children of this expression. It is an instantiation of one of
- <computeroutput><classname alt="proto::listN">proto::list1<></classname></computeroutput>,
- <computeroutput><classname alt="proto::listN">proto::list2<></classname></computeroutput>,
- etc. The child types
- must all themselves be either <computeroutput>proto::expr<></computeroutput>
- or <computeroutput>proto::basic_expr<>&</computeroutput> (or extensions thereof via
- <computeroutput><classname>proto::extends<></classname></computeroutput> or
- <computeroutput><macroname>BOOST_PROTO_EXTENDS</macroname>()</computeroutput>), unless
- <computeroutput>Arity</computeroutput> is 0, in which case
- <computeroutput>Args</computeroutput> must be
- <computeroutput>proto::term<T></computeroutput>, where
- <computeroutput>T</computeroutput> can be any type.
- </para>
- <para>
- <computeroutput>proto::expr<></computeroutput> is a valid Fusion
- random-access sequence, where the elements of the sequence are the child
- expressions.
- </para>
- </description>
- <!-- typedefs -->
- <typedef name="proto_tag">
- <type>Tag</type>
- </typedef>
- <typedef name="proto_args">
- <type>Args</type>
- </typedef>
- <typedef name="proto_arity">
- <type>mpl::long_< Arity ></type>
- </typedef>
- <typedef name="proto_domain">
- <type><classname>proto::default_domain</classname></type>
- </typedef>
- <typedef name="proto_grammar">
- <type><classname>proto::basic_expr</classname>< Tag, Args, Arity ></type>
- </typedef>
- <typedef name="proto_base_expr">
- <type>expr</type>
- </typedef>
- <typedef name="proto_derived_expr">
- <type>expr</type>
- </typedef>
- <typedef name="proto_childN">
- <type>typename Args::child<replaceable>N</replaceable></type>
- <purpose>For each <replaceable>N</replaceable> in <replaceable>[0,max(Arity,1))</replaceable>.</purpose>
- </typedef>
- <struct name="result">
- <template>
- <template-type-parameter name="Signature"/>
- </template>
- <description>
- <para>
- Encodes the return type of <computeroutput><classname>proto::expr<></classname>::operator()</computeroutput>.
- Makes <computeroutput><classname>proto::expr<></classname></computeroutput> a TR1-style function object type
- usable with <computeroutput>boost::result_of<></computeroutput>
- </para>
- </description>
- <typedef name="type">
- <type><replaceable>unspecified</replaceable></type>
- </typedef>
- </struct>
- <method-group name="public static functions">
- <!-- make -->
- <method name="make" specifiers="static">
- <type>expr const</type>
- <template>
- <template-type-parameter name="A" pack="1"/>
- </template>
- <parameter name="a" pack="1">
- <paramtype>A const &</paramtype>
- </parameter>
- <requires>
- <para>
- The number of supplied arguments must be <computeroutput>max(Arity,1)</computeroutput>.
- </para>
- </requires>
- <returns>
- <para>
- A new <computeroutput>expr</computeroutput> object initialized with the specified arguments.
- </para>
- </returns>
- </method>
- </method-group>
- <method-group name="public member functions">
- <method name="proto_base">
- <type>expr &</type>
- <returns><para><computeroutput>*this</computeroutput></para></returns>
- </method>
- <method name="proto_base" cv="const">
- <type>expr const &</type>
- <description>
- <para>This is an overloaded member function, provided for convenience. It differs from
- the above function only in what argument(s) it accepts.</para>
- </description>
- </method>
- <!-- operator= -->
- <method name="operator=">
- <type><replaceable>unspecified</replaceable></type>
- <template>
- <template-type-parameter name="A"/>
- </template>
- <parameter name="a">
- <paramtype>A &</paramtype>
- </parameter>
- <description>
- <para>Lazy assignment expression</para>
- </description>
- <returns>
- <para>A new expression node representing the assignment operation.</para>
- </returns>
- </method>
- <method name="operator=">
- <type><replaceable>unspecified</replaceable></type>
- <template>
- <template-type-parameter name="A"/>
- </template>
- <parameter name="a">
- <paramtype>A const &</paramtype>
- </parameter>
- <description>
- <para>
- This is an overloaded member function, provided for convenience. It differs from
- the above function only in what argument(s) it accepts.
- </para>
- </description>
- </method>
- <method name="operator=" cv="const">
- <type><replaceable>unspecified</replaceable></type>
- <template>
- <template-type-parameter name="A"/>
- </template>
- <parameter name="a">
- <paramtype>A &</paramtype>
- </parameter>
- <description>
- <para>
- This is an overloaded member function, provided for convenience. It differs from
- the above function only in what argument(s) it accepts.
- </para>
- </description>
- </method>
- <method name="operator=" cv="const">
- <type><replaceable>unspecified</replaceable></type>
- <template>
- <template-type-parameter name="A"/>
- </template>
- <parameter name="a">
- <paramtype>A const &</paramtype>
- </parameter>
- <description>
- <para>
- This is an overloaded member function, provided for convenience. It differs from
- the above function only in what argument(s) it accepts.
- </para>
- </description>
- </method>
- <!-- operator[] -->
- <method name="operator[]">
- <type><replaceable>unspecified</replaceable></type>
- <template>
- <template-type-parameter name="A"/>
- </template>
- <parameter name="a">
- <paramtype>A &</paramtype>
- </parameter>
- <description>
- <para>Lazy subscript expression</para>
- </description>
- <returns>
- <para>A new expression node representing the subscript operation.</para>
- </returns>
- </method>
- <method name="operator[]">
- <type><replaceable>unspecified</replaceable></type>
- <template>
- <template-type-parameter name="A"/>
- </template>
- <parameter name="a">
- <paramtype>A const &</paramtype>
- </parameter>
- <description>
- <para>
- This is an overloaded member function, provided for convenience. It differs from
- the above function only in what argument(s) it accepts.
- </para>
- </description>
- </method>
- <method name="operator[]" cv="const">
- <type><replaceable>unspecified</replaceable></type>
- <template>
- <template-type-parameter name="A"/>
- </template>
- <parameter name="a">
- <paramtype>A &</paramtype>
- </parameter>
- <description>
- <para>
- This is an overloaded member function, provided for convenience. It differs from
- the above function only in what argument(s) it accepts.
- </para>
- </description>
- </method>
- <method name="operator[]" cv="const">
- <type><replaceable>unspecified</replaceable></type>
- <template>
- <template-type-parameter name="A"/>
- </template>
- <parameter name="a">
- <paramtype>A const &</paramtype>
- </parameter>
- <description>
- <para>
- This is an overloaded member function, provided for convenience. It differs from
- the above function only in what argument(s) it accepts.
- </para>
- </description>
- </method>
- <!-- operator() -->
- <method name="operator()">
- <type><replaceable>unspecified</replaceable></type>
- <template>
- <template-type-parameter name="A" pack="1"/>
- </template>
- <parameter name="a" pack="1">
- <paramtype>A const &</paramtype>
- </parameter>
- <description>
- <para>Lazy function call</para>
- </description>
- <returns>
- <para>A new expression node representing the function call operation.</para>
- </returns>
- </method>
- <method name="operator()" cv="const">
- <type><replaceable>unspecified</replaceable></type>
- <template>
- <template-type-parameter name="A" pack="1"/>
- </template>
- <parameter name="a" pack="1">
- <paramtype>A const &</paramtype>
- </parameter>
- <description>
- <para>
- This is an overloaded member function, provided for convenience. It differs from
- the above function only in what argument(s) it accepts.
- </para>
- </description>
- </method>
- </method-group>
- <data-member name="childN">
- <type>proto_child<replaceable>N</replaceable></type>
- <purpose>For each <replaceable>N</replaceable> in <replaceable>[0,max(Arity,1))</replaceable>.</purpose>
- </data-member>
- <data-member name="proto_arity_c" specifiers="static">
- <type>const long</type>
- <purpose>
- <computeroutput>= Arity;</computeroutput>
- </purpose>
- </data-member>
- </struct>
- <!-- proto::unexpr -->
- <struct name="unexpr">
- <template>
- <template-type-parameter name="Expr"/>
- </template>
- <purpose>Lets you inherit the interface of an expression while hiding from Proto the fact that
- the type is a Proto expression.</purpose>
- <inherit><type>Expr</type></inherit>
- <method-group name="public member functions"/>
- <constructor>
- <parameter name="expr">
- <paramtype>Expr const &</paramtype>
- </parameter>
- </constructor>
- <description>
- <para>
- For an expression type <computeroutput>E</computeroutput>,
- <computeroutput>
- <classname>proto::is_expr</classname><E>::value
- </computeroutput> is <computeroutput>true</computeroutput>, but
- <computeroutput>
- <classname>proto::is_expr</classname><proto::unexpr<E> >::value
- </computeroutput> is <computeroutput>false</computeroutput>.
- </para>
- </description>
- </struct>
- </namespace>
- </namespace>
- </header>
|