|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r64847 - in sandbox/SOC/2010/phoenix3/libs/phoenix: doc doc/advanced doc/html doc/html/phoenix doc/html/phoenix/advanced_topics doc/html/phoenix/reference doc/html/phoenix/reference/concepts doc/html/phoenix/reference/modules doc/html/phoenix/reference/modules/core doc/html/phoenix/reference/modules/stl doc/html/phoenix/starter_kit doc/html/phoenix/starter_kit/composites doc/html/phoenix/starter_kit/primitives doc/reference doc/starter_kit example
From: thom.heller_at_[hidden]
Date: 2010-08-16 11:34:53
Author: theller
Date: 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
New Revision: 64847
URL: http://svn.boost.org/trac/boost/changeset/64847
Log:
doc tweaks
Added:
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/advanced/custom_evaluation.qbk (contents, props changed)
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/advanced_topics/custom_evaluation.html (contents, props changed)
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/composites/
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/composites/construct__new__delete__casts.html (contents, props changed)
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/composites/lazy_functions.html (contents, props changed)
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/composites/lazy_operators.html (contents, props changed)
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/composites/lazy_statements.html (contents, props changed)
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/composites/more.html (contents, props changed)
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/primitives/
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/primitives.html (contents, props changed)
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/primitives/arguments.html (contents, props changed)
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/primitives/references.html (contents, props changed)
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/primitives/values.html (contents, props changed)
sandbox/SOC/2010/phoenix3/libs/phoenix/example/arguments.cpp (contents, props changed)
sandbox/SOC/2010/phoenix3/libs/phoenix/example/callback.cpp (contents, props changed)
sandbox/SOC/2010/phoenix3/libs/phoenix/example/custom_evaluator.cpp (contents, props changed)
sandbox/SOC/2010/phoenix3/libs/phoenix/example/find_if.cpp (contents, props changed)
sandbox/SOC/2010/phoenix3/libs/phoenix/example/function.cpp (contents, props changed)
sandbox/SOC/2010/phoenix3/libs/phoenix/example/if.cpp (contents, props changed)
sandbox/SOC/2010/phoenix3/libs/phoenix/example/references.cpp (contents, props changed)
sandbox/SOC/2010/phoenix3/libs/phoenix/example/values.cpp (contents, props changed)
Text files modified:
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/advanced.qbk | 10 ++--
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/advanced/extending_actors.qbk | 65 ++++++++++++++++++-----------------
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/index.html | 43 +++++++++++++----------
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/advanced_topics.html | 6 +-
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/advanced_topics/extending_actors.html | 73 ++++++++++++++++++++-------------------
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/basics.html | 40 ++++++++++----------
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/concepts/actor.html | 10 ++--
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/concepts/environment.html | 10 ++--
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/concepts/evaluationpolicy.html | 10 ++--
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/concepts/evaluator.html | 10 ++--
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/modules/core/arguments.html | 8 ++--
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/modules/core/references.html | 2
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/modules/core/values.html | 2
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/modules/operator.html | 12 +++---
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/modules/stl/algorithm.html | 12 +++---
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/modules/stl/container.html | 4 +-
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/organization.html | 20 +++++-----
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit.html | 44 ++++++++++++++---------
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/arguments.html | 8 ++--
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/composites.html | 24 ++++++++----
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/lazy_functions.html | 4 +-
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/lazy_operators.html | 2
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/references.html | 4 +-
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/values.html | 12 +++---
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/wrap_up.html | 6 +-
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/quickbook_HTML.manifest | 19 ++++-----
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/phoenix3.qbk | 2
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/reference/basics.qbk | 43 ++++++++++++----------
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/reference/organisation.qbk | 10 ++--
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit.qbk | 22 ++++++++---
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/arguments.qbk | 8 ++--
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/composites.qbk | 7 +--
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/function.qbk | 15 ++++---
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/more.qbk | 4 +-
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/object.qbk | 2
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/operator.qbk | 10 ++--
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/references.qbk | 4 +-
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/statement.qbk | 6 +-
sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/values.qbk | 12 +++---
sandbox/SOC/2010/phoenix3/libs/phoenix/example/container_actor.cpp | 32 ++++++++++++++++
40 files changed, 348 insertions(+), 289 deletions(-)
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/advanced.qbk
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/advanced.qbk (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/advanced.qbk 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -1,15 +1,15 @@
[/==============================================================================
- Copyright (C) 2001-2010 Joel de Guzman
- Copyright (C) 2001-2005 Dan Marsden
- Copyright (C) 2001-2010 Thomas Heller
+ Copyright (C) 2001-2010 Joel de Guzman
+ 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)
+ 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 Advanced Topics]
[include advanced/porting.qbk]
[include advanced/extending_actors.qbk]
+[/include advanced/custom_evaluation.qbk]
[endsect]
Added: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/advanced/custom_evaluation.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/advanced/custom_evaluation.qbk 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -0,0 +1,11 @@
+[/==============================================================================
+ Copyright (C) 2001-2010 Joel de Guzman
+ 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 Custom Evaluation]
+
+[endsect]
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/advanced/extending_actors.qbk
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/advanced/extending_actors.qbk (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/advanced/extending_actors.qbk 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -9,19 +9,20 @@
[section Extending Actors]
-[link phoenix.reference.concept.actor Actors] are one of the main parts of the
+[link phoenix.reference.concepts.actor Actors] are one of the main parts of the
library, and one of the many customization points. The default actor implementation
-provides several perator() overloads which deal with the evaluation of expressions.
+provides several operator() overloads which deal with the evaluation of expressions.
For some uses cases this might not be enough. For convenience it is thinkable to
-provide custom member functions which generate new expressions. An example is
-the [link phoenix.reference.modules.statement.if__statement if_ Statement] which
-provides an additional else member. With this the actual phoenix expression
-becomes more expressive.
+provide custom member functions which generate new expressions. An example is the
+[link phoenix.reference.modules.statement.___if_else_____statement '''if_else_'''
+Statement] which provides an additional else member for generating a lazy if-else
+expression. With this the actual Phoenix expression becomes more expressive.
-Another szenario is to give actors the semantics of a certain well known interface
+Another scenario is to give actors the semantics of a certain well known interface
or concept. This tutorial like section will provide information on how to implement
-a custom actor which is usable as if it where a [@http://www.sgi.com/tech/stl/Container.html STL Container].
+a custom actor which is usable as if it were a
+[@http://www.sgi.com/tech/stl/Container.html STL Container].
[heading Requirements]
@@ -41,8 +42,8 @@
[heading Defining the actor]
-The first version of our `container_actor` interface to show the general
-principle. This will be continually be extended. For the sake of simplicity,
+The first version of our `container_actor` interface will show the general
+principle. This will be continually extended. For the sake of simplicity,
every member function generator will return [link phoenix.reference.modules.core.nothing `nothing`]
at first.
@@ -56,20 +57,20 @@
container_actor( base_type const& base )
: base_type( base ) {}
- compose<null_actor>::result_type const begin() const { return nothing; }
- compose<null_actor>::result_type const end() const { return nothing; }
- compose<null_actor>::result_type const size() const { return nothing; }
- compose<null_actor>::result_type const max_size() const { return nothing; }
- compose<null_actor>::result_type const empty() const { return nothing; }
-
- // note that swap is the only function needing another container.
- template <typename OtherExpr>
- compose<null_actor>::result_type const swap( actor<OtherExpr> const& ) const { return nothing; }
+ compose<null_actor>::type const begin() const { return nothing; }
+ compose<null_actor>::type const end() const { return nothing; }
+ compose<null_actor>::type const size() const { return nothing; }
+ compose<null_actor>::type const max_size() const { return nothing; }
+ compose<null_actor>::type const empty() const { return nothing; }
+
+ // Note that swap is the only function needing another container.
+ template <typename Container>
+ compose<null_actor>::result_type const swap( actor<Container> const& ) const { return nothing; }
};
[heading Using the actor]
-Although the member function do nothing right now, we want to test if we can use
+Although the member functions do nothing right now, we want to test if we can use
our new actor.
First, lets create a generator which wraps the `container_actor` around any other
@@ -82,7 +83,7 @@
return expr;
}
-Now lets test this:
+Now let's test this:
std::vector<int> v;
v.push_back(0);
@@ -90,13 +91,13 @@
v.push_back(2);
v.push_back(3);
- (container(arg1).begin())(v);
+ (container(arg1).size())(v);
-Granted, this is not really elegant and not really practical (we coud have just
-used phoenix::begin(v) from the [link phoenix.reference.modules.stl.algorithm Phoenix Algorithm Module],
+Granted, this is not really elegant and not very practical (we could have just
+used phoenix::begin(v) from the [link phoenix.reference.modules.stl.algorithm Phoenix algorithm module],
but we can do better.
-Let's have a [link phoenix.reference.modules.core.arguments Argument placeholder]
+Let's have an [link phoenix.reference.modules.core.arguments argument placeholder]
which is usable as if it was a STL container:
template <typename N>
@@ -106,7 +107,7 @@
make_con1::type const con1 = make_con1()(boost::mpl::int_<0>());
// and so on ...
-The above code now changes to:
+The above example can be rewritten as:
std::vector<int> v;
v.push_back(0);
@@ -118,11 +119,11 @@
Wow, that was easy!
-[heading Adding live to the actor]
+[heading Adding life to the actor]
-This one will be actually even easier.
+This one will be even easier!
-First, we define a [link pheonix.reference.modules.function Lazy function] which
+First, we define a [link phoenix.reference.modules.function lazy function] which
evaluates the expression we want to implement.
Following is the implementation of the size function:
@@ -150,7 +151,7 @@
}
};
-Good, this was the first part. The second part will be, to implement the size member
+Good, this was the first part. The second part will be to implement the size member
function of `container_actor`:
template <typename Expr>
@@ -173,8 +174,8 @@
// the rest ...
};
-It is left as exercise to the user to implement the missing parts by resuing
+It is left as an exercise to the user to implement the missing parts by reusing
functions from the [link phoenix.reference.modules.stl.algorithm Phoenix Algorithm Module]
-(The impatient take a look here: [@../../example/container_actor.cpp container_actor.cpp]).
+(the impatient take a look here: [@../../example/container_actor.cpp container_actor.cpp]).
[endsect]
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/index.html
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/index.html (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/index.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -26,7 +26,7 @@
</h3></div></div>
<div><p class="copyright">Copyright © 2002-2005, 2010 Joel de Guzman, Dan Marsden, Thomas Heller</p></div>
<div><div class="legalnotice">
-<a name="id772363"></a><p>
+<a name="id633133"></a><p>
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)
</p>
@@ -38,16 +38,24 @@
<dt><span class="section">Introduction</span></dt>
<dt><span class="section">Starter Kit</span></dt>
<dd><dl>
-<dt><span class="section">Values</span></dt>
-<dt><span class="section">References</span></dt>
-<dt><span class="section">Arguments</span></dt>
+<dt><span class="section">Primitives</span></dt>
+<dd><dl>
+<dt><span class="section">Values</span></dt>
+<dt><span class="section">References</span></dt>
+<dt><span class="section">Arguments</span></dt>
+</dl></dd>
<dt><span class="section">Composites</span></dt>
-<dt><span class="section">Lazy Operators</span></dt>
-<dt><span class="section">Lazy Statements</span></dt>
-<dt><span class="section"><a href="phoenix/starter_kit/construct__new__delete__casts.html">Construct,
- New, Delete, Casts</a></span></dt>
-<dt><span class="section">Lazy Functions</span></dt>
-<dt><span class="section">More</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="phoenix/starter_kit/composites/lazy_operators.html">Lazy
+ Operators</a></span></dt>
+<dt><span class="section"><a href="phoenix/starter_kit/composites/lazy_statements.html">Lazy
+ Statements</a></span></dt>
+<dt><span class="section"><a href="phoenix/starter_kit/composites/construct__new__delete__casts.html">Construct,
+ New, Delete, Casts</a></span></dt>
+<dt><span class="section"><a href="phoenix/starter_kit/composites/lazy_functions.html">Lazy
+ Functions</a></span></dt>
+<dt><span class="section">More</span></dt>
+</dl></dd>
</dl></dd>
<dt><span class="section">Advanced Topics</span></dt>
<dd><dl>
@@ -129,16 +137,13 @@
</dl></dd>
</dl></dd>
</dl></dd>
-<dt><span class="section">Notes</span></dt>
-<dd><dl><dt><span class="section"><a href="phoenix/notes/porting_from_phoenix_2_0.html">Porting from
- Phoenix 2.0</a></span></dt></dl></dd>
<dt><span class="section">Wrap Up</span></dt>
<dt><span class="section">Acknowledgments</span></dt>
<dt><span class="section">References</span></dt>
</dl>
</div>
<a name="phoenix.preface"></a><h2>
-<a name="id803093"></a>
+<a name="id663863"></a>
<a class="link" href="index.html#phoenix.preface">Preface</a>
</h2>
<div class="blockquote"><blockquote class="blockquote"><p>
@@ -157,7 +162,7 @@
<span class="inlinemediaobject"><img src="images/lambda_cpp.png" alt="lambda_cpp"></span>
</p>
<a name="phoenix.description"></a><h3>
-<a name="id771145"></a>
+<a name="id631915"></a>
<a class="link" href="index.html#phoenix.description">Description</a>
</h3>
<p>
@@ -175,7 +180,7 @@
library is organized in highly independent modules and layers.
</p>
<a name="phoenix.how_to_use_this_manual"></a><h3>
-<a name="id771192"></a>
+<a name="id631962"></a>
<a class="link" href="index.html#phoenix.how_to_use_this_manual">How to use this manual</a>
</h3>
<p>
@@ -197,7 +202,7 @@
icons precede some text to indicate:
</p>
<div class="table">
-<a name="id771226"></a><p class="title"><b>Table 1.1. Icons</b></p>
+<a name="id631996"></a><p class="title"><b>Table 1.1. Icons</b></p>
<div class="table-contents"><table class="table" summary="Icons">
<colgroup>
<col>
@@ -286,12 +291,12 @@
</p>
</div>
<a name="phoenix._emphasis_role__bold___emphasis____to_my_dear_daughter__phoenix__emphasis___emphasis_"></a><h3>
-<a name="id812048"></a>
+<a name="id672818"></a>
<a class="link" href="index.html#phoenix._emphasis_role__bold___emphasis____to_my_dear_daughter__phoenix__emphasis___emphasis_"><span class="bold"><strong><span class="emphasis"><em>...To my dear daughter, Phoenix</em></span></strong></span></a>
</h3>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: August 14, 2010 at 22:15:39 GMT</small></p></td>
+<td align="left"><p><small>Last revised: August 16, 2010 at 15:22:16 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/advanced_topics.html
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/advanced_topics.html (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/advanced_topics.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -6,14 +6,14 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../index.html" title="Chapter 1. Phoenix 3.0">
<link rel="up" href="../index.html" title="Chapter 1. Phoenix 3.0">
-<link rel="prev" href="starter_kit/more.html" title="More">
+<link rel="prev" href="starter_kit/composites/more.html" title="More">
<link rel="next" href="advanced_topics/porting_from_phoenix_2_0.html" title="Porting from Phoenix 2.0">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="starter_kit/more.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="advanced_topics/porting_from_phoenix_2_0.html"><img src="../images/next.png" alt="Next"></a>
+<a accesskey="p" href="starter_kit/composites/more.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="advanced_topics/porting_from_phoenix_2_0.html"><img src="../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
@@ -35,7 +35,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="starter_kit/more.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="advanced_topics/porting_from_phoenix_2_0.html"><img src="../images/next.png" alt="Next"></a>
+<a accesskey="p" href="starter_kit/composites/more.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="advanced_topics/porting_from_phoenix_2_0.html"><img src="../images/next.png" alt="Next"></a>
</div>
</body>
</html>
Added: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/advanced_topics/custom_evaluation.html
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/advanced_topics/custom_evaluation.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -0,0 +1,34 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Custom Evaluation</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="../../index.html" title="Chapter 1. Phoenix 3.0">
+<link rel="up" href="../advanced_topics.html" title="Advanced Topics">
+<link rel="prev" href="extending_actors.html" title="Extending Actors">
+<link rel="next" href="../reference.html" title="Reference">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="extending_actors.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../advanced_topics.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../reference.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section"><div class="titlepage"><div><div><h3 class="title">
+<a name="phoenix.advanced_topics.custom_evaluation"></a><a class="link" href="custom_evaluation.html" title="Custom Evaluation">Custom Evaluation</a>
+</h3></div></div></div></div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2002-2005, 2010 Joel de Guzman, Dan Marsden, Thomas Heller<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="extending_actors.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../advanced_topics.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../reference.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/advanced_topics/extending_actors.html
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/advanced_topics/extending_actors.html (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/advanced_topics/extending_actors.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -20,25 +20,26 @@
<a name="phoenix.advanced_topics.extending_actors"></a><a class="link" href="extending_actors.html" title="Extending Actors">Extending Actors</a>
</h3></div></div></div>
<p>
- <a class="link" href="../../">Actors</a> are one of
+ <a class="link" href="../reference/concepts/actor.html" title="Actor">Actors</a> are one of
the main parts of the library, and one of the many customization points.
- The default actor implementation provides several perator() overloads which
+ The default actor implementation provides several operator() overloads which
deal with the evaluation of expressions.
</p>
<p>
For some uses cases this might not be enough. For convenience it is thinkable
to provide custom member functions which generate new expressions. An example
- is the <a class="link" href="../reference/modules/statement/if__statement.html" title="if_ Statement">if_
- Statement</a> which provides an additional else member. With this the
- actual phoenix expression becomes more expressive.
+ is the <a class="link" href="../reference/modules/statement/___if_else_____statement.html" title="if_else_ Statement">if_else_
+Statement</a>
+ which provides an additional else member for generating a lazy if-else expression.
+ With this the actual Phoenix expression becomes more expressive.
</p>
<p>
- Another szenario is to give actors the semantics of a certain well known
+ Another scenario is to give actors the semantics of a certain well known
interface or concept. This tutorial like section will provide information
- on how to implement a custom actor which is usable as if it where a STL Container.
+ on how to implement a custom actor which is usable as if it were a STL Container.
</p>
<a name="phoenix.advanced_topics.extending_actors.requirements"></a><h5>
-<a name="id816449"></a>
+<a name="id677375"></a>
<a class="link" href="extending_actors.html#phoenix.advanced_topics.extending_actors.requirements">Requirements</a>
</h5>
<p>
@@ -140,13 +141,13 @@
Additionally, we want all the operator() overloads of the regular actor.
</p>
<a name="phoenix.advanced_topics.extending_actors.defining_the_actor"></a><h5>
-<a name="id816737"></a>
+<a name="id677664"></a>
<a class="link" href="extending_actors.html#phoenix.advanced_topics.extending_actors.defining_the_actor">Defining
the actor</a>
</h5>
<p>
The first version of our <code class="computeroutput"><span class="identifier">container_actor</span></code>
- interface to show the general principle. This will be continually be extended.
+ interface will show the general principle. This will be continually extended.
For the sake of simplicity, every member function generator will return
<a class="link" href="../reference/modules/core/nothing.html" title="Nothing"><code class="computeroutput"><span class="identifier">nothing</span></code></a>
at first.
@@ -161,24 +162,24 @@
<span class="identifier">container_actor</span><span class="special">(</span> <span class="identifier">base_type</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">base</span> <span class="special">)</span>
<span class="special">:</span> <span class="identifier">base_type</span><span class="special">(</span> <span class="identifier">base</span> <span class="special">)</span> <span class="special">{}</span>
- <span class="identifier">compose</span><span class="special"><</span><span class="identifier">null_actor</span><span class="special">>::</span><span class="identifier">result_type</span> <span class="keyword">const</span> <span class="identifier">begin</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">nothing</span><span class="special">;</span> <span class="special">}</span>
- <span class="identifier">compose</span><span class="special"><</span><span class="identifier">null_actor</span><span class="special">>::</span><span class="identifier">result_type</span> <span class="keyword">const</span> <span class="identifier">end</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">nothing</span><span class="special">;</span> <span class="special">}</span>
- <span class="identifier">compose</span><span class="special"><</span><span class="identifier">null_actor</span><span class="special">>::</span><span class="identifier">result_type</span> <span class="keyword">const</span> <span class="identifier">size</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">nothing</span><span class="special">;</span> <span class="special">}</span>
- <span class="identifier">compose</span><span class="special"><</span><span class="identifier">null_actor</span><span class="special">>::</span><span class="identifier">result_type</span> <span class="keyword">const</span> <span class="identifier">max_size</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">nothing</span><span class="special">;</span> <span class="special">}</span>
- <span class="identifier">compose</span><span class="special"><</span><span class="identifier">null_actor</span><span class="special">>::</span><span class="identifier">result_type</span> <span class="keyword">const</span> <span class="identifier">empty</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">nothing</span><span class="special">;</span> <span class="special">}</span>
+ <span class="identifier">compose</span><span class="special"><</span><span class="identifier">null_actor</span><span class="special">>::</span><span class="identifier">type</span> <span class="keyword">const</span> <span class="identifier">begin</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">nothing</span><span class="special">;</span> <span class="special">}</span>
+ <span class="identifier">compose</span><span class="special"><</span><span class="identifier">null_actor</span><span class="special">>::</span><span class="identifier">type</span> <span class="keyword">const</span> <span class="identifier">end</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">nothing</span><span class="special">;</span> <span class="special">}</span>
+ <span class="identifier">compose</span><span class="special"><</span><span class="identifier">null_actor</span><span class="special">>::</span><span class="identifier">type</span> <span class="keyword">const</span> <span class="identifier">size</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">nothing</span><span class="special">;</span> <span class="special">}</span>
+ <span class="identifier">compose</span><span class="special"><</span><span class="identifier">null_actor</span><span class="special">>::</span><span class="identifier">type</span> <span class="keyword">const</span> <span class="identifier">max_size</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">nothing</span><span class="special">;</span> <span class="special">}</span>
+ <span class="identifier">compose</span><span class="special"><</span><span class="identifier">null_actor</span><span class="special">>::</span><span class="identifier">type</span> <span class="keyword">const</span> <span class="identifier">empty</span><span class="special">()</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">nothing</span><span class="special">;</span> <span class="special">}</span>
- <span class="comment">// note that swap is the only function needing another container.
-</span> <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">OtherExpr</span><span class="special">></span>
- <span class="identifier">compose</span><span class="special"><</span><span class="identifier">null_actor</span><span class="special">>::</span><span class="identifier">result_type</span> <span class="keyword">const</span> <span class="identifier">swap</span><span class="special">(</span> <span class="identifier">actor</span><span class="special"><</span><span class="identifier">OtherExpr</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span> <span class="special">)</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">nothing</span><span class="special">;</span> <span class="special">}</span>
+ <span class="comment">// Note that swap is the only function needing another container.
+</span> <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Container</span><span class="special">></span>
+ <span class="identifier">compose</span><span class="special"><</span><span class="identifier">null_actor</span><span class="special">>::</span><span class="identifier">result_type</span> <span class="keyword">const</span> <span class="identifier">swap</span><span class="special">(</span> <span class="identifier">actor</span><span class="special"><</span><span class="identifier">Container</span><span class="special">></span> <span class="keyword">const</span><span class="special">&</span> <span class="special">)</span> <span class="keyword">const</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">nothing</span><span class="special">;</span> <span class="special">}</span>
<span class="special">};</span>
</pre>
<a name="phoenix.advanced_topics.extending_actors.using_the_actor"></a><h5>
-<a name="id817440"></a>
+<a name="id678366"></a>
<a class="link" href="extending_actors.html#phoenix.advanced_topics.extending_actors.using_the_actor">Using
the actor</a>
</h5>
<p>
- Although the member function do nothing right now, we want to test if we
+ Although the member functions do nothing right now, we want to test if we
can use our new actor.
</p>
<p>
@@ -193,7 +194,7 @@
<span class="special">}</span>
</pre>
<p>
- Now lets test this:
+ Now let's test this:
</p>
<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">v</span><span class="special">;</span>
<span class="identifier">v</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">0</span><span class="special">);</span>
@@ -201,15 +202,15 @@
<span class="identifier">v</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">2</span><span class="special">);</span>
<span class="identifier">v</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">3</span><span class="special">);</span>
-<span class="special">(</span><span class="identifier">container</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">).</span><span class="identifier">begin</span><span class="special">())(</span><span class="identifier">v</span><span class="special">);</span>
+<span class="special">(</span><span class="identifier">container</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">).</span><span class="identifier">size</span><span class="special">())(</span><span class="identifier">v</span><span class="special">);</span>
</pre>
<p>
- Granted, this is not really elegant and not really practical (we coud have
+ Granted, this is not really elegant and not very practical (we could have
just used phoenix::begin(v) from the <a class="link" href="../reference/modules/stl/algorithm.html" title="Algorithm">Phoenix
- Algorithm Module</a>, but we can do better.
+ algorithm module</a>, but we can do better.
</p>
<p>
- Let's have a <a class="link" href="../reference/modules/core/arguments.html" title="Arguments">Argument
+ Let's have an <a class="link" href="../reference/modules/core/arguments.html" title="Arguments">argument
placeholder</a> which is usable as if it was a STL container:
</p>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">N</span><span class="special">></span>
@@ -220,7 +221,7 @@
<span class="comment">// and so on ...
</span></pre>
<p>
- The above code now changes to:
+ The above example can be rewritten as:
</p>
<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">v</span><span class="special">;</span>
<span class="identifier">v</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">0</span><span class="special">);</span>
@@ -233,16 +234,16 @@
<p>
Wow, that was easy!
</p>
-<a name="phoenix.advanced_topics.extending_actors.adding_live_to_the_actor"></a><h5>
-<a name="id818201"></a>
- <a class="link" href="extending_actors.html#phoenix.advanced_topics.extending_actors.adding_live_to_the_actor">Adding
- live to the actor</a>
+<a name="phoenix.advanced_topics.extending_actors.adding_life_to_the_actor"></a><h5>
+<a name="id679128"></a>
+ <a class="link" href="extending_actors.html#phoenix.advanced_topics.extending_actors.adding_life_to_the_actor">Adding
+ life to the actor</a>
</h5>
<p>
- This one will be actually even easier.
+ This one will be even easier!
</p>
<p>
- First, we define a <a class="link" href="../../">Lazy
+ First, we define a <a class="link" href="../reference/modules/function.html" title="Function">lazy
function</a> which evaluates the expression we want to implement. Following
is the implementation of the size function:
</p>
@@ -271,8 +272,8 @@
<span class="special">};</span>
</pre>
<p>
- Good, this was the first part. The second part will be, to implement the
- size member function of <code class="computeroutput"><span class="identifier">container_actor</span></code>:
+ Good, this was the first part. The second part will be to implement the size
+ member function of <code class="computeroutput"><span class="identifier">container_actor</span></code>:
</p>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Expr</span><span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">container_actor</span>
@@ -295,9 +296,9 @@
</span><span class="special">};</span>
</pre>
<p>
- It is left as exercise to the user to implement the missing parts by resuing
+ It is left as an exercise to the user to implement the missing parts by reusing
functions from the <a class="link" href="../reference/modules/stl/algorithm.html" title="Algorithm">Phoenix
- Algorithm Module</a> (The impatient take a look here: container_actor.cpp).
+ Algorithm Module</a> (the impatient take a look here: container_actor.cpp).
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/basics.html
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/basics.html (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/basics.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -41,11 +41,11 @@
means in a short while.
</p></td></tr>
</table></div>
-<a name="phoenix.reference.basics.partial_function_application"></a><h3>
-<a name="id819204"></a>
+<a name="phoenix.reference.basics.partial_function_application"></a><h5>
+<a name="id680131"></a>
<a class="link" href="basics.html#phoenix.reference.basics.partial_function_application">Partial
Function Application</a>
- </h3>
+ </h5>
<p>
Think of a function as a black box. You pass arguments and it returns something
back. The figure below depicts the typical scenario.
@@ -97,17 +97,17 @@
application. And even more, with Phoenix, these resulting functions won't
be black boxes anymore.
</p>
-<a name="phoenix.reference.basics.stl_and_higher_order_functions"></a><h3>
-<a name="id819420"></a>
+<a name="phoenix.reference.basics.stl_and_higher_order_functions"></a><h5>
+<a name="id680347"></a>
<a class="link" href="basics.html#phoenix.reference.basics.stl_and_higher_order_functions">STL
and higher order functions</a>
- </h3>
+ </h5>
<p>
So, what's all the fuss? What makes partial function application so useful?
- Recall our original example in the <a class="link" href="../starter_kit/lazy_operators.html" title="Lazy Operators">previous
+ Recall our original example in the <a class="link" href="../starter_kit/composites/lazy_operators.html" title="Lazy Operators">previous
section</a>:
</p>
-<pre class="programlisting"><span class="identifier">find_if</span><span class="special">(</span><span class="identifier">c</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">c</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">arg1</span> <span class="special">%</span> <span class="number">2</span> <span class="special">==</span> <span class="number">1</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">find_if</span><span class="special">(</span><span class="identifier">c</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">c</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">arg1</span> <span class="special">%</span> <span class="number">2</span> <span class="special">==</span> <span class="number">1</span><span class="special">)</span>
</pre>
<p>
The expression <code class="computeroutput"><span class="identifier">arg1</span> <span class="special">%</span>
@@ -128,10 +128,10 @@
arguments and return values from functions.
</p></td></tr>
</table></div>
-<a name="phoenix.reference.basics.lazy_evaluation"></a><h3>
-<a name="id819624"></a>
+<a name="phoenix.reference.basics.lazy_evaluation"></a><h5>
+<a name="id680559"></a>
<a class="link" href="basics.html#phoenix.reference.basics.lazy_evaluation">Lazy Evaluation</a>
- </h3>
+ </h5>
<p>
In Phoenix, to put it more accurately, function evaluation has two stages:
</p>
@@ -180,14 +180,14 @@
<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">x</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span>
<span class="keyword">int</span> <span class="identifier">y</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span>
-<span class="identifier">cout</span> <span class="special"><<</span> <span class="special">(</span><span class="identifier">arg1</span> <span class="special">%</span> <span class="number">2</span> <span class="special">==</span> <span class="number">1</span><span class="special">)(</span><span class="identifier">x</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span> <span class="comment">// prints 1 or true
-</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="special">(</span><span class="identifier">arg1</span> <span class="special">%</span> <span class="number">2</span> <span class="special">==</span> <span class="number">1</span><span class="special">)(</span><span class="identifier">y</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span> <span class="comment">// prints 0 or false
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="special">(</span><span class="identifier">arg1</span> <span class="special">%</span> <span class="number">2</span> <span class="special">==</span> <span class="number">1</span><span class="special">)(</span><span class="identifier">x</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="comment">// prints 1 or true
+</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="special">(</span><span class="identifier">arg1</span> <span class="special">%</span> <span class="number">2</span> <span class="special">==</span> <span class="number">1</span><span class="special">)(</span><span class="identifier">y</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="comment">// prints 0 or false
</span></pre>
-<a name="phoenix.reference.basics.forwarding_function_problem"></a><h3>
-<a name="id820134"></a>
+<a name="phoenix.reference.basics.forwarding_function_problem"></a><h5>
+<a name="id681102"></a>
<a class="link" href="basics.html#phoenix.reference.basics.forwarding_function_problem">Forwarding
Function Problem</a>
- </h3>
+ </h5>
<p>
Usually, we, as clients, write the call-back functions while libraries (such
as STL) provide the callee (e.g. <code class="computeroutput"><span class="identifier">find_if</span></code>).
@@ -206,7 +206,7 @@
<code class="computeroutput"><span class="identifier">x</span></code>.
</p>
<p>
- In Phoenix we emulated perfect forwarding through Preprocessor Macros generating
+ In Phoenix we emulated perfect forwarding through preprocessor macros generating
code to allow const and non-const references.
</p>
<p>
@@ -224,11 +224,11 @@
is set to 3.
</p></td></tr>
</table></div>
-<a name="phoenix.reference.basics.polymorphic_functions"></a><h3>
-<a name="id820272"></a>
+<a name="phoenix.reference.basics.polymorphic_functions"></a><h5>
+<a name="id681240"></a>
<a class="link" href="basics.html#phoenix.reference.basics.polymorphic_functions">Polymorphic
Functions</a>
- </h3>
+ </h5>
<p>
Unless otherwise noted, Phoenix generated functions are fully polymorphic.
For instance, the <code class="computeroutput"><span class="identifier">add</span></code> example
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/concepts/actor.html
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/concepts/actor.html (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/concepts/actor.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -20,7 +20,7 @@
<a name="phoenix.reference.concepts.actor"></a><a class="link" href="actor.html" title="Actor">Actor</a>
</h4></div></div></div>
<a name="phoenix.reference.concepts.actor.description"></a><h6>
-<a name="id821641"></a>
+<a name="id682655"></a>
<a class="link" href="actor.html#phoenix.reference.concepts.actor.description">Description</a>
</h6>
<p>
@@ -74,7 +74,7 @@
</dl>
</div>
<a name="phoenix.reference.concepts.actor.valid_expressions"></a><h6>
-<a name="id821874"></a>
+<a name="id682899"></a>
<a class="link" href="actor.html#phoenix.reference.concepts.actor.valid_expressions">Valid
Expressions</a>
</h6>
@@ -156,7 +156,7 @@
</tbody>
</table></div>
<a name="phoenix.reference.concepts.actor.result_type_expressions"></a><h6>
-<a name="id822008"></a>
+<a name="id683032"></a>
<a class="link" href="actor.html#phoenix.reference.concepts.actor.result_type_expressions">Result
Type Expressions</a>
</h6>
@@ -238,7 +238,7 @@
</tbody>
</table></div>
<a name="phoenix.reference.concepts.actor.expression_semantics"></a><h6>
-<a name="id822141"></a>
+<a name="id683165"></a>
<a class="link" href="actor.html#phoenix.reference.concepts.actor.expression_semantics">Expression
Semantics</a>
</h6>
@@ -301,7 +301,7 @@
</tbody>
</table></div>
<a name="phoenix.reference.concepts.actor.models"></a><h6>
-<a name="id822283"></a>
+<a name="id683307"></a>
<a class="link" href="actor.html#phoenix.reference.concepts.actor.models">Models</a>
</h6>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/concepts/environment.html
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/concepts/environment.html (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/concepts/environment.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -20,7 +20,7 @@
<a name="phoenix.reference.concepts.environment"></a><a class="link" href="environment.html" title="Environment">Environment</a>
</h4></div></div></div>
<a name="phoenix.reference.concepts.environment.description"></a><h6>
-<a name="id823599"></a>
+<a name="id684626"></a>
<a class="link" href="environment.html#phoenix.reference.concepts.environment.description">Description</a>
</h6>
<p>
@@ -51,7 +51,7 @@
</dl>
</div>
<a name="phoenix.reference.concepts.environment.valid_expressions"></a><h6>
-<a name="id823720"></a>
+<a name="id684747"></a>
<a class="link" href="environment.html#phoenix.reference.concepts.environment.valid_expressions">Valid
Expressions</a>
</h6>
@@ -116,7 +116,7 @@
</tbody>
</table></div>
<a name="phoenix.reference.concepts.environment.result_type_expressions"></a><h6>
-<a name="id823894"></a>
+<a name="id684920"></a>
<a class="link" href="environment.html#phoenix.reference.concepts.environment.result_type_expressions">Result
Type Expressions</a>
</h6>
@@ -182,7 +182,7 @@
</tbody>
</table></div>
<a name="phoenix.reference.concepts.environment.expression_semantics"></a><h6>
-<a name="id824098"></a>
+<a name="id685124"></a>
<a class="link" href="environment.html#phoenix.reference.concepts.environment.expression_semantics">Expression
Semantics</a>
</h6>
@@ -233,7 +233,7 @@
</tbody>
</table></div>
<a name="phoenix.reference.concepts.environment.models"></a><h6>
-<a name="id824282"></a>
+<a name="id685308"></a>
<a class="link" href="environment.html#phoenix.reference.concepts.environment.models">Models</a>
</h6>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/concepts/evaluationpolicy.html
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/concepts/evaluationpolicy.html (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/concepts/evaluationpolicy.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -20,7 +20,7 @@
<a name="phoenix.reference.concepts.evaluationpolicy"></a><a class="link" href="evaluationpolicy.html" title="EvaluationPolicy">EvaluationPolicy</a>
</h4></div></div></div>
<a name="phoenix.reference.concepts.evaluationpolicy.description"></a><h6>
-<a name="id822986"></a>
+<a name="id684012"></a>
<a class="link" href="evaluationpolicy.html#phoenix.reference.concepts.evaluationpolicy.description">Description</a>
</h6>
<p>
@@ -57,7 +57,7 @@
</dl>
</div>
<a name="phoenix.reference.concepts.evaluationpolicy.valid_expressions"></a><h6>
-<a name="id823168"></a>
+<a name="id684194"></a>
<a class="link" href="evaluationpolicy.html#phoenix.reference.concepts.evaluationpolicy.valid_expressions">Valid
Expressions</a>
</h6>
@@ -104,7 +104,7 @@
</tr></tbody>
</table></div>
<a name="phoenix.reference.concepts.evaluationpolicy.result_type_expressions"></a><h6>
-<a name="id823295"></a>
+<a name="id684321"></a>
<a class="link" href="evaluationpolicy.html#phoenix.reference.concepts.evaluationpolicy.result_type_expressions">Result
Type Expressions</a>
</h6>
@@ -151,7 +151,7 @@
</tr></tbody>
</table></div>
<a name="phoenix.reference.concepts.evaluationpolicy.expression_semantics"></a><h6>
-<a name="id823449"></a>
+<a name="id684475"></a>
<a class="link" href="evaluationpolicy.html#phoenix.reference.concepts.evaluationpolicy.expression_semantics">Expression
Semantics</a>
</h6>
@@ -187,7 +187,7 @@
</tr></tbody>
</table></div>
<a name="phoenix.reference.concepts.evaluationpolicy.models"></a><h6>
-<a name="id823561"></a>
+<a name="id684588"></a>
<a class="link" href="evaluationpolicy.html#phoenix.reference.concepts.evaluationpolicy.models">Models</a>
</h6>
<p>
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/concepts/evaluator.html
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/concepts/evaluator.html (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/concepts/evaluator.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -20,7 +20,7 @@
<a name="phoenix.reference.concepts.evaluator"></a><a class="link" href="evaluator.html" title="Evaluator">Evaluator</a>
</h4></div></div></div>
<a name="phoenix.reference.concepts.evaluator.description"></a><h6>
-<a name="id822442"></a>
+<a name="id683467"></a>
<a class="link" href="evaluator.html#phoenix.reference.concepts.evaluator.description">Description</a>
</h6>
<p>
@@ -62,7 +62,7 @@
</dl>
</div>
<a name="phoenix.reference.concepts.evaluator.valid_expressions"></a><h6>
-<a name="id822612"></a>
+<a name="id683637"></a>
<a class="link" href="evaluator.html#phoenix.reference.concepts.evaluator.valid_expressions">Valid
Expressions</a>
</h6>
@@ -109,7 +109,7 @@
</tr></tbody>
</table></div>
<a name="phoenix.reference.concepts.evaluator.result_type_expressions"></a><h6>
-<a name="id822730"></a>
+<a name="id683755"></a>
<a class="link" href="evaluator.html#phoenix.reference.concepts.evaluator.result_type_expressions">Result
Type Expressions</a>
</h6>
@@ -155,7 +155,7 @@
</tr></tbody>
</table></div>
<a name="phoenix.reference.concepts.evaluator.expression_semantics"></a><h6>
-<a name="id822816"></a>
+<a name="id683841"></a>
<a class="link" href="evaluator.html#phoenix.reference.concepts.evaluator.expression_semantics">Expression
Semantics</a>
</h6>
@@ -191,7 +191,7 @@
</tr></tbody>
</table></div>
<a name="phoenix.reference.concepts.evaluator.models"></a><h6>
-<a name="id822921"></a>
+<a name="id683946"></a>
<a class="link" href="evaluator.html#phoenix.reference.concepts.evaluator.models">Models</a>
</h6>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/modules/core/arguments.html
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/modules/core/arguments.html (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/modules/core/arguments.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -31,7 +31,7 @@
as an imaginary data-bin where a function argument will be placed.
</p>
<a name="phoenix.reference.modules.core.arguments.predefined_arguments"></a><h3>
-<a name="id825815"></a>
+<a name="id686841"></a>
<a class="link" href="arguments.html#phoenix.reference.modules.core.arguments.predefined_arguments">Predefined
Arguments</a>
</h3>
@@ -79,7 +79,7 @@
for more details.
</p>
<a name="phoenix.reference.modules.core.arguments.user_defined_arguments"></a><h3>
-<a name="id826592"></a>
+<a name="id687616"></a>
<a class="link" href="arguments.html#phoenix.reference.modules.core.arguments.user_defined_arguments">User
Defined Arguments</a>
</h3>
@@ -119,7 +119,7 @@
</td></tr>
</table></div>
<a name="phoenix.reference.modules.core.arguments.evaluating_an_argument"></a><h3>
-<a name="id826818"></a>
+<a name="id687843"></a>
<a class="link" href="arguments.html#phoenix.reference.modules.core.arguments.evaluating_an_argument">Evaluating
an Argument</a>
</h3>
@@ -146,7 +146,7 @@
<span class="identifier">Hello</span> <span class="identifier">World</span>
</pre>
<a name="phoenix.reference.modules.core.arguments.extra_arguments"></a><h3>
-<a name="id827147"></a>
+<a name="id688172"></a>
<a class="link" href="arguments.html#phoenix.reference.modules.core.arguments.extra_arguments">Extra
Arguments</a>
</h3>
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/modules/core/references.html
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/modules/core/references.html (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/modules/core/references.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -55,7 +55,7 @@
<pre class="programlisting"><span class="identifier">add_assign</span><span class="special">(</span><span class="identifier">ref</span><span class="special">(</span><span class="identifier">i</span><span class="special">),</span> <span class="number">2</span><span class="special">)</span>
</pre>
<a name="phoenix.reference.modules.core.references.evaluating_a_reference"></a><h3>
-<a name="id825286"></a>
+<a name="id686311"></a>
<a class="link" href="references.html#phoenix.reference.modules.core.references.evaluating_a_reference">Evaluating
a Reference</a>
</h3>
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/modules/core/values.html
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/modules/core/values.html (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/modules/core/values.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -48,7 +48,7 @@
but, as we'll see later on, there are situations where this is unavoidable.
</p>
<a name="phoenix.reference.modules.core.values.evaluating_a_value"></a><h3>
-<a name="id824767"></a>
+<a name="id685793"></a>
<a class="link" href="values.html#phoenix.reference.modules.core.values.evaluating_a_value">Evaluating
a Value</a>
</h3>
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/modules/operator.html
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/modules/operator.html (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/modules/operator.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -33,7 +33,7 @@
<span class="identifier">arg1</span> <span class="special"><</span> <span class="number">150</span>
</pre>
<p>
- We have seen the lazy operators in action (see <a class="link" href="../../starter_kit/lazy_operators.html" title="Lazy Operators">Quick
+ We have seen the lazy operators in action (see <a class="link" href="../../../">Quick
Start</a>). Let's go back and examine them a little bit further:
</p>
<pre class="programlisting"><span class="identifier">find_if</span><span class="special">(</span><span class="identifier">c</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">c</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">arg1</span> <span class="special">%</span> <span class="number">2</span> <span class="special">==</span> <span class="number">1</span><span class="special">)</span>
@@ -141,12 +141,12 @@
</span><span class="identifier">val</span><span class="special">(</span><span class="number">1</span><span class="special">)</span> <span class="special"><<</span> <span class="number">3</span><span class="special">;</span> <span class="comment">// Lazily evaluated
</span></pre>
<a name="phoenix.reference.modules.operator.supported_operators"></a><h3>
-<a name="id829496"></a>
+<a name="id690521"></a>
<a class="link" href="operator.html#phoenix.reference.modules.operator.supported_operators">Supported
operators</a>
</h3>
<a name="phoenix.reference.modules.operator.unary_operators"></a><h4>
-<a name="id829516"></a>
+<a name="id690540"></a>
<a class="link" href="operator.html#phoenix.reference.modules.operator.unary_operators">Unary
operators</a>
</h4>
@@ -154,7 +154,7 @@
<span class="identifier">postfix</span><span class="special">:</span> <span class="special">++,</span> <span class="special">--</span>
</pre>
<a name="phoenix.reference.modules.operator.binary_operators"></a><h4>
-<a name="id829646"></a>
+<a name="id690670"></a>
<a class="link" href="operator.html#phoenix.reference.modules.operator.binary_operators">Binary
operators</a>
</h4>
@@ -164,7 +164,7 @@
<span class="special">&&,</span> <span class="special">||,</span> <span class="special">->*</span>
</pre>
<a name="phoenix.reference.modules.operator.ternary_operator"></a><h4>
-<a name="id829848"></a>
+<a name="id690873"></a>
<a class="link" href="operator.html#phoenix.reference.modules.operator.ternary_operator">Ternary
operator</a>
</h4>
@@ -179,7 +179,7 @@
is identical, albeit in a lazy manner.
</p>
<a name="phoenix.reference.modules.operator.member_pointer_operator"></a><h4>
-<a name="id829950"></a>
+<a name="id690974"></a>
<a class="link" href="operator.html#phoenix.reference.modules.operator.member_pointer_operator">Member
pointer operator</a>
</h4>
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/modules/stl/algorithm.html
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/modules/stl/algorithm.html (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/modules/stl/algorithm.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -7,13 +7,13 @@
<link rel="home" href="../../../../index.html" title="Chapter 1. Phoenix 3.0">
<link rel="up" href="../stl.html" title="STL">
<link rel="prev" href="container.html" title="Container">
-<link rel="next" href="../../../notes.html" title="Notes">
+<link rel="next" href="../../../wrap_up.html" title="Wrap Up">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="container.html"><img src="../../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../stl.html"><img src="../../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../notes.html"><img src="../../../../images/next.png" alt="Next"></a>
+<a accesskey="p" href="container.html"><img src="../../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../stl.html"><img src="../../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../wrap_up.html"><img src="../../../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
@@ -73,7 +73,7 @@
</p>
</div>
<div class="table">
-<a name="id843096"></a><p class="title"><b>Table 1.6. Iteration Algorithms</b></p>
+<a name="id704114"></a><p class="title"><b>Table 1.6. Iteration Algorithms</b></p>
<div class="table-contents"><table class="table" summary="Iteration Algorithms">
<colgroup>
<col>
@@ -123,7 +123,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
-<a name="id843374"></a><p class="title"><b>Table 1.7. Querying Algorithms</b></p>
+<a name="id704392"></a><p class="title"><b>Table 1.7. Querying Algorithms</b></p>
<div class="table-contents"><table class="table" summary="Querying Algorithms">
<colgroup>
<col>
@@ -415,7 +415,7 @@
</table></div>
</div>
<br class="table-break"><div class="table">
-<a name="id845846"></a><p class="title"><b>Table 1.8. Transformation Algorithms</b></p>
+<a name="id706863"></a><p class="title"><b>Table 1.8. Transformation Algorithms</b></p>
<div class="table-contents"><table class="table" summary="Transformation Algorithms">
<colgroup>
<col>
@@ -1068,7 +1068,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="container.html"><img src="../../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../stl.html"><img src="../../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../notes.html"><img src="../../../../images/next.png" alt="Next"></a>
+<a accesskey="p" href="container.html"><img src="../../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../stl.html"><img src="../../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../../wrap_up.html"><img src="../../../../images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/modules/stl/container.html
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/modules/stl/container.html (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/modules/stl/container.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -137,7 +137,7 @@
does not use the member "dot" syntax.
</p>
<div class="table">
-<a name="id840044"></a><p class="title"><b>Table 1.4. Sample usage</b></p>
+<a name="id701063"></a><p class="title"><b>Table 1.4. Sample usage</b></p>
<div class="table-contents"><table class="table" summary="Sample usage">
<colgroup>
<col>
@@ -215,7 +215,7 @@
</p>
</div>
<div class="table">
-<a name="id840383"></a><p class="title"><b>Table 1.5. Lazy STL Container Functions</b></p>
+<a name="id701403"></a><p class="title"><b>Table 1.5. Lazy STL Container Functions</b></p>
<div class="table-contents"><table class="table" summary="Lazy STL Container Functions">
<colgroup>
<col>
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/organization.html
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/organization.html (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/reference/organization.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -41,16 +41,16 @@
header files. There are no object files to link against.
</p>
<a name="phoenix.reference.organization.core"></a><h3>
-<a name="id820648"></a>
+<a name="id681617"></a>
<a class="link" href="organization.html#phoenix.reference.organization.core">Core</a>
</h3>
<p>
The lowest two layers comprise the core.
</p>
<p>
- The <code class="computeroutput"><span class="identifier">Actor</span></code> is the main concept
- behind the library. Lazy functions are abstracted as actors. There are only
- 2 kinds of actors:
+ The <a class="link" href="concepts/actor.html" title="Actor"><code class="computeroutput"><span class="identifier">Actor</span></code></a>
+ is the main concept behind the library. Lazy functions are abstracted as
+ actors. There are only 2 kinds of actors:
</p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
@@ -70,7 +70,7 @@
can again be another composite.
</p>
<div class="table">
-<a name="id820705"></a><p class="title"><b>Table 1.2. Modules</b></p>
+<a name="id681676"></a><p class="title"><b>Table 1.2. Modules</b></p>
<div class="table-contents"><table class="table" summary="Modules">
<colgroup>
<col>
@@ -168,7 +168,7 @@
<tr>
<td>
<p>
- Container
+ STL Container
</p>
</td>
<td>
@@ -181,7 +181,7 @@
<tr>
<td>
<p>
- Algorithm
+ STL Algorithm
</p>
</td>
<td>
@@ -199,7 +199,7 @@
the core module is defined in <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>.
</p>
<div class="table">
-<a name="id820993"></a><p class="title"><b>Table 1.3. Includes</b></p>
+<a name="id681965"></a><p class="title"><b>Table 1.3. Includes</b></p>
<div class="table-contents"><table class="table" summary="Includes">
<colgroup>
<col>
@@ -310,7 +310,7 @@
</td>
<td>
<p>
- <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">container</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
+ <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">stl</span><span class="special">/</span><span class="identifier">container</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
</p>
</td>
</tr>
@@ -322,7 +322,7 @@
</td>
<td>
<p>
- <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
+ <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">stl</span><span class="special">/</span><span class="identifier">algorithm</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
</p>
</td>
</tr>
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit.html
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit.html (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -7,29 +7,37 @@
<link rel="home" href="../index.html" title="Chapter 1. Phoenix 3.0">
<link rel="up" href="../index.html" title="Chapter 1. Phoenix 3.0">
<link rel="prev" href="introduction.html" title="Introduction">
-<link rel="next" href="starter_kit/values.html" title="Values">
+<link rel="next" href="starter_kit/primitives.html" title="Primitives">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="introduction.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="starter_kit/values.html"><img src="../images/next.png" alt="Next"></a>
+<a accesskey="p" href="introduction.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="starter_kit/primitives.html"><img src="../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="phoenix.starter_kit"></a><a class="link" href="starter_kit.html" title="Starter Kit">Starter Kit</a>
</h2></div></div></div>
<div class="toc"><dl>
-<dt><span class="section">Values</span></dt>
-<dt><span class="section">References</span></dt>
-<dt><span class="section">Arguments</span></dt>
+<dt><span class="section">Primitives</span></dt>
+<dd><dl>
+<dt><span class="section">Values</span></dt>
+<dt><span class="section">References</span></dt>
+<dt><span class="section">Arguments</span></dt>
+</dl></dd>
<dt><span class="section">Composites</span></dt>
-<dt><span class="section">Lazy Operators</span></dt>
-<dt><span class="section">Lazy Statements</span></dt>
-<dt><span class="section"><a href="starter_kit/construct__new__delete__casts.html">Construct,
- New, Delete, Casts</a></span></dt>
-<dt><span class="section">Lazy Functions</span></dt>
-<dt><span class="section">More</span></dt>
+<dd><dl>
+<dt><span class="section"><a href="starter_kit/composites/lazy_operators.html">Lazy
+ Operators</a></span></dt>
+<dt><span class="section"><a href="starter_kit/composites/lazy_statements.html">Lazy
+ Statements</a></span></dt>
+<dt><span class="section"><a href="starter_kit/composites/construct__new__delete__casts.html">Construct,
+ New, Delete, Casts</a></span></dt>
+<dt><span class="section"><a href="starter_kit/composites/lazy_functions.html">Lazy
+ Functions</a></span></dt>
+<dt><span class="section">More</span></dt>
+</dl></dd>
</dl></div>
<p>
Most "quick starts" only get you a few blocks from where you are.
@@ -45,17 +53,17 @@
start.
</p>
<p>
- This chapter is by no means a thorough discourse of the library. For more information
- on Phoenix, please take some time to read the rest of the User's Guide. Yet,
+ This section is by no means a thorough discourse of the library. For more information
+ on Phoenix, please take some time to read the rest of the Documentation. Yet,
if you just want to use the library quickly, now, this chapter will probably
suffice. Rather than taking you to the details of the library, we shall try
- to provide you with annotated exemplars instead. Hopefully, this will get you
+ to provide you with annotated exemples instead. Hopefully, this will get you
into high gear quickly.
</p>
-<a name="phoenix.starter_kit.functors_everywhere"></a><h3>
-<a name="id812152"></a>
+<a name="phoenix.starter_kit.functors_everywhere"></a><h4>
+<a name="id672922"></a>
<a class="link" href="starter_kit.html#phoenix.starter_kit.functors_everywhere">Functors everywhere</a>
- </h3>
+ </h4>
<p>
Phoenix is built on function objects (functors). The functor is the main building
block. We compose functors to build more complex functors... to build more
@@ -82,7 +90,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="introduction.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="starter_kit/values.html"><img src="../images/next.png" alt="Next"></a>
+<a accesskey="p" href="introduction.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="starter_kit/primitives.html"><img src="../images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/arguments.html
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/arguments.html (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/arguments.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -39,16 +39,16 @@
</p>
<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">3</span><span class="special">;</span>
<span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">s</span> <span class="special">=</span> <span class="string">"Hello World"</span><span class="special">;</span>
-<span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">arg1</span><span class="special">(</span><span class="identifier">i</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span> <span class="comment">// prints 3
-</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">arg2</span><span class="special">(</span><span class="identifier">i</span><span class="special">,</span> <span class="identifier">s</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span> <span class="comment">// prints "Hello World"
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">arg1</span><span class="special">(</span><span class="identifier">i</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="comment">// prints 3
+</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">arg2</span><span class="special">(</span><span class="identifier">i</span><span class="special">,</span> <span class="identifier">s</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="comment">// prints "Hello World"
</span></pre>
<p>
- (See arguments.cpp)
+ (See arguments.cpp)
</p>
<div class="sidebar">
<p class="title"><b></b></p>
<p>
- <span class="inlinemediaobject"><img src="../../images/tip.png" alt="tip"></span> Learn more about arguments
+ <span class="inlinemediaobject"><img src="../../images/tip.png" alt="tip"></span> Learn more about arguments <a class="link" href="../reference/modules/core/arguments.html" title="Arguments">here.</a>
</p>
</div>
</div>
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/composites.html
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/composites.html (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/composites.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -6,24 +6,30 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Chapter 1. Phoenix 3.0">
<link rel="up" href="../starter_kit.html" title="Starter Kit">
-<link rel="prev" href="arguments.html" title="Arguments">
-<link rel="next" href="lazy_operators.html" title="Lazy Operators">
+<link rel="prev" href="primitives/arguments.html" title="Arguments">
+<link rel="next" href="composites/lazy_operators.html" title="Lazy Operators">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="arguments.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../starter_kit.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="lazy_operators.html"><img src="../../images/next.png" alt="Next"></a>
+<a accesskey="p" href="primitives/arguments.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../starter_kit.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="composites/lazy_operators.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="phoenix.starter_kit.composites"></a><a class="link" href="composites.html" title="Composites">Composites</a>
</h3></div></div></div>
-<p>
- What we have seen so far, are what are called <span class="bold"><strong>primitives</strong></span>.
- You can think of primitives (such as values, references and arguments) as
- atoms.
- </p>
+<div class="toc"><dl>
+<dt><span class="section"><a href="composites/lazy_operators.html">Lazy
+ Operators</a></span></dt>
+<dt><span class="section"><a href="composites/lazy_statements.html">Lazy
+ Statements</a></span></dt>
+<dt><span class="section"><a href="composites/construct__new__delete__casts.html">Construct,
+ New, Delete, Casts</a></span></dt>
+<dt><span class="section"><a href="composites/lazy_functions.html">Lazy
+ Functions</a></span></dt>
+<dt><span class="section">More</span></dt>
+</dl></div>
<p>
Things start to get interesting when we start <span class="emphasis"><em>composing</em></span>
primitives to form <span class="bold"><strong>composites</strong></span>. The composites
@@ -40,7 +46,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="arguments.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../starter_kit.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="lazy_operators.html"><img src="../../images/next.png" alt="Next"></a>
+<a accesskey="p" href="primitives/arguments.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../starter_kit.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="composites/lazy_operators.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>
Added: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/composites/construct__new__delete__casts.html
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/composites/construct__new__delete__casts.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -0,0 +1,62 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Construct, New, Delete, Casts</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="../../../index.html" title="Chapter 1. Phoenix 3.0">
+<link rel="up" href="../composites.html" title="Composites">
+<link rel="prev" href="lazy_statements.html" title="Lazy Statements">
+<link rel="next" href="lazy_functions.html" title="Lazy Functions">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="lazy_statements.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../composites.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="lazy_functions.html"><img src="../../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="phoenix.starter_kit.composites.construct__new__delete__casts"></a><a class="link" href="construct__new__delete__casts.html" title="Construct, New, Delete, Casts">Construct,
+ New, Delete, Casts</a>
+</h4></div></div></div>
+<p>
+ You'll probably want to work with objects. There are lazy versions of constructor
+ calls, <code class="computeroutput"><span class="keyword">new</span></code>, <code class="computeroutput"><span class="keyword">delete</span></code> and the suite of C++ casts. Examples:
+ </p>
+<pre class="programlisting"><span class="identifier">construct</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">>(</span><span class="identifier">arg1</span><span class="special">,</span> <span class="identifier">arg2</span><span class="special">)</span> <span class="comment">// constructs a std::string from arg1, arg2
+</span><span class="identifier">new_</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">>(</span><span class="identifier">arg1</span><span class="special">,</span> <span class="identifier">arg2</span><span class="special">)</span> <span class="comment">// makes a new std::string from arg1, arg2
+</span><span class="identifier">delete_</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">)</span> <span class="comment">// deletes arg1 (assumed to be a pointer)
+</span><span class="identifier">static_cast_</span><span class="special"><</span><span class="keyword">int</span><span class="special">*>(</span><span class="identifier">arg1</span><span class="special">)</span> <span class="comment">// static_cast's arg1 to an int*
+</span></pre>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ Take note that, by convention, names that conflict with C++ reserved
+ words are appended with a single trailing underscore <code class="computeroutput"><span class="char">'_'</span></code>
+ </p></td></tr>
+</table></div>
+<div class="sidebar">
+<p class="title"><b></b></p>
+<p>
+ <span class="inlinemediaobject"><img src="../../../images/tip.png" alt="tip"></span> Learn more about this <a class="link" href="../../reference/modules/object.html" title="Object">here.</a>
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2002-2005, 2010 Joel de Guzman, Dan Marsden, Thomas Heller<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="lazy_statements.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../composites.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="lazy_functions.html"><img src="../../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/composites/lazy_functions.html
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/composites/lazy_functions.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -0,0 +1,105 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Lazy Functions</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="../../../index.html" title="Chapter 1. Phoenix 3.0">
+<link rel="up" href="../composites.html" title="Composites">
+<link rel="prev" href="construct__new__delete__casts.html" title="Construct, New, Delete, Casts">
+<link rel="next" href="more.html" title="More">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="construct__new__delete__casts.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../composites.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="more.html"><img src="../../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="phoenix.starter_kit.composites.lazy_functions"></a><a class="link" href="lazy_functions.html" title="Lazy Functions">Lazy
+ Functions</a>
+</h4></div></div></div>
+<p>
+ As you write more lambda functions, you'll notice certain patterns that
+ you wish to refactor as reusable functions. When you reach that point,
+ you'll wish that ordinary functions can co-exist with phoenix functions.
+ Unfortunately, the <span class="emphasis"><em>immediate</em></span> nature of plain C++ functions
+ make them incompatible.
+ </p>
+<p>
+ Lazy functions are your friends. The library provides a facility to make
+ lazy functions. The code below is a rewrite of the <code class="computeroutput"><span class="identifier">is_odd</span></code>
+ function using the facility:
+ </p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">is_odd_impl</span>
+<span class="special">{</span>
+ <span class="keyword">typedef</span> <span class="keyword">bool</span> <span class="identifier">result_type</span><span class="special">;</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Arg</span><span class="special">></span>
+ <span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">()(</span><span class="identifier">Arg</span> <span class="identifier">arg1</span><span class="special">)</span> <span class="keyword">const</span>
+ <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">arg1</span> <span class="special">%</span> <span class="number">2</span> <span class="special">==</span> <span class="number">1</span><span class="special">;</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+
+<span class="identifier">function</span><span class="special"><</span><span class="identifier">is_odd_impl</span><span class="special">></span> <span class="identifier">is_odd</span><span class="special">;</span>
+</pre>
+<a name="phoenix.starter_kit.composites.lazy_functions.things_to_note_"></a><h6>
+<a name="id675750"></a>
+ <a class="link" href="lazy_functions.html#phoenix.starter_kit.composites.lazy_functions.things_to_note_">Things
+ to note:</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ Result type deduction is implemented with the help of the result_of
+ protocol. For more information see <a href="http://www.boost.org/doc/libs/1_43_0/libs/utility/utility.htm#result_of" target="_top">Boost.Result
+ Of</a>
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">is_odd_impl</span></code> implements
+ the function.
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">is_odd</span></code>, an instance
+ of <code class="computeroutput"><span class="identifier">function</span><span class="special"><</span><span class="identifier">is_odd_impl</span><span class="special">></span></code>,
+ is the lazy function.
+ </li>
+</ul></div>
+<p>
+ Now, <code class="computeroutput"><span class="identifier">is_odd</span></code> is a truly
+ lazy function that we can use in conjunction with the rest of phoenix.
+ Example:
+ </p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">find_if</span><span class="special">(</span><span class="identifier">c</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">c</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">is_odd</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">));</span>
+</pre>
+<p>
+ (See function.cpp)
+ </p>
+<a name="phoenix.starter_kit.composites.lazy_functions.predefined_lazy_functions"></a><h6>
+<a name="id675929"></a>
+ <a class="link" href="lazy_functions.html#phoenix.starter_kit.composites.lazy_functions.predefined_lazy_functions">Predefined
+ Lazy Functions</a>
+ </h6>
+<p>
+ The library is chock full of STL savvy, predefined lazy functions covering
+ the whole of the STL containers, iterators and algorithms. For example,
+ there are lazy versions of container related operations such as assign,
+ at, back, begin, pop_back, pop_front, push_back, push_front, etc. (See
+ <a class="link" href="../../reference/modules/stl.html" title="STL">STL</a>).
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2002-2005, 2010 Joel de Guzman, Dan Marsden, Thomas Heller<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="construct__new__delete__casts.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../composites.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="more.html"><img src="../../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/composites/lazy_operators.html
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/composites/lazy_operators.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -0,0 +1,136 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Lazy Operators</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="../../../index.html" title="Chapter 1. Phoenix 3.0">
+<link rel="up" href="../composites.html" title="Composites">
+<link rel="prev" href="../composites.html" title="Composites">
+<link rel="next" href="lazy_statements.html" title="Lazy Statements">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../composites.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../composites.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="lazy_statements.html"><img src="../../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="phoenix.starter_kit.composites.lazy_operators"></a><a class="link" href="lazy_operators.html" title="Lazy Operators">Lazy
+ Operators</a>
+</h4></div></div></div>
+<p>
+ You can use the usual set of operators to form composites. Examples:
+ </p>
+<pre class="programlisting"><span class="identifier">arg1</span> <span class="special">*</span> <span class="identifier">arg1</span>
+<span class="identifier">ref</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span> <span class="special">=</span> <span class="identifier">arg1</span> <span class="special">+</span> <span class="identifier">ref</span><span class="special">(</span><span class="identifier">z</span><span class="special">)</span>
+<span class="identifier">arg1</span> <span class="special">=</span> <span class="identifier">arg2</span> <span class="special">+</span> <span class="special">(</span><span class="number">3</span> <span class="special">*</span> <span class="identifier">arg3</span><span class="special">)</span>
+<span class="identifier">ref</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span> <span class="special">=</span> <span class="identifier">arg1</span><span class="special">[</span><span class="identifier">arg2</span><span class="special">]</span> <span class="comment">// assuming arg1 is indexable and arg2 is a valid index
+</span></pre>
+<p>
+ Note the expression: <code class="computeroutput"><span class="number">3</span> <span class="special">*</span>
+ <span class="identifier">arg3</span></code>. This expression is actually
+ a short-hand equivalent to: <code class="computeroutput"><span class="identifier">val</span><span class="special">(</span><span class="number">3</span><span class="special">)</span>
+ <span class="special">*</span> <span class="identifier">arg3</span></code>.
+ In most cases, like above, you can get away with it. But in some cases,
+ you will have to explicitly wrap your values in <code class="computeroutput"><span class="identifier">val</span></code>.
+ Rules of thumb:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ In a binary expression (e.g. <code class="computeroutput"><span class="number">3</span>
+ <span class="special">*</span> <span class="identifier">arg3</span></code>),
+ at least one of the operands must be a phoenix primitive or composite.
+ </li>
+<li class="listitem">
+ In a unary expression (e.g. <code class="computeroutput"><span class="identifier">arg1</span><span class="special">++</span></code>), the single operand must be a phoenix
+ primitive or composite.
+ </li>
+</ul></div>
+<p>
+ If these basic rules are not followed, the result is either an error, or
+ is immediately evaluated. Some examples:
+ </p>
+<pre class="programlisting"><span class="identifier">ref</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span> <span class="special">=</span> <span class="number">123</span> <span class="comment">// lazy
+</span><span class="identifier">x</span> <span class="special">=</span> <span class="number">123</span> <span class="comment">// immediate
+</span>
+<span class="identifier">ref</span><span class="special">(</span><span class="identifier">x</span><span class="special">)[</span><span class="number">0</span><span class="special">]</span> <span class="comment">// lazy
+</span><span class="identifier">x</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="comment">// immediate
+</span>
+<span class="identifier">ref</span><span class="special">(</span><span class="identifier">x</span><span class="special">)[</span><span class="identifier">ref</span><span class="special">(</span><span class="identifier">i</span><span class="special">)]</span> <span class="comment">// lazy
+</span><span class="identifier">ref</span><span class="special">(</span><span class="identifier">x</span><span class="special">)[</span><span class="identifier">i</span><span class="special">]</span> <span class="comment">// lazy (equivalent to ref(x)[val(i)])
+</span><span class="identifier">x</span><span class="special">[</span><span class="identifier">ref</span><span class="special">(</span><span class="identifier">i</span><span class="special">)]</span> <span class="comment">// illegal (x is not a phoenix primitive or composite)
+</span><span class="identifier">ref</span><span class="special">(</span><span class="identifier">x</span><span class="special">[</span><span class="identifier">ref</span><span class="special">(</span><span class="identifier">i</span><span class="special">)])</span> <span class="comment">// illegal (x is not a phoenix primitive or composite)
+</span></pre>
+<div class="sidebar">
+<p class="title"><b></b></p>
+<p>
+ <span class="inlinemediaobject"><img src="../../../images/tip.png" alt="tip"></span> Learn more about operators <a class="link" href="../../reference/modules/operator.html" title="Operator">here.</a>
+ </p>
+</div>
+<a name="phoenix.starter_kit.composites.lazy_operators.first_practical_example"></a><h6>
+<a name="id674672"></a>
+ <a class="link" href="lazy_operators.html#phoenix.starter_kit.composites.lazy_operators.first_practical_example">First
+ Practical Example</a>
+ </h6>
+<p>
+ We've covered enough ground to present a real world example. We want to
+ find the first odd number in an STL container. Normally we use a functor
+ (function object) or a function pointer and pass that in to STL's <code class="computeroutput"><span class="identifier">find_if</span></code> generic function:
+ </p>
+<p>
+ Write a function:
+ </p>
+<pre class="programlisting"><span class="keyword">bool</span>
+<span class="identifier">is_odd</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">arg1</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">arg1</span> <span class="special">%</span> <span class="number">2</span> <span class="special">==</span> <span class="number">1</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ Pass a pointer to the function to STL's <code class="computeroutput"><span class="identifier">find_if</span></code>
+ algorithm:
+ </p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">find_if</span><span class="special">(</span><span class="identifier">c</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">c</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="special">&</span><span class="identifier">is_odd</span><span class="special">)</span>
+</pre>
+<p>
+ Using Phoenix, the same can be achieved directly with a one-liner:
+ </p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">find_if</span><span class="special">(</span><span class="identifier">c</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">c</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">arg1</span> <span class="special">%</span> <span class="number">2</span> <span class="special">==</span> <span class="number">1</span><span class="special">)</span>
+</pre>
+<p>
+ The expression <code class="computeroutput"><span class="identifier">arg1</span> <span class="special">%</span>
+ <span class="number">2</span> <span class="special">==</span> <span class="number">1</span></code> automagically creates a functor with the
+ expected behavior. In FP, this unnamed function is called a lambda function.
+ Unlike the function pointer version, which is monomorphic (expects and
+ works only with a fixed type int argument), the Phoenix version is fully
+ polymorphic and works with any container (of ints, of longs, of bignum,
+ etc.) as long as its elements can handle the <code class="computeroutput"><span class="identifier">arg1</span>
+ <span class="special">%</span> <span class="number">2</span> <span class="special">==</span> <span class="number">1</span></code> expression.
+ </p>
+<p>
+ (See find_if.cpp)
+ </p>
+<div class="sidebar">
+<p class="title"><b></b></p>
+<p>
+ <span class="inlinemediaobject"><img src="../../../images/tip.png" alt="tip"></span> ...<span class="bold"><strong>That's it, we're done</strong></span>.
+ Well if you wish to know a little bit more, read on...
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2002-2005, 2010 Joel de Guzman, Dan Marsden, Thomas Heller<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../composites.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../composites.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="lazy_statements.html"><img src="../../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/composites/lazy_statements.html
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/composites/lazy_statements.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -0,0 +1,66 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Lazy Statements</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="../../../index.html" title="Chapter 1. Phoenix 3.0">
+<link rel="up" href="../composites.html" title="Composites">
+<link rel="prev" href="lazy_operators.html" title="Lazy Operators">
+<link rel="next" href="construct__new__delete__casts.html" title="Construct, New, Delete, Casts">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="lazy_operators.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../composites.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="construct__new__delete__casts.html"><img src="../../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="phoenix.starter_kit.composites.lazy_statements"></a><a class="link" href="lazy_statements.html" title="Lazy Statements">Lazy
+ Statements</a>
+</h4></div></div></div>
+<p>
+ Lazy statements? Sure. There are lazy versions of the C++ statements we
+ all know and love. For example:
+ </p>
+<pre class="programlisting"><span class="identifier">if_</span><span class="special">(</span><span class="identifier">arg1</span> <span class="special">></span> <span class="number">5</span><span class="special">)</span>
+<span class="special">[</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">arg1</span>
+<span class="special">]</span>
+</pre>
+<p>
+ Say, for example, we wish to print all the elements that are greater than
+ 5 (separated by a comma) in a vector. Here's how we write it:
+ </p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span><span class="special">(</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">v</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span>
+ <span class="identifier">if_</span><span class="special">(</span><span class="identifier">arg1</span> <span class="special">></span> <span class="number">5</span><span class="special">)</span>
+ <span class="special">[</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">arg1</span> <span class="special"><<</span> <span class="string">", "</span>
+ <span class="special">]</span>
+<span class="special">);</span>
+</pre>
+<p>
+ (See if.cpp)
+ </p>
+<div class="sidebar">
+<p class="title"><b></b></p>
+<p>
+ <span class="inlinemediaobject"><img src="../../../images/tip.png" alt="tip"></span> Learn more about statements <a class="link" href="../../reference/modules/statement.html" title="Statement">here.</a>
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2002-2005, 2010 Joel de Guzman, Dan Marsden, Thomas Heller<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="lazy_operators.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../composites.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="construct__new__delete__casts.html"><img src="../../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/composites/more.html
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/composites/more.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -0,0 +1,51 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>More</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="../../../index.html" title="Chapter 1. Phoenix 3.0">
+<link rel="up" href="../composites.html" title="Composites">
+<link rel="prev" href="lazy_functions.html" title="Lazy Functions">
+<link rel="next" href="../../advanced_topics.html" title="Advanced Topics">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="lazy_functions.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../composites.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../advanced_topics.html"><img src="../../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="phoenix.starter_kit.composites.more"></a><a class="link" href="more.html" title="More">More</a>
+</h4></div></div></div>
+<p>
+ As mentioned earlier, this chapter is not a thorough discourse of the library.
+ It is meant only to cover enough ground to get you into high gear as quickly
+ as possible. Some advanced stuff is not discussed here (e.g. <a class="link" href="../../reference/modules/scope.html" title="Scope">Scopes</a>);
+ nor are features that provide alternative (short-hand) ways to do the same
+ things (e.g. <a class="link" href="../../reference/modules/bind.html" title="Bind">Bind</a>
+ vs. <a class="link" href="../../reference/modules/function.html" title="Function">Lazy Functions</a>).
+ </p>
+<div class="sidebar">
+<p class="title"><b></b></p>
+<p>
+ <span class="inlinemediaobject"><img src="../../../images/tip.png" alt="tip"></span> ...<span class="bold"><strong>If you still wish to learn
+ more, the read on...</strong></span>
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2002-2005, 2010 Joel de Guzman, Dan Marsden, Thomas Heller<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="lazy_functions.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../composites.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../../advanced_topics.html"><img src="../../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/lazy_functions.html
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/lazy_functions.html (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/lazy_functions.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -45,7 +45,7 @@
<span class="identifier">function</span><span class="special"><</span><span class="identifier">is_odd_impl</span><span class="special">></span> <span class="identifier">is_odd</span><span class="special">;</span>
</pre>
<a name="phoenix.starter_kit.lazy_functions.things_to_note_"></a><h3>
-<a name="id814857"></a>
+<a name="id821169"></a>
<a class="link" href="lazy_functions.html#phoenix.starter_kit.lazy_functions.things_to_note_">Things
to note:</a>
</h3>
@@ -75,7 +75,7 @@
(See function.cpp)
</p>
<a name="phoenix.starter_kit.lazy_functions.predefined_lazy_functions"></a><h3>
-<a name="id815026"></a>
+<a name="id821338"></a>
<a class="link" href="lazy_functions.html#phoenix.starter_kit.lazy_functions.predefined_lazy_functions">Predefined
Lazy Functions</a>
</h3>
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/lazy_operators.html
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/lazy_operators.html (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/lazy_operators.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -69,7 +69,7 @@
</p>
</div>
<a name="phoenix.starter_kit.lazy_operators.first_practical_example"></a><h3>
-<a name="id813819"></a>
+<a name="id820131"></a>
<a class="link" href="lazy_operators.html#phoenix.starter_kit.lazy_operators.first_practical_example">First
Practical Example</a>
</h3>
Added: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/primitives.html
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/primitives.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -0,0 +1,46 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Primitives</title>
+<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="../../index.html" title="Chapter 1. Phoenix 3.0">
+<link rel="up" href="../starter_kit.html" title="Starter Kit">
+<link rel="prev" href="../starter_kit.html" title="Starter Kit">
+<link rel="next" href="primitives/values.html" title="Values">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../starter_kit.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../starter_kit.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="primitives/values.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="phoenix.starter_kit.primitives"></a><a class="link" href="primitives.html" title="Primitives">Primitives</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Values</span></dt>
+<dt><span class="section">References</span></dt>
+<dt><span class="section">Arguments</span></dt>
+</dl></div>
+<p>
+ We start with some core functions that are called <span class="bold"><strong>primitives</strong></span>.
+ You can think of primitives (such as values, references and arguments) as
+ atoms.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2002-2005, 2010 Joel de Guzman, Dan Marsden, Thomas Heller<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../starter_kit.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../starter_kit.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="primitives/values.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/primitives/arguments.html
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/primitives/arguments.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -0,0 +1,68 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Arguments</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="../../../index.html" title="Chapter 1. Phoenix 3.0">
+<link rel="up" href="../primitives.html" title="Primitives">
+<link rel="prev" href="references.html" title="References">
+<link rel="next" href="../composites.html" title="Composites">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="references.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitives.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../composites.html"><img src="../../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="phoenix.starter_kit.primitives.arguments"></a><a class="link" href="arguments.html" title="Arguments">Arguments</a>
+</h4></div></div></div>
+<p>
+ Arguments are also functions? You bet!
+ </p>
+<p>
+ Until now, we have been dealing with expressions returning a nullary function.
+ Arguments, on the other hand, evaluate to an N-ary function. An argument
+ represents the Nth argument. There are a few predefined arguments arg1,
+ arg2, arg3, arg4 and so on (and it's BLL
+ counterparts: _1, _2, _3, _4 and so on). Examples:
+ </p>
+<pre class="programlisting"><span class="identifier">arg1</span> <span class="comment">// one-or-more argument function that returns its first argument
+</span><span class="identifier">arg2</span> <span class="comment">// two-or-more argument function that returns its second argument
+</span><span class="identifier">arg3</span> <span class="comment">// three-or-more argument function that returns its third argument
+</span></pre>
+<p>
+ <code class="computeroutput"><span class="identifier">argN</span></code> returns the Nth argument.
+ Examples:
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">3</span><span class="special">;</span>
+<span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">s</span> <span class="special">=</span> <span class="string">"Hello World"</span><span class="special">;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">arg1</span><span class="special">(</span><span class="identifier">i</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="comment">// prints 3
+</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">arg2</span><span class="special">(</span><span class="identifier">i</span><span class="special">,</span> <span class="identifier">s</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="comment">// prints "Hello World"
+</span></pre>
+<p>
+ (See arguments.cpp)
+ </p>
+<div class="sidebar">
+<p class="title"><b></b></p>
+<p>
+ <span class="inlinemediaobject"><img src="../../../images/tip.png" alt="tip"></span> Learn more about arguments <a class="link" href="../../reference/modules/core/arguments.html" title="Arguments">here.</a>
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2002-2005, 2010 Joel de Guzman, Dan Marsden, Thomas Heller<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="references.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitives.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="../composites.html"><img src="../../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/primitives/references.html
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/primitives/references.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -0,0 +1,66 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>References</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="../../../index.html" title="Chapter 1. Phoenix 3.0">
+<link rel="up" href="../primitives.html" title="Primitives">
+<link rel="prev" href="values.html" title="Values">
+<link rel="next" href="arguments.html" title="Arguments">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="values.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitives.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="arguments.html"><img src="../../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="phoenix.starter_kit.primitives.references"></a><a class="link" href="references.html" title="References">References</a>
+</h4></div></div></div>
+<p>
+ References are functions. They hold a reference to a value stored somewhere.
+ For example, given:
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">3</span><span class="special">;</span>
+<span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">s</span> <span class="special">=</span> <span class="string">"Hello World"</span><span class="special">;</span>
+</pre>
+<p>
+ we create <code class="computeroutput"><span class="identifier">references</span></code> to
+ <code class="computeroutput"><span class="identifier">i</span></code> and <code class="computeroutput"><span class="identifier">s</span></code>
+ this way:
+ </p>
+<pre class="programlisting"><span class="identifier">ref</span><span class="special">(</span><span class="identifier">i</span><span class="special">)</span>
+<span class="identifier">ref</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span>
+</pre>
+<p>
+ Like <code class="computeroutput"><span class="identifier">val</span></code>, the expressions
+ above evaluates to a nullary function; the first one returning an <code class="computeroutput"><span class="keyword">int</span><span class="special">&</span></code>,
+ and the second one returning a <code class="computeroutput"><span class="keyword">char</span>
+ <span class="keyword">const</span><span class="special">*&</span></code>.
+ </p>
+<p>
+ (See references.cpp)
+ </p>
+<div class="sidebar">
+<p class="title"><b></b></p>
+<p>
+ <span class="inlinemediaobject"><img src="../../../images/tip.png" alt="tip"></span> Learn more about references <a class="link" href="../../reference/modules/core/references.html" title="References">here.</a>
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2002-2005, 2010 Joel de Guzman, Dan Marsden, Thomas Heller<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="values.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitives.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="arguments.html"><img src="../../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/primitives/values.html
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/primitives/values.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -0,0 +1,110 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Values</title>
+<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
+<link rel="home" href="../../../index.html" title="Chapter 1. Phoenix 3.0">
+<link rel="up" href="../primitives.html" title="Primitives">
+<link rel="prev" href="../primitives.html" title="Primitives">
+<link rel="next" href="references.html" title="References">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../primitives.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitives.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="references.html"><img src="../../../images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="phoenix.starter_kit.primitives.values"></a><a class="link" href="values.html" title="Values">Values</a>
+</h4></div></div></div>
+<p>
+ Values are functions! Examples:
+ </p>
+<pre class="programlisting"><span class="identifier">val</span><span class="special">(</span><span class="number">3</span><span class="special">)</span>
+<span class="identifier">val</span><span class="special">(</span><span class="string">"Hello, World"</span><span class="special">)</span>
+</pre>
+<p>
+ The first evaluates to a nullary function (a function taking no arguments)
+ that returns an <code class="computeroutput"><span class="keyword">int</span></code>, <code class="computeroutput"><span class="number">3</span></code>. The second evaluates to a nullary function
+ that returns a <code class="computeroutput"><span class="keyword">char</span> <span class="keyword">const</span><span class="special">(&)[</span><span class="number">13</span><span class="special">]</span></code>, <code class="computeroutput"><span class="string">"Hello,
+ World"</span></code>.
+ </p>
+<a name="phoenix.starter_kit.primitives.values.lazy_evaluation"></a><h6>
+<a name="id673084"></a>
+ <a class="link" href="values.html#phoenix.starter_kit.primitives.values.lazy_evaluation">Lazy
+ Evaluation</a>
+ </h6>
+<p>
+ Confused? <code class="computeroutput"><span class="identifier">val</span><span class="special">(</span><span class="number">3</span><span class="special">)</span></code> is a unary
+ function, you say? Yes it is. However, read carefully: <span class="emphasis"><em>"evaluates
+ to a nullary function"</em></span>. <code class="computeroutput"><span class="identifier">val</span><span class="special">(</span><span class="number">3</span><span class="special">)</span></code>
+ evaluates to (returns) a nullary function. Aha! <code class="computeroutput"><span class="identifier">val</span><span class="special">(</span><span class="number">3</span><span class="special">)</span></code>
+ returns a function! So, since <code class="computeroutput"><span class="identifier">val</span><span class="special">(</span><span class="number">3</span><span class="special">)</span></code>
+ returns a function, you can invoke it. Example:
+ </p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">val</span><span class="special">(</span><span class="number">3</span><span class="special">)()</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+</pre>
+<p>
+ (See values.cpp)
+ </p>
+<div class="sidebar">
+<p class="title"><b></b></p>
+<p>
+ <span class="inlinemediaobject"><img src="../../../images/tip.png" alt="tip"></span> Learn more about values <a class="link" href="../../reference/modules/core/values.html" title="Values">here.</a>
+ </p>
+</div>
+<p>
+ The second function call (the one with no arguments) calls the nullary
+ function which then returns <code class="computeroutput"><span class="number">3</span></code>.
+ The need for a second function call is the reason why the function is said
+ to be <span class="bold"><strong><span class="emphasis"><em>Lazily Evaluated</em></span></strong></span>.
+ The first call doesn't do anything. You need a second call to finally evaluate
+ the thing. The first call lazily evaluates the function; i.e. doesn't do
+ anything and defers the evaluation for later.
+ </p>
+<a name="phoenix.starter_kit.primitives.values.callbacks"></a><h6>
+<a name="id673309"></a>
+ <a class="link" href="values.html#phoenix.starter_kit.primitives.values.callbacks">Callbacks</a>
+ </h6>
+<p>
+ It may not be immediately apparent how lazy evaluation can be useful by
+ just looking at the example above. Putting the first and second function
+ call in a single line is really not very useful. However, thinking of
+ <code class="computeroutput"><span class="identifier">val</span><span class="special">(</span><span class="number">3</span><span class="special">)</span></code> as a callback
+ function (and in most cases they are actually used that way), will make
+ it clear. Example:
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">F</span><span class="special">></span>
+<span class="keyword">void</span> <span class="identifier">print</span><span class="special">(</span><span class="identifier">F</span> <span class="identifier">f</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">f</span><span class="special">()</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+
+<span class="keyword">int</span>
+<span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">print</span><span class="special">(</span><span class="identifier">val</span><span class="special">(</span><span class="number">3</span><span class="special">));</span>
+ <span class="identifier">print</span><span class="special">(</span><span class="identifier">val</span><span class="special">(</span><span class="string">"Hello World"</span><span class="special">));</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ (See callback.cpp)
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2002-2005, 2010 Joel de Guzman, Dan Marsden, Thomas Heller<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../primitives.html"><img src="../../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitives.html"><img src="../../../images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../images/home.png" alt="Home"></a><a accesskey="n" href="references.html"><img src="../../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/references.html
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/references.html (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/references.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -41,12 +41,12 @@
<span class="keyword">const</span><span class="special">*&</span></code>.
</p>
<p>
- (See references.cpp)
+ (See references.cpp)
</p>
<div class="sidebar">
<p class="title"><b></b></p>
<p>
- <span class="inlinemediaobject"><img src="../../images/tip.png" alt="tip"></span> Learn more about references
+ <span class="inlinemediaobject"><img src="../../images/tip.png" alt="tip"></span> Learn more about references <a class="link" href="../reference/modules/core/references.html" title="References">here.</a>
</p>
</div>
</div>
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/values.html
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/values.html (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/starter_kit/values.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -32,7 +32,7 @@
World"</span></code>.
</p>
<a name="phoenix.starter_kit.values.lazy_evaluation"></a><h3>
-<a name="id812294"></a>
+<a name="id818540"></a>
<a class="link" href="values.html#phoenix.starter_kit.values.lazy_evaluation">Lazy Evaluation</a>
</h3>
<p>
@@ -43,15 +43,15 @@
returns a function! So, since <code class="computeroutput"><span class="identifier">val</span><span class="special">(</span><span class="number">3</span><span class="special">)</span></code>
returns a function, you can invoke it. Example:
</p>
-<pre class="programlisting"><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">val</span><span class="special">(</span><span class="number">3</span><span class="special">)()</span> <span class="special"><<</span> <span class="identifier">endl</span><span class="special">;</span>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">val</span><span class="special">(</span><span class="number">3</span><span class="special">)()</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
</pre>
<p>
- (See values.cpp)
+ (See values.cpp)
</p>
<div class="sidebar">
<p class="title"><b></b></p>
<p>
- <span class="inlinemediaobject"><img src="../../images/tip.png" alt="tip"></span> Learn more about values
+ <span class="inlinemediaobject"><img src="../../images/tip.png" alt="tip"></span> Learn more about values <a class="link" href="../reference/modules/core/values.html" title="Values">here.</a>
</p>
</div>
<p>
@@ -64,7 +64,7 @@
anything and defers the evaluation for later.
</p>
<a name="phoenix.starter_kit.values.callbacks"></a><h3>
-<a name="id812497"></a>
+<a name="id818766"></a>
<a class="link" href="values.html#phoenix.starter_kit.values.callbacks">Callbacks</a>
</h3>
<p>
@@ -88,7 +88,7 @@
<span class="special">}</span>
</pre>
<p>
- (See callback.cpp)
+ (See callback.cpp)
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/wrap_up.html
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/wrap_up.html (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/phoenix/wrap_up.html 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -6,14 +6,14 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../index.html" title="Chapter 1. Phoenix 3.0">
<link rel="up" href="../index.html" title="Chapter 1. Phoenix 3.0">
-<link rel="prev" href="notes/porting_from_phoenix_2_0.html" title="Porting from Phoenix 2.0">
+<link rel="prev" href="reference/modules/stl/algorithm.html" title="Algorithm">
<link rel="next" href="acknowledgments.html" title="Acknowledgments">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="notes/porting_from_phoenix_2_0.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgments.html"><img src="../images/next.png" alt="Next"></a>
+<a accesskey="p" href="reference/modules/stl/algorithm.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgments.html"><img src="../images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
@@ -63,7 +63,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="notes/porting_from_phoenix_2_0.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgments.html"><img src="../images/next.png" alt="Next"></a>
+<a accesskey="p" href="reference/modules/stl/algorithm.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgments.html"><img src="../images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/quickbook_HTML.manifest
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/quickbook_HTML.manifest (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/html/quickbook_HTML.manifest 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -1,15 +1,16 @@
index.html
phoenix/introduction.html
phoenix/starter_kit.html
-phoenix/starter_kit/values.html
-phoenix/starter_kit/references.html
-phoenix/starter_kit/arguments.html
+phoenix/starter_kit/primitives.html
+phoenix/starter_kit/primitives/values.html
+phoenix/starter_kit/primitives/references.html
+phoenix/starter_kit/primitives/arguments.html
phoenix/starter_kit/composites.html
-phoenix/starter_kit/lazy_operators.html
-phoenix/starter_kit/lazy_statements.html
-phoenix/starter_kit/construct__new__delete__casts.html
-phoenix/starter_kit/lazy_functions.html
-phoenix/starter_kit/more.html
+phoenix/starter_kit/composites/lazy_operators.html
+phoenix/starter_kit/composites/lazy_statements.html
+phoenix/starter_kit/composites/construct__new__delete__casts.html
+phoenix/starter_kit/composites/lazy_functions.html
+phoenix/starter_kit/composites/more.html
phoenix/advanced_topics.html
phoenix/advanced_topics/porting_from_phoenix_2_0.html
phoenix/advanced_topics/extending_actors.html
@@ -57,8 +58,6 @@
phoenix/reference/modules/stl.html
phoenix/reference/modules/stl/container.html
phoenix/reference/modules/stl/algorithm.html
-phoenix/notes.html
-phoenix/notes/porting_from_phoenix_2_0.html
phoenix/wrap_up.html
phoenix/acknowledgments.html
phoenix/references.html
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/phoenix3.qbk
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/phoenix3.qbk (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/phoenix3.qbk 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -47,7 +47,7 @@
[/include actors.qbk]
[/include advanced.qbk]
-[include notes.qbk]
+[/include notes.qbk]
[include wrap_up.qbk]
[include acknowledgment.qbk]
[include references.qbk]
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/reference/basics.qbk
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/reference/basics.qbk (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/reference/basics.qbk 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -21,7 +21,7 @@
[note Amusingly, functions may even return functions. We shall see
what this means in a short while.]
-[h2 Partial Function Application]
+[heading Partial Function Application]
Think of a function as a black box. You pass arguments and it returns something
back. The figure below depicts the typical scenario.
@@ -62,24 +62,26 @@
And even more, with Phoenix, these resulting functions won't be black boxes
anymore.
-[h2 STL and higher order functions]
+[heading STL and higher order functions]
So, what's all the fuss? What makes partial function application so useful?
-Recall our original example in the [link phoenix.starter_kit.lazy_operators previous section]:
+Recall our original example in the [link phoenix.starter_kit.composites.lazy_operators
+previous section]:
- find_if(c.begin(), c.end(), arg1 % 2 == 1)
+ std::find_if(c.begin(), c.end(), arg1 % 2 == 1)
-The expression `arg1 % 2 == 1` evaluates to a lambda function. `arg1` is a placeholder
-for an argument to be supplied later. Hence, since there's only one unsupplied argument, the
-lambda function has an arity 1. It just so happens that `find_if` supplies the
-unsupplied argument as it loops from `c.begin()` to `c.end()`.
+The expression `arg1 % 2 == 1` evaluates to a lambda function. `arg1` is a
+placeholder for an argument to be supplied later. Hence, since there's only one
+unsupplied argument, the lambda function has an arity 1. It just so happens that
+`find_if` supplies the unsupplied argument as it loops from `c.begin()` to
+`c.end()`.
[note Higher order functions are functions which can take other
functions as arguments, and may also return functions as results. Higher order
-functions are functions that are treated like any other objects and can be used as
-arguments and return values from functions.]
+functions are functions that are treated like any other objects and can be used
+as arguments and return values from functions.]
-[h2 Lazy Evaluation]
+[heading Lazy Evaluation]
In Phoenix, to put it more accurately, function evaluation has two stages:
@@ -119,11 +121,11 @@
int x = 1;
int y = 2;
- cout << (arg1 % 2 == 1)(x) << endl; // prints 1 or true
- cout << (arg1 % 2 == 1)(y) << endl; // prints 0 or false
+ std::cout << (arg1 % 2 == 1)(x) << std::endl; // prints 1 or true
+ std::cout << (arg1 % 2 == 1)(y) << std::endl; // prints 0 or false
-[h2 Forwarding Function Problem]
+[heading Forwarding Function Problem]
Usually, we, as clients, write the call-back functions while libraries (such as
STL) provide the callee (e.g. `find_if`). In case the role is reversed, e.g.
@@ -137,14 +139,15 @@
Notice that, in the second-stage (the final evaluation), we used a variable `x`.
-In Phoenix we emulated perfect forwarding through Preprocessor Macros generating
+In Phoenix we emulated perfect forwarding through preprocessor macros generating
code to allow const and non-const references.
We generate these second-stage overloads for Phoenix expression up to
`PHOENIX_PERFECT_FORWARD_LIMIT`
-[note You can set `PHOENIX_PERFECT_FORWARD_LIMIT`, the predefined maximum perfect forward arguments an
-actor can take. By default, `PHOENIX_PERFECT_FORWARDLIMIT` is set to 3.]
+[note You can set `PHOENIX_PERFECT_FORWARD_LIMIT`, the predefined maximum perfect
+forward arguments an actor can take. By default, `PHOENIX_PERFECT_FORWARDLIMIT`
+is set to 3.]
[/
@@ -157,7 +160,7 @@
prohibits code like above.
]
-[h2 Polymorphic Functions]
+[heading Polymorphic Functions]
Unless otherwise noted, Phoenix generated functions are fully polymorphic. For
instance, the `add` example above can apply to integers, floating points, user
@@ -168,8 +171,8 @@
std::string r = add(arg1, arg2)(h, w);
evaluates to `std::string("Hello World")`. The observant reader might notice
-that this function call in fact takes in heterogeneous arguments where `arg1` is
-of type `std::string` and `arg2` is of type `char const*`. `add` still works
+that this function call in fact takes in heterogeneous arguments where `arg1`
+is of type `std::string` and `arg2` is of type `char const*`. `add` still works
because the C++ standard library allows the expression `a + b` where `a` is a
`std::string` and `b` is a `char const*`.
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/reference/organisation.qbk
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/reference/organisation.qbk (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/reference/organisation.qbk 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -29,7 +29,7 @@
The lowest two layers comprise the core.
-The `Actor` is the main concept behind the library. Lazy functions are
+The [link phoenix.reference.concepts.actor `Actor`] is the main concept behind the library. Lazy functions are
abstracted as actors. There are only 2
kinds of actors:
@@ -53,9 +53,9 @@
`new_`, `delete_`)]]
[[Scope] [Support for scopes, local variables and lambda-lambda]]
[[Bind] [Lazy functions from free functions, member functions or member variables.]]
- [[Container] [Set of predefined "lazy" functions that work on STL
+ [[STL Container] [Set of predefined "lazy" functions that work on STL
containers and sequences (e.g. `push_back`).]]
- [[Algorithm] [Set of predefined "lazy" versions of the STL algorithms
+ [[STL Algorithm] [Set of predefined "lazy" versions of the STL algorithms
(e.g. `find_if`).]]
]
@@ -71,8 +71,8 @@
[[Object] [`#include <boost/phoenix/object.hpp>`]]
[[Scope] [`#include <boost/phoenix/scope.hpp>`]]
[[Bind] [`#include <boost/phoenix/bind.hpp>`]]
- [[Container] [`#include <boost/phoenix/container.hpp>`]]
- [[Algorithm] [`#include <boost/phoenix/algorithm.hpp>`]]
+ [[Container] [`#include <boost/phoenix/stl/container.hpp>`]]
+ [[Algorithm] [`#include <boost/phoenix/stl/algorithm.hpp>`]]
]
[blurb __tip__ Finer grained include files are available per feature; see the
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit.qbk
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit.qbk (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit.qbk 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -19,14 +19,14 @@
it. For now, all you need to do is to get up to speed as quickly as possible and
start using the library. If this is the case, this is the right place to start.
-This chapter is by no means a thorough discourse of the library. For more
-information on Phoenix, please take some time to read the rest of the User's
-Guide. Yet, if you just want to use the library quickly, now, this chapter will
-probably suffice. Rather than taking you to the details of the library, we shall
-try to provide you with annotated exemplars instead. Hopefully, this will get
-you into high gear quickly.
+This section is by no means a thorough discourse of the library. For more
+information on Phoenix, please take some time to read the rest of the
+Documentation. Yet, if you just want to use the library quickly, now, this
+chapter will probably suffice. Rather than taking you to the details of the
+library, we shall try to provide you with annotated exemples instead.
+Hopefully, this will get you into high gear quickly.
-[h2 Functors everywhere]
+[heading Functors everywhere]
Phoenix is built on function objects (functors). The functor is the main
building block. We compose functors to build more complex functors... to build
@@ -35,14 +35,22 @@
[note Functors are so ubiquitous in Phoenix that, in the manual, the
words /"functor"/ and /"function"/ are used interchangeably.]
+[section Primitives]
+
+We start with some core functions that are called *primitives*. You can think of
+primitives (such as values, references and arguments) as atoms.
+
[include starter_kit/values.qbk]
[include starter_kit/references.qbk]
[include starter_kit/arguments.qbk]
+[endsect]
+[section Composites]
[include starter_kit/composites.qbk]
[include starter_kit/operator.qbk]
[include starter_kit/statement.qbk]
[include starter_kit/object.qbk]
[include starter_kit/function.qbk]
[include starter_kit/more.qbk]
+[endsect]
[endsect]
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/arguments.qbk
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/arguments.qbk (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/arguments.qbk 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -25,11 +25,11 @@
int i = 3;
char const* s = "Hello World";
- cout << arg1(i) << endl; // prints 3
- cout << arg2(i, s) << endl; // prints "Hello World"
+ std::cout << arg1(i) << std::endl; // prints 3
+ std::cout << arg2(i, s) << std::endl; // prints "Hello World"
-(See [@../../example/users_manual/arguments.cpp arguments.cpp])
+(See [@../../example/arguments.cpp arguments.cpp])
-[blurb __tip__ Learn more about arguments [/link phoenix.primitives.arguments here.]]
+[blurb __tip__ Learn more about arguments [link phoenix.reference.modules.core.arguments here.]]
[endsect]
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/composites.qbk
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/composites.qbk (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/composites.qbk 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -7,13 +7,10 @@
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
===============================================================================/]
-[section Composites]
-
-What we have seen so far, are what are called *primitives*. You can think of
-primitives (such as values, references and arguments) as atoms.
+[/section Composites]
Things start to get interesting when we start /composing/ primitives to form
*composites*. The composites can, in turn, be composed to form even more complex
composites.
-[endsect]
+[/endsect]
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/function.qbk
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/function.qbk (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/function.qbk 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -31,7 +31,7 @@
function<is_odd_impl> is_odd;
-[h2 Things to note:]
+[heading Things to note:]
[/
* `result` is a nested metafunction that reflects the return type of the
@@ -40,23 +40,24 @@
* There are as many Args in the `result` metafunction as in the actual
`operator()`.
]
-* Result type deduction is implemented with the help of the result_of protocol. For more information see __boost_result_of__
+* Result type deduction is implemented with the help of the result_of protocol.
+ For more information see __boost_result_of__
* `is_odd_impl` implements the function.
* `is_odd`, an instance of `function<is_odd_impl>`, is the lazy function.
Now, `is_odd` is a truly lazy function that we can use in conjunction with the
rest of phoenix. Example:
- find_if(c.begin(), c.end(), is_odd(arg1));
+ std::find_if(c.begin(), c.end(), is_odd(arg1));
-(See [@../../example/users_manual/function.cpp function.cpp])
+(See [@../../example/function.cpp function.cpp])
-[h2 Predefined Lazy Functions]
+[heading Predefined Lazy Functions]
The library is chock full of STL savvy, predefined lazy functions covering the
whole of the STL containers, iterators and algorithms. For example, there are lazy
versions of container related operations such as assign, at, back, begin,
-pop_back, pop_front, push_back, push_front, etc. (See [/link phoenix.container
-Container]).
+pop_back, pop_front, push_back, push_front, etc. (See [link phoenix.reference.modules.stl
+STL]).
[endsect]
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/more.qbk
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/more.qbk (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/more.qbk 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -11,9 +11,9 @@
As mentioned earlier, this chapter is not a thorough discourse of the library.
It is meant only to cover enough ground to get you into high gear as quickly as
-possible. Some advanced stuff is not discussed here (e.g. [/link phoenix.composite.scope
+possible. Some advanced stuff is not discussed here (e.g. [link phoenix.reference.modules.scope
Scopes]); nor are features that provide alternative (short-hand) ways to do the
-same things (e.g. [/link phoenix.composite.bind Bind] vs. Lazy Functions).
+same things (e.g. [link phoenix.reference.modules.bind Bind] vs. [link phoenix.reference.modules.function Lazy Functions]).
[blurb __tip__ ...*If you still wish to learn more, the read on...*]
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/object.qbk
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/object.qbk (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/object.qbk 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -20,7 +20,7 @@
[note Take note that, by convention, names that conflict with C++
reserved words are appended with a single trailing underscore `'_'`]
-[blurb __tip__ Learn more about this [/link phoenix.composite.object here.]]
+[blurb __tip__ Learn more about this [link phoenix.reference.modules.object here.]]
[endsect]
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/operator.qbk
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/operator.qbk (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/operator.qbk 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -40,9 +40,9 @@
x[ref(i)] // illegal (x is not a phoenix primitive or composite)
ref(x[ref(i)]) // illegal (x is not a phoenix primitive or composite)
-[blurb __tip__ Learn more about operators [/link phoenix.composite.operator here.]]
+[blurb __tip__ Learn more about operators [link phoenix.reference.modules.operator here.]]
-[h2 First Practical Example]
+[heading First Practical Example]
We've covered enough ground to present a real world example. We want to find the
first odd number in an STL container. Normally we use a functor (function
@@ -59,11 +59,11 @@
Pass a pointer to the function to STL's `find_if` algorithm:
- find_if(c.begin(), c.end(), &is_odd)
+ std::find_if(c.begin(), c.end(), &is_odd)
Using Phoenix, the same can be achieved directly with a one-liner:
- find_if(c.begin(), c.end(), arg1 % 2 == 1)
+ std::find_if(c.begin(), c.end(), arg1 % 2 == 1)
The expression `arg1 % 2 == 1` automagically creates a functor with the expected
behavior. In FP, this unnamed function is called a lambda function. Unlike the
@@ -72,7 +72,7 @@
with any container (of ints, of longs, of bignum, etc.) as long as its elements
can handle the `arg1 % 2 == 1` expression.
-(See [@../../example/users_manual/find_if.cpp find_if.cpp])
+(See [@../../example/find_if.cpp find_if.cpp])
[blurb __tip__ ...[*That's it, we're done]. Well if you wish to know a little bit
more, read on...]
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/references.qbk
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/references.qbk (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/references.qbk 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -23,9 +23,9 @@
Like `val`, the expressions above evaluates to a nullary function; the first one
returning an `int&`, and the second one returning a `char const*&`.
-(See [@../../example/users_manual/references.cpp references.cpp])
+(See [@../../example/references.cpp references.cpp])
-[blurb __tip__ Learn more about references [/link phoenix.primitives.references here.]]
+[blurb __tip__ Learn more about references [link phoenix.reference.modules.core.references here.]]
[endsect]
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/statement.qbk
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/statement.qbk (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/statement.qbk 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -20,15 +20,15 @@
Say, for example, we wish to print all the elements that are greater than 5
(separated by a comma) in a vector. Here's how we write it:
- for_each(v.begin(), v.end(),
+ std::for_each(v.begin(), v.end(),
if_(arg1 > 5)
[
std::cout << arg1 << ", "
]
);
-(See [@../../example/users_manual/if.cpp if.cpp])
+(See [@../../example/if.cpp if.cpp])
-[blurb __tip__ Learn more about statements [/link phoenix.composite.statement here.]]
+[blurb __tip__ Learn more about statements [link phoenix.reference.modules.statement here.]]
[endsect]
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/values.qbk
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/values.qbk (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/doc/starter_kit/values.qbk 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -18,18 +18,18 @@
returns an `int`, `3`. The second evaluates to a nullary function that returns
a `char const(&)[13]`, `"Hello, World"`.
-[h2 Lazy Evaluation]
+[heading Lazy Evaluation]
Confused? `val(3)` is a unary function, you say? Yes it is. However, read
carefully: /"evaluates to a nullary function"/. `val(3)` evaluates to (returns) a
nullary function. Aha! `val(3)` returns a function! So, since `val(3)` returns a
function, you can invoke it. Example:
- cout << val(3)() << endl;
+ std::cout << val(3)() << std::endl;
-(See [@../../example/users_manual/values.cpp values.cpp])
+(See [@../../example/values.cpp values.cpp])
-[blurb __tip__ Learn more about values [/link phoenix.primitives.values here.]]
+[blurb __tip__ Learn more about values [link phoenix.reference.modules.core.values here.]]
The second function call (the one with no arguments) calls the nullary function
which then returns `3`. The need for a second function call is the reason why
@@ -38,7 +38,7 @@
lazily evaluates the function; i.e. doesn't do anything and defers the evaluation
for later.
-[h2 Callbacks]
+[heading Callbacks]
It may not be immediately apparent how lazy evaluation can be useful by just
looking at the example above. Putting the first and second function call in a
@@ -60,7 +60,7 @@
return 0;
}
-(See [@../../example/users_manual/callback.cpp callback.cpp])
+(See [@../../example/callback.cpp callback.cpp])
[endsect]
Added: sandbox/SOC/2010/phoenix3/libs/phoenix/example/arguments.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/example/arguments.cpp 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -0,0 +1,21 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <iostream>
+#include <boost/phoenix/core.hpp>
+
+int
+main()
+{
+ using boost::phoenix::arg_names::arg1;
+ using boost::phoenix::arg_names::arg2;
+
+ int i = 3;
+ char const* s = "Hello World";
+ std::cout << arg1(i) << std::endl; // prints 3
+ std::cout << arg2(i, s) << std::endl; // prints "Hello World"
+ return 0;
+}
Added: sandbox/SOC/2010/phoenix3/libs/phoenix/example/callback.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/example/callback.cpp 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -0,0 +1,24 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <iostream>
+#include <boost/phoenix/core.hpp>
+
+template <typename F>
+void print(F f)
+{
+ std::cout << f() << std::endl;
+}
+
+int
+main()
+{
+ using boost::phoenix::val;
+
+ print(val(3));
+ print(val("Hello World"));
+ return 0;
+}
Modified: sandbox/SOC/2010/phoenix3/libs/phoenix/example/container_actor.cpp
==============================================================================
--- sandbox/SOC/2010/phoenix3/libs/phoenix/example/container_actor.cpp (original)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/example/container_actor.cpp 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -8,6 +8,7 @@
#include <boost/phoenix/core.hpp>
#include <boost/phoenix/function.hpp>
+#include <boost/phoenix/stl/container.hpp>
#include <vector>
@@ -51,14 +52,43 @@
container_actor( base_type const& base )
: base_type( base ) {}
+ typename phoenix::result_of::function<phoenix::stl::begin, that_type>::type const
+ begin() const
+ {
+ return phoenix::begin(*this);
+ }
+
+ typename phoenix::result_of::function<phoenix::stl::end, that_type>::type const
+ end() const
+ {
+ return phoenix::begin(*this);
+ }
+
typename phoenix::result_of::function<size_impl, that_type>::type const
size() const
{
function<size_impl> const f = size_impl();
return f(*this);
}
+
+ typename phoenix::result_of::function<phoenix::stl::max_size, that_type>::type const
+ max_size() const
+ {
+ return phoenix::max_size(*this);
+ }
+
+ typename phoenix::result_of::function<phoenix::stl::empty, that_type>::type const
+ empty() const
+ {
+ return phoenix::empty(*this);
+ }
- // the rest ...
+ template <typename Container>
+ typename phoenix::result_of::function<phoenix::stl::swap, that_type, Container>::type const
+ swap(actor<Container> const& expr) const
+ {
+ return phoenix::swap(*this, expr);
+ }
};
Added: sandbox/SOC/2010/phoenix3/libs/phoenix/example/custom_evaluator.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/example/custom_evaluator.cpp 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -0,0 +1,156 @@
+/*==============================================================================
+ Copyright (c) 2005-2010 Joel de Guzman
+ Copyright (c) 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)
+==============================================================================*/
+
+#include <boost/phoenix/core.hpp>
+#include <boost/phoenix/operator.hpp>
+#include <boost/proto/proto.hpp>
+
+#include <iostream>
+#include <typeinfo>
+
+namespace proto = boost::proto;
+namespace phoenix = boost::phoenix;
+
+namespace impl
+{
+
+ template <typename OutStream>
+ struct phoenix_to_cpp
+ {
+ phoenix_to_cpp( OutStream& ostr ) : ostr(ostr), level(1) {};
+
+ OutStream& ostr;
+ int level;
+
+ template <typename Expr, typename Tag = typename proto::tag_of<Expr>::type>
+ struct eval
+ : proto::null_eval<Expr, phoenix_to_cpp>
+ {};
+
+ template <typename Expr>
+ struct eval<Expr, proto::tag::minus>
+ {
+ typedef OutStream& result_type;
+
+ result_type operator()(Expr &expr, phoenix_to_cpp &ctx) const
+ {
+ proto::eval(proto::child_c<0>(expr), ctx);
+ ctx.ostr << " - ";
+ proto::eval(proto::child_c<1>(expr), ctx);
+
+ return ctx.ostr;
+ }
+ };
+
+ template <typename Expr>
+ struct eval<Expr, proto::tag::plus>
+ {
+ typedef OutStream& result_type;
+
+ result_type operator()(Expr &expr, phoenix_to_cpp &ctx) const
+ {
+ proto::eval(proto::child_c<0>(expr), ctx);
+ ctx.ostr << " + ";
+ proto::eval(proto::child_c<1>(expr), ctx);
+
+ return ctx.ostr;
+ }
+ };
+
+ template <typename Expr>
+ struct eval<Expr, proto::tag::comma>
+ {
+ typedef OutStream& result_type;
+
+ result_type operator()(Expr &expr, phoenix_to_cpp &ctx) const
+ {
+ ctx.ostr << std::setw(ctx.level*4) << " "; proto::eval(proto::child_c<0>(expr), ctx);
+ ctx.ostr << ";\n";
+ ctx.ostr << std::setw(ctx.level*4) << " "; proto::eval(proto::child_c<1>(expr), ctx);
+ ctx.ostr << ";";
+
+ return ctx.ostr;
+ }
+ };
+
+ template <typename Expr>
+ struct eval<Expr, proto::tag::function>
+ {
+ typedef OutStream& result_type;
+
+ template <typename N, typename E>
+ void output(OutStream& os, E &expr) const {}
+
+ template <typename N, typename Env>
+ void output(OutStream& os,
+ phoenix::actor<
+ proto::basic_expr<
+ boost::proto::tag::function
+ , proto::list3<
+ proto::basic_expr<
+ proto::tag::terminal
+ , proto::term< phoenix::funcwrap<phoenix::argument> >
+ >
+ , Env
+ , proto::basic_expr<
+ proto::tag::terminal
+ , proto::term< N >
+ >
+ >
+ >
+ > const& expr) const
+ {
+ os << "arg" << N::value;
+ }
+
+ result_type operator()(Expr &expr, phoenix_to_cpp &ctx) const
+ {
+
+ output( ctx.ostr, expr );
+
+ return ctx.ostr;
+ }
+ };
+ };
+}
+
+template <typename Expr>
+void phoenix_to_cpp(Expr const& expr)
+{
+ std::cout << "template <typename Result";
+
+ for( unsigned i = 0; i < phoenix::arity(expr); ++i )
+ {
+ std::cout << ", typename Arg" << i;
+ }
+ std::cout << ">\n";
+ std::cout << "Result f(";
+ for( unsigned i = 0; i < phoenix::arity(expr); ++i )
+ {
+ std::cout << "Arg" << i << " arg" << i;
+ if( i != phoenix::arity(expr)-1 ) std::cout << ", ";
+ }
+ std::cout << ")\n{\n";
+
+ impl::phoenix_to_cpp<std::ostream> ctx(std::cout);
+ proto::eval( expr, ctx );
+
+ std::cout << "\n}\n";
+}
+
+
+int main()
+{
+ using phoenix::arg_names::arg1;
+ using phoenix::arg_names::arg2;
+ using phoenix::arg_names::arg3;
+
+ phoenix_to_cpp( (arg1 + arg2, arg1 - arg2, arg1 + arg2 - arg3 ) );
+
+}
+
Added: sandbox/SOC/2010/phoenix3/libs/phoenix/example/find_if.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/example/find_if.cpp 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -0,0 +1,28 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <vector>
+#include <algorithm>
+#include <iostream>
+#include <boost/phoenix/core.hpp>
+#include <boost/phoenix/operator.hpp>
+
+int
+main()
+{
+ using boost::phoenix::arg_names::arg1;
+
+ int init[] = { 2, 10, 4, 5, 1, 6, 8, 3, 9, 7 };
+ std::vector<int> c(init, init + 10);
+ typedef std::vector<int>::iterator iterator;
+
+ // Find the first odd number in container c
+ iterator it = std::find_if(c.begin(), c.end(), arg1 % 2 == 1);
+
+ if (it != c.end())
+ std::cout << *it << std::endl; // if found, print the result
+ return 0;
+}
Added: sandbox/SOC/2010/phoenix3/libs/phoenix/example/function.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/example/function.cpp 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -0,0 +1,47 @@
+/*=============================================================================
+ Copyright (c) 2001-2003 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <vector>
+#include <algorithm>
+#include <iostream>
+#include <boost/phoenix/core.hpp>
+#include <boost/phoenix/function.hpp>
+
+using boost::phoenix::function;
+
+struct is_odd_
+{
+ template <typename Arg>
+ struct result
+ {
+ typedef bool type;
+ };
+
+ template <typename Arg>
+ bool operator()(Arg arg1) const
+ {
+ return arg1 % 2 == 1;
+ }
+};
+
+function<is_odd_> is_odd;
+
+int
+main()
+{
+ using boost::phoenix::arg_names::arg1;
+
+ int init[] = { 2, 10, 4, 5, 1, 6, 8, 3, 9, 7 };
+ std::vector<int> c(init, init + 10);
+ typedef std::vector<int>::iterator iterator;
+
+ // Find the first odd number in container c
+ iterator it = std::find_if(c.begin(), c.end(), is_odd(arg1));
+
+ if (it != c.end())
+ std::cout << *it << std::endl; // if found, print the result
+ return 0;
+}
Added: sandbox/SOC/2010/phoenix3/libs/phoenix/example/if.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/example/if.cpp 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -0,0 +1,36 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <iostream>
+#include <vector>
+#include <algorithm>
+#include <boost/phoenix/statement.hpp>
+#include <boost/phoenix/operator.hpp>
+#include <boost/phoenix/core.hpp>
+
+int
+main()
+{
+ using boost::phoenix::if_;
+ using boost::phoenix::arg_names::arg1;
+
+ int init[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
+ std::vector<int> v(init, init+10);
+
+ std::cout << std::dec;
+ int x = 0;
+
+ std::for_each(v.begin(), v.end(),
+ if_(arg1 > 5)
+ [
+ std::cout << arg1 << ", "
+ ]
+ );
+
+ std::cout << std::endl;
+
+ return 0;
+}
Added: sandbox/SOC/2010/phoenix3/libs/phoenix/example/references.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/example/references.cpp 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -0,0 +1,20 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <iostream>
+#include <boost/phoenix/core.hpp>
+
+int
+main()
+{
+ using boost::phoenix::ref;
+
+ int i = 3;
+ char const* s = "Hello World";
+ std::cout << ref(i)() << std::endl;
+ std::cout << ref(s)() << std::endl;
+ return 0;
+}
Added: sandbox/SOC/2010/phoenix3/libs/phoenix/example/values.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/phoenix3/libs/phoenix/example/values.cpp 2010-08-16 11:34:46 EDT (Mon, 16 Aug 2010)
@@ -0,0 +1,18 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <iostream>
+#include <boost/phoenix/core.hpp>
+
+int
+main()
+{
+ using boost::phoenix::val;
+
+ std::cout << val(3)() << std::endl;
+ std::cout << val("Hello World")() << std::endl;
+ return 0;
+}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk