mirror of
https://github.com/boostorg/phoenix.git
synced 2026-02-14 00:52:09 +00:00
69 lines
2.2 KiB
Plaintext
69 lines
2.2 KiB
Plaintext
[/==============================================================================
|
|
Copyright (C) 2001-2010 Joel de Guzman
|
|
Copyright (C) 2001-2005 Dan Marsden
|
|
Copyright (C) 2001-2010 Thomas Heller
|
|
|
|
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)
|
|
===============================================================================/]
|
|
|
|
[section Actor]
|
|
|
|
[heading Description]
|
|
|
|
The Actor is the main concept behind the library.
|
|
|
|
Actors are TR1 function objects and can accept 0 to `PHOENIX_LIMIT` arguments.
|
|
An Actor is responsible for setting up the __phoenix_concept_environment__ which
|
|
is then passed to the __phoenix_concept_evaluator__.
|
|
Every Actor needs to somehow embed the expression it is supposed to evaluate.
|
|
An Actor itself is required to be a valid Expression.
|
|
|
|
[note You can set `PHOENIX_LIMIT`, the predefined maximum arity an
|
|
actor can take. By default, `PHOENIX_LIMIT` is set to 10.]
|
|
|
|
|
|
[variablelist Notation
|
|
[[`Actor`] [A type fulfilling this concept]]
|
|
[[`actor`] [Object of type Actor]]
|
|
[[`A0...AN`] [Argument Types]]
|
|
[[`a0...aN`] [Objects of type A0, ...AN]]
|
|
[[`N`] [A __boost_mpl_int__]]
|
|
[[`M`] [A positive Integer index]]
|
|
]
|
|
|
|
[heading Valid Expressions]
|
|
|
|
[table
|
|
[[Expression] [Return Type] [Run time Complexity]]
|
|
[[actor(a0...aN)] [Any Type] [unspecified]]
|
|
[[element_at<N>(actor)] [Actor] [Constant]]
|
|
[[element_at_c<M>(actor)] [Actor] [Constant]]
|
|
]
|
|
|
|
[heading Result Type Expressions]
|
|
[table
|
|
[[Expression] [Result Type] [Compile time Complexity]]
|
|
[[result_of::actor<Expr, A0...AN>::type] [Any Type] [unspecified]]
|
|
[[result_of::element_at_c<Actor, N>::type] [Any Type] [Constant]]
|
|
[[result_of::element_at_c<Actor, M>::type] [Any Type] [Constant]]
|
|
]
|
|
|
|
[heading Expression Semantics]
|
|
|
|
[table
|
|
[[Expression] [Semantics]]
|
|
[[actor(a0...aN)] [Evaluates the expression with the default __phoenix_concept_evaluator__]]
|
|
[[element_at<N>(actor)] [Returns the `N::value`-th element of an compound expression]]
|
|
[[element_at_c<M>(actor)] [Returns the `M`th element of an compound expression]]
|
|
]
|
|
|
|
[heading Models]
|
|
|
|
* `boost::phoenix::actor`
|
|
* `boost::phoenix::if_`
|
|
* `boost::phoenix::try_`
|
|
|
|
[endsect]
|
|
|