|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r64168 - in trunk/libs/spirit: phoenix/doc/html phoenix/doc/html/phoenix repository/doc/html repository/doc/html/spirit_repository repository/doc/html/spirit_repository/karma_components repository/doc/html/spirit_repository/karma_components/directives repository/doc/html/spirit_repository/karma_components/nonterminal repository/doc/html/spirit_repository/qi_components repository/doc/html/spirit_repository/qi_components/directives repository/doc/html/spirit_repository/qi_components/nonterminal repository/doc/html/spirit_repository/qi_components/primitive
From: daniel_james_at_[hidden]
Date: 2010-07-19 16:15:57
Author: danieljames
Date: 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
New Revision: 64168
URL: http://svn.boost.org/trac/boost/changeset/64168
Log:
Rebuild spirit documentation for phoenix + repository.
Text files modified:
trunk/libs/spirit/phoenix/doc/html/index.html | 205 +++---
trunk/libs/spirit/phoenix/doc/html/phoenix/acknowledgement.html | 117 +-
trunk/libs/spirit/phoenix/doc/html/phoenix/actors.html | 52
trunk/libs/spirit/phoenix/doc/html/phoenix/algorithm.html | 1221 ++++++++++++++++++++-------------------
trunk/libs/spirit/phoenix/doc/html/phoenix/basics.html | 178 ++---
trunk/libs/spirit/phoenix/doc/html/phoenix/composite.html | 1095 ++++++++++++++++-------------------
trunk/libs/spirit/phoenix/doc/html/phoenix/container.html | 734 ++++++++++++-----------
trunk/libs/spirit/phoenix/doc/html/phoenix/inside_phoenix.html | 768 ++++++++++++------------
trunk/libs/spirit/phoenix/doc/html/phoenix/introduction.html | 25
trunk/libs/spirit/phoenix/doc/html/phoenix/organization.html | 384 ++++++------
trunk/libs/spirit/phoenix/doc/html/phoenix/primitives.html | 259 +++----
trunk/libs/spirit/phoenix/doc/html/phoenix/references.html | 117 +-
trunk/libs/spirit/phoenix/doc/html/phoenix/starter_kit.html | 385 ++++++------
trunk/libs/spirit/phoenix/doc/html/phoenix/wrap_up.html | 47
trunk/libs/spirit/repository/doc/html/index.html | 18
trunk/libs/spirit/repository/doc/html/spirit_repository/karma_components.html | 12
trunk/libs/spirit/repository/doc/html/spirit_repository/karma_components/directives.html | 12
trunk/libs/spirit/repository/doc/html/spirit_repository/karma_components/directives/karma_confix_generator.html | 122 +--
trunk/libs/spirit/repository/doc/html/spirit_repository/karma_components/nonterminal.html | 12
trunk/libs/spirit/repository/doc/html/spirit_repository/karma_components/nonterminal/subrule.html | 286 ++++----
trunk/libs/spirit/repository/doc/html/spirit_repository/preface.html | 189 +++---
trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components.html | 12
trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives.html | 12
trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/confix.html | 116 +--
trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/distinct.html | 104 +--
trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal.html | 12
trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal/subrule.html | 717 +++++++++++-----------
trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive.html | 12
trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive/flush_multi_pass.html | 48
29 files changed, 3559 insertions(+), 3712 deletions(-)
Modified: trunk/libs/spirit/phoenix/doc/html/index.html
==============================================================================
--- trunk/libs/spirit/phoenix/doc/html/index.html (original)
+++ trunk/libs/spirit/phoenix/doc/html/index.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -1,37 +1,37 @@
<html>
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>Chapter 1. Phoenix 2.0</title>
-<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
-<link rel="start" href="index.html" title="Chapter 1. Phoenix 2.0">
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Chapter 1. Phoenix 2.0</title>
+<link rel="stylesheet" href="../../../../../doc/src/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 2.0">
<link rel="next" href="phoenix/introduction.html" title="Introduction">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
-<div class="spirit-nav"><a accesskey="n" href="phoenix/introduction.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a></div>
-<div class="chapter" lang="en">
+<div class="spirit-nav"><a accesskey="n" href="phoenix/introduction.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a></div>
+<div class="chapter">
<div class="titlepage"><div>
<div><h2 class="title">
-<a name="phoenix"></a>Chapter 1. Phoenix 2.0</h2></div>
+<a name="phoenix"></a>Chapter 1. Phoenix 2.0</h2></div>
<div><div class="author"><h3 class="author">
<span class="firstname">Joel</span> <span class="surname">de Guzman</span>
</h3></div></div>
<div><div class="author"><h3 class="author">
<span class="firstname">Dan</span> <span class="surname">Marsden</span>
</h3></div></div>
-<div><p class="copyright">Copyright © 2002-2005 Joel
+<div><p class="copyright">Copyright © 2002-2005 Joel
de Guzman, Dan Marsden</p></div>
<div><div class="legalnotice">
-<a name="id385274"></a><p>
+<a name="id759708"></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>
@@ -91,40 +91,29 @@
<dt><span class="section">References</span></dt>
</dl>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="phoenix.preface"></a>Preface</h2></div></div></div>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <span class="emphasis"><em>Functional programming is so called because a program consists
- entirely of functions. The main program itself is written as a function
- which receives the program's input as its argument and delivers the program's
- output as its result. Typically the main function is defined in terms of
- other functions, which in turn are defined in terms of still more functions
- until at the bottom level the functions are language primitives.</em></span>
- </p>
-<p>
- </p>
-</blockquote></div>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <span class="bold"><b>John Hughes</b></span>-- <span class="emphasis"><em>Why Functional
- Programming Matters</em></span>
- </p>
-<p>
- </p>
-</blockquote></div>
+<a name="phoenix.preface"></a><a class="link" href="index.html#phoenix.preface" title="Preface">Preface</a>
+</h2></div></div></div>
+<div class="blockquote"><blockquote class="blockquote"><p>
+ <span class="emphasis"><em>Functional programming is so called because a program consists
+ entirely of functions. The main program itself is written as a function which
+ receives the program's input as its argument and delivers the program's output
+ as its result. Typically the main function is defined in terms of other functions,
+ which in turn are defined in terms of still more functions until at the bottom
+ level the functions are language primitives.</em></span>
+ </p></blockquote></div>
+<div class="blockquote"><blockquote class="blockquote"><p>
+ <span class="bold"><strong>John Hughes</strong></span>-- <span class="emphasis"><em>Why Functional Programming
+ Matters</em></span>
+ </p></blockquote></div>
<p>
<span class="inlinemediaobject"><img src="images/lambda_cpp.png" alt="lambda_cpp"></span>
</p>
-<a name="phoenix.preface.description"></a><h2>
-<a name="id385804"></a>
- Description
- </h2>
+<a name="phoenix.preface.description"></a><h3>
+<a name="id759789"></a>
+ <a class="link" href="index.html#phoenix.preface.description">Description</a>
+ </h3>
<p>
Phoenix enables Functional Programming (FP) in C++. The design and implementation
of Phoenix is highly influenced by FC++
@@ -141,10 +130,10 @@
the library into small pieces, without fear that the pieces won't work anymore.
The library is organized in highly independent modules and layers.
</p>
-<a name="phoenix.preface.how_to_use_this_manual"></a><h2>
-<a name="id455895"></a>
- How to use this manual
- </h2>
+<a name="phoenix.preface.how_to_use_this_manual"></a><h3>
+<a name="id759849"></a>
+ <a class="link" href="index.html#phoenix.preface.how_to_use_this_manual">How to use this manual</a>
+ </h3>
<p>
The Phoenix library is organized in logical modules. This documentation provides
a user's guide and reference for each module in the library. A simple and clear
@@ -165,8 +154,8 @@
icons precede some text to indicate:
</p>
<div class="table">
-<a name="id455925"></a><p class="title"><b>Table 1.1. Icons</b></p>
-<table class="table" summary="Icons">
+<a name="id759887"></a><p class="title"><b>Table 1.1. Icons</b></p>
+<div class="table-contents"><table class="table" summary="Icons">
<colgroup>
<col>
<col>
@@ -174,86 +163,86 @@
</colgroup>
<thead><tr>
<th>
- <p>
- Icon
- </p>
- </th>
+ <p>
+ Icon
+ </p>
+ </th>
<th>
- <p>
- Name
- </p>
- </th>
+ <p>
+ Name
+ </p>
+ </th>
<th>
- <p>
- Meaning
- </p>
- </th>
+ <p>
+ Meaning
+ </p>
+ </th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- <span class="inlinemediaobject"><img src="images/note.png" alt="note"></span>
- </p>
- </td>
+ <p>
+ <span class="inlinemediaobject"><img src="images/note.png" alt="note"></span>
+ </p>
+ </td>
<td>
- <p>
- Note
- </p>
- </td>
+ <p>
+ Note
+ </p>
+ </td>
<td>
- <p>
- Information provided is auxiliary but will give the reader a deeper insight
- into a specific topic. May be skipped.
- </p>
- </td>
+ <p>
+ Information provided is auxiliary but will give the reader a deeper
+ insight into a specific topic. May be skipped.
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <span class="inlinemediaobject"><img src="images/alert.png" alt="alert"></span>
- </p>
- </td>
+ <p>
+ <span class="inlinemediaobject"><img src="images/alert.png" alt="alert"></span>
+ </p>
+ </td>
<td>
- <p>
- Alert
- </p>
- </td>
+ <p>
+ Alert
+ </p>
+ </td>
<td>
- <p>
- Information provided is of utmost importance.
- </p>
- </td>
+ <p>
+ Information provided is of utmost importance.
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <span class="inlinemediaobject"><img src="images/tip.png" alt="tip"></span>
- </p>
- </td>
+ <p>
+ <span class="inlinemediaobject"><img src="images/tip.png" alt="tip"></span>
+ </p>
+ </td>
<td>
- <p>
- Tip
- </p>
- </td>
+ <p>
+ Tip
+ </p>
+ </td>
<td>
- <p>
- A potentially useful and helpful piece of information.
- </p>
- </td>
+ <p>
+ A potentially useful and helpful piece of information.
+ </p>
+ </td>
</tr>
</tbody>
-</table>
+</table></div>
</div>
-<p>
+<br class="table-break"><p>
This documentation is automatically generated by Spirit QuickBook documentation
tool. QuickBook can be found in the <a href="http://spirit.sourceforge.net/repository/applications/show_contents.php" target="_top">Spirit
Repository</a>.
</p>
-<a name="phoenix.preface.support"></a><h2>
-<a name="id387296"></a>
- Support
- </h2>
+<a name="phoenix.preface.support"></a><h3>
+<a name="id760065"></a>
+ <a class="link" href="index.html#phoenix.preface.support">Support</a>
+ </h3>
<p>
Please direct all questions to Spirit's mailing list. You can subscribe to
the <a href="https://lists.sourceforge.net/lists/listinfo/spirit-general" target="_top">Spirit
@@ -264,17 +253,17 @@
NNTP news portal</a> (thanks to Gmane).
The news group mirrors the mailing list. Here is a link to the archives: http://news.gmane.org/gmane.comp.parsers.spirit.general.
</p>
-<a name="phoenix.preface._emphasis_role__bold___emphasis____to_my_dear_daughter__phoenix__emphasis___emphasis_"></a><h2>
-<a name="id387363"></a>
- ...To my dear daughter, Phoenix
- </h2>
+<a name="phoenix.preface._emphasis_role__bold___emphasis____to_my_dear_daughter__phoenix__emphasis___emphasis_"></a><h3>
+<a name="id760124"></a>
+ <a class="link" href="index.html#phoenix.preface._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>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: July 23, 2008 at 17:24:10 GMT</small></p></td>
+<td align="left"><p><small>Last revised: July 19, 2010 at 19:06:12 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
-<div class="spirit-nav"><a accesskey="n" href="phoenix/introduction.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a></div>
+<div class="spirit-nav"><a accesskey="n" href="phoenix/introduction.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a></div>
</body>
</html>
Modified: trunk/libs/spirit/phoenix/doc/html/phoenix/acknowledgement.html
==============================================================================
--- trunk/libs/spirit/phoenix/doc/html/phoenix/acknowledgement.html (original)
+++ trunk/libs/spirit/phoenix/doc/html/phoenix/acknowledgement.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -1,11 +1,11 @@
<html>
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Acknowledgement</title>
-<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
-<link rel="start" href="../index.html" title="Chapter 1. Phoenix 2.0">
-<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
+<link rel="stylesheet" href="../../../../../../doc/src/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 2.0">
+<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
<link rel="prev" href="wrap_up.html" title="Wrap Up">
<link rel="next" href="references.html" title="References">
</head>
@@ -13,70 +13,71 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="wrap_up.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="references.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="wrap_up.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="references.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="phoenix.acknowledgement"></a>Acknowledgement</h2></div></div></div>
-<div class="orderedlist"><ol type="1">
-<li>
- Hartmut Kaiser implemented the original lazy casts and constructors based
- on his original work on Spirit SE "semantic expressions" (the precursor
- to Phoenix).
- </li>
-<li>
- Angus Leeming implemented the container functions on Phoenix-1 which I then
- ported to Phoenix-2.
- </li>
-<li>
- Daniel Wallin helped with the scope module, local variables, let and lambda
- and the algorithms. I frequently discuss design issues with Daniel on Yahoo
- Messenger.
- </li>
-<li>
- Jaakko Jarvi. DA Lambda MAN!
- </li>
-<li>
- Dave Abrahams, for his constant presence, wherever, whenever.
- </li>
-<li>
- Aleksey Gurtovoy, DA MPL MAN!
- </li>
-<li>
- Doug Gregor, always a source of inpiration.
- </li>
-<li>
- Dan Marsden, did almost all the work in bringing Phoenix-2 out the door.
- </li>
-<li>
- Eric Niebler did a 2.0 pre-release review and wrote some range related code
- that Phoenix stole and used in the algorithms.
- </li>
-<li>
- Thorsten Ottosen; Eric's range_ex code began life as "container_algo"
- in the old boost sandbox, by Thorsten in 2002-2003.
- </li>
-<li>
- Jeremy Siek, even prior to Thorsten, in 2001, started the "container_algo".
- </li>
-<li>
- Vladimir Prus wrote the mutating algorithms code from the Boost Wiki.
- </li>
-<li>
- Daryle Walker did a 2.0 pre-release review.
- </li>
+<a name="phoenix.acknowledgement"></a><a class="link" href="acknowledgement.html" title="Acknowledgement">Acknowledgement</a>
+</h2></div></div></div>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+ Hartmut Kaiser implemented the original lazy casts and constructors based
+ on his original work on Spirit SE "semantic expressions" (the
+ precursor to Phoenix).
+ </li>
+<li class="listitem">
+ Angus Leeming implemented the container functions on Phoenix-1 which I
+ then ported to Phoenix-2.
+ </li>
+<li class="listitem">
+ Daniel Wallin helped with the scope module, local variables, let and lambda
+ and the algorithms. I frequently discuss design issues with Daniel on Yahoo
+ Messenger.
+ </li>
+<li class="listitem">
+ Jaakko Jarvi. DA Lambda MAN!
+ </li>
+<li class="listitem">
+ Dave Abrahams, for his constant presence, wherever, whenever.
+ </li>
+<li class="listitem">
+ Aleksey Gurtovoy, DA MPL MAN!
+ </li>
+<li class="listitem">
+ Doug Gregor, always a source of inpiration.
+ </li>
+<li class="listitem">
+ Dan Marsden, did almost all the work in bringing Phoenix-2 out the door.
+ </li>
+<li class="listitem">
+ Eric Niebler did a 2.0 pre-release review and wrote some range related
+ code that Phoenix stole and used in the algorithms.
+ </li>
+<li class="listitem">
+ Thorsten Ottosen; Eric's range_ex code began life as "container_algo"
+ in the old boost sandbox, by Thorsten in 2002-2003.
+ </li>
+<li class="listitem">
+ Jeremy Siek, even prior to Thorsten, in 2001, started the "container_algo".
+ </li>
+<li class="listitem">
+ Vladimir Prus wrote the mutating algorithms code from the Boost Wiki.
+ </li>
+<li class="listitem">
+ Daryle Walker did a 2.0 pre-release review.
+ </li>
</ol></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 Joel
+<td align="right"><div class="copyright-footer">Copyright © 2002-2005 Joel
de Guzman, Dan Marsden<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)
@@ -85,7 +86,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="wrap_up.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="references.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="wrap_up.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="references.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/phoenix/doc/html/phoenix/actors.html
==============================================================================
--- trunk/libs/spirit/phoenix/doc/html/phoenix/actors.html (original)
+++ trunk/libs/spirit/phoenix/doc/html/phoenix/actors.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -1,11 +1,11 @@
<html>
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Actors</title>
-<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
-<link rel="start" href="../index.html" title="Chapter 1. Phoenix 2.0">
-<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
+<link rel="stylesheet" href="../../../../../../doc/src/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 2.0">
+<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
<link rel="prev" href="organization.html" title="Organization">
<link rel="next" href="primitives.html" title="Primitives">
</head>
@@ -13,42 +13,42 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="organization.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="primitives.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="organization.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="primitives.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="phoenix.actors"></a>Actors</h2></div></div></div>
+<a name="phoenix.actors"></a><a class="link" href="actors.html" title="Actors">Actors</a>
+</h2></div></div></div>
<p>
- The <tt class="computeroutput"><span class="identifier">Actor</span></tt> is the main concept
+ The <code class="computeroutput"><span class="identifier">Actor</span></code> is the main concept
behind the library. Actors are function objects. An actor can accept 0 to
- <tt class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></tt> arguments.
+ <code class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></code> arguments.
</p>
<div class="note"><table border="0" summary="Note">
<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
-<tr><td colspan="2" align="left" valign="top"><p>
- You can set <tt class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></tt>,
- the predefined maximum arity an actor can take. By default, <tt class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></tt> is set to 10.
+<tr><td align="left" valign="top"><p>
+ You can set <code class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></code>,
+ the predefined maximum arity an actor can take. By default, <code class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></code> is set to 10.
</p></td></tr>
</table></div>
<p>
- Phoenix supplies an <tt class="computeroutput"><span class="identifier">actor</span></tt> class
- template whose specializations model the <tt class="computeroutput"><span class="identifier">Actor</span></tt>
- concept. <tt class="computeroutput"><span class="identifier">actor</span></tt> has one template
- parameter, <tt class="computeroutput"><span class="identifier">Eval</span></tt>, that supplies
+ Phoenix supplies an <code class="computeroutput"><span class="identifier">actor</span></code> class
+ template whose specializations model the <code class="computeroutput"><span class="identifier">Actor</span></code>
+ concept. <code class="computeroutput"><span class="identifier">actor</span></code> has one template
+ parameter, <code class="computeroutput"><span class="identifier">Eval</span></code>, that supplies
the smarts to evaluate the resulting function.
</p>
-<pre class="programlisting">
-<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Eval</span><span class="special">></span>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Eval</span><span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">actor</span> <span class="special">:</span> <span class="identifier">Eval</span>
<span class="special">{</span>
<span class="identifier">return_type</span>
@@ -67,16 +67,16 @@
</pre>
<p>
The actor class accepts the arguments through a set of function call operators
- for 0 to <tt class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></tt> arities
+ for 0 to <code class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></code> arities
(Don't worry about the details, for now. Note, for example, that we skimp over
- the details regarding <tt class="computeroutput"><span class="identifier">return_type</span></tt>).
- The arguments are then forwarded to the actor's <tt class="computeroutput"><span class="identifier">Eval</span></tt>
+ the details regarding <code class="computeroutput"><span class="identifier">return_type</span></code>).
+ The arguments are then forwarded to the actor's <code class="computeroutput"><span class="identifier">Eval</span></code>
for evaluation.
</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 Joel
+<td align="right"><div class="copyright-footer">Copyright © 2002-2005 Joel
de Guzman, Dan Marsden<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)
@@ -85,7 +85,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="organization.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="primitives.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="organization.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="primitives.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/phoenix/doc/html/phoenix/algorithm.html
==============================================================================
--- trunk/libs/spirit/phoenix/doc/html/phoenix/algorithm.html (original)
+++ trunk/libs/spirit/phoenix/doc/html/phoenix/algorithm.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -1,11 +1,11 @@
<html>
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Algorithm</title>
-<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
-<link rel="start" href="../index.html" title="Chapter 1. Phoenix 2.0">
-<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
+<link rel="stylesheet" href="../../../../../../doc/src/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 2.0">
+<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
<link rel="prev" href="container.html" title="Container">
<link rel="next" href="inside_phoenix.html" title="Inside Phoenix">
</head>
@@ -13,24 +13,24 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="container.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="inside_phoenix.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="container.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="inside_phoenix.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="phoenix.algorithm"></a>Algorithm</h2></div></div></div>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</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>
+<a name="phoenix.algorithm"></a><a class="link" href="algorithm.html" title="Algorithm">Algorithm</a>
+</h2></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</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>
</pre>
<p>
The algorithm module provides wrappers for the standard algorithms in the
- <tt class="computeroutput"><span class="special"><</span><span class="identifier">algorithm</span><span class="special">></span></tt> and <tt class="computeroutput"><span class="special"><</span><span class="identifier">numeric</span><span class="special">></span></tt>
+ <code class="computeroutput"><span class="special"><</span><span class="identifier">algorithm</span><span class="special">></span></code> and <code class="computeroutput"><span class="special"><</span><span class="identifier">numeric</span><span class="special">></span></code>
headers.
</p>
<p>
@@ -38,8 +38,7 @@
querying, modelling the Boost.MPL
library. The different algorithm classes can be included using the headers:
</p>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</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">iteration</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</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">iteration</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</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">transformation</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</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">querying</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
@@ -52,8 +51,7 @@
<p>
For example, using the standard copy algorithm to copy between 2 arrays:
</p>
-<pre class="programlisting">
-<span class="keyword">int</span> <span class="identifier">array</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">3</span><span class="special">};</span>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">array</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">3</span><span class="special">};</span>
<span class="keyword">int</span> <span class="identifier">output</span><span class="special">[</span><span class="number">3</span><span class="special">];</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">copy</span><span class="special">(</span><span class="identifier">array</span><span class="special">,</span> <span class="identifier">array</span> <span class="special">+</span> <span class="number">3</span><span class="special">,</span> <span class="identifier">output</span><span class="special">);</span> <span class="comment">// We have to provide iterators
</span> <span class="comment">// to both the start and end of array
@@ -61,8 +59,7 @@
<p>
The analogous code using the phoenix algorithm module is:
</p>
-<pre class="programlisting">
-<span class="keyword">int</span> <span class="identifier">array</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">3</span><span class="special">};</span>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">array</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">3</span><span class="special">};</span>
<span class="keyword">int</span> <span class="identifier">output</span><span class="special">[</span><span class="number">3</span><span class="special">];</span>
<span class="identifier">copy</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="identifier">array</span><span class="special">,</span> <span class="identifier">output</span><span class="special">);</span> <span class="comment">// Notice only 2 arguments, the end of
</span> <span class="comment">// array is established automatically
@@ -76,874 +73,924 @@
The following tables describe the different categories of algorithms, and their
semantics.
</p>
-<div class="sidebar"><p>
+<div class="sidebar">
+<p class="title"><b></b></p>
+<p>
<span class="inlinemediaobject"><img src="../images/tip.png" alt="tip"></span> Arguments in brackets denote optional parameters.
- </p></div>
+ </p>
+</div>
<div class="table">
-<a name="id486434"></a><p class="title"><b>Table 1.7. Iteration Algorithms</b></p>
-<table class="table" summary="Iteration Algorithms">
+<a name="id786989"></a><p class="title"><b>Table 1.7. Iteration Algorithms</b></p>
+<div class="table-contents"><table class="table" summary="Iteration Algorithms">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
- <p>
- Function
- </p>
- </th>
+ <p>
+ Function
+ </p>
+ </th>
<th>
- <p>
- stl Semantics
- </p>
- </th>
+ <p>
+ stl Semantics
+ </p>
+ </th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">for_each</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">c</span><span class="special">)</span></tt>
- </p>
- </td>
-<td>
- <p>
- <tt class="computeroutput"><span class="identifier">for_each</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">f</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">for_each</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">c</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">for_each</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">f</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">accumulate</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
-<td>
- <p>
- <tt class="computeroutput"><span class="identifier">accumulate</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">accumulate</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">accumulate</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
</tbody>
-</table>
+</table></div>
</div>
-<div class="table">
-<a name="id486741"></a><p class="title"><b>Table 1.8. Querying Algorithms</b></p>
-<table class="table" summary="Querying Algorithms">
+<br class="table-break"><div class="table">
+<a name="id787263"></a><p class="title"><b>Table 1.8. Querying Algorithms</b></p>
+<div class="table-contents"><table class="table" summary="Querying Algorithms">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
- <p>
- Function
- </p>
- </th>
+ <p>
+ Function
+ </p>
+ </th>
<th>
- <p>
- stl Semantics
- </p>
- </th>
+ <p>
+ stl Semantics
+ </p>
+ </th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">find</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">a</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">find</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">a</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">find</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">a</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">find</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">a</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">find_if</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">find_if</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">find_if</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">f</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">find_if</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">f</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">find_end</span><span class="special">(</span><span class="identifier">r1</span><span class="special">,</span> <span class="identifier">r2</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">find_end</span><span class="special">(</span><span class="identifier">r1</span><span class="special">,</span> <span class="identifier">r2</span><span class="special">[,</span>
+ <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">find_end</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r2</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r2</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">find_end</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span>
+ <span class="identifier">end</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span>
+ <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r2</span><span class="special">),</span>
+ <span class="identifier">end</span><span class="special">(</span><span class="identifier">r2</span><span class="special">)[,</span>
+ <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">find_first_of</span><span class="special">(</span><span class="identifier">r1</span><span class="special">,</span> <span class="identifier">r2</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">find_first_of</span><span class="special">(</span><span class="identifier">r1</span><span class="special">,</span> <span class="identifier">r2</span><span class="special">[,</span>
+ <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">find_first_of</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r2</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r2</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">find_first_of</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span>
+ <span class="identifier">end</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span>
+ <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r2</span><span class="special">),</span>
+ <span class="identifier">end</span><span class="special">(</span><span class="identifier">r2</span><span class="special">)[,</span>
+ <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">adjacent_find</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">adjacent_find</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">adjacent_find</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">adjacent_find</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span>
+ <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">count</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">a</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">count</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">a</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">count</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">a</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">count</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">a</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">count_if</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">count_if</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">count_if</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">f</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">count_if</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">f</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">r</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">r</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">))</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">distance</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">))</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">mismatch</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">i</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">mismatch</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">i</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">mismatch</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">i</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">mismatch</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">i</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">equal</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">i</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">equal</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">i</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">equal</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">i</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">equal</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">i</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">search</span><span class="special">(</span><span class="identifier">r1</span><span class="special">,</span> <span class="identifier">r2</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">search</span><span class="special">(</span><span class="identifier">r1</span><span class="special">,</span> <span class="identifier">r2</span><span class="special">[,</span>
+ <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">search</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r2</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r2</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">search</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span>
+ <span class="identifier">end</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span>
+ <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r2</span><span class="special">),</span>
+ <span class="identifier">end</span><span class="special">(</span><span class="identifier">r2</span><span class="special">)[,</span>
+ <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">lower_bound</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">lower_bound</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">lower_bound</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">lower_bound</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">upper_bound</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">upper_bound</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">upper_bound</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">upper_bound</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">equal_range</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">equal_range</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">equal_range</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">equal_range</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">binary_search</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">binary_search</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">binary_search</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">binary_search</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">includes</span><span class="special">(</span><span class="identifier">r1</span><span class="special">,</span> <span class="identifier">r2</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">includes</span><span class="special">(</span><span class="identifier">r1</span><span class="special">,</span> <span class="identifier">r2</span><span class="special">[,</span>
+ <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">includes</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r2</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r2</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">includes</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span>
+ <span class="identifier">end</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span>
+ <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r2</span><span class="special">),</span>
+ <span class="identifier">end</span><span class="special">(</span><span class="identifier">r2</span><span class="special">)[,</span>
+ <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">min_element</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">min_element</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">min_element</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">min_element</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span>
+ <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">max_element</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">max_element</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">max_element</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">max_element</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span>
+ <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">lexicographical_compare</span><span class="special">(</span><span class="identifier">r1</span><span class="special">,</span> <span class="identifier">r2</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">lexicographical_compare</span><span class="special">(</span><span class="identifier">r1</span><span class="special">,</span> <span class="identifier">r2</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">lexicographical_compare</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r2</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r2</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">lexicographical_compare</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r2</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r2</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
</tbody>
-</table>
+</table></div>
</div>
-<div class="table">
-<a name="id489465"></a><p class="title"><b>Table 1.9. Transformation Algorithms</b></p>
-<table class="table" summary="Transformation Algorithms">
+<br class="table-break"><div class="table">
+<a name="id789681"></a><p class="title"><b>Table 1.9. Transformation Algorithms</b></p>
+<div class="table-contents"><table class="table" summary="Transformation Algorithms">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
- <p>
- Function
- </p>
- </th>
+ <p>
+ Function
+ </p>
+ </th>
<th>
- <p>
- stl Semantics
- </p>
- </th>
+ <p>
+ stl Semantics
+ </p>
+ </th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">copy</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">copy</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">copy</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">copy</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">copy_backward</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">copy_backward</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">copy_backward</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">copy_backward</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">transform</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">transform</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">transform</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">transform</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">transform</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">i</span><span class="special">,</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">transform</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">i</span><span class="special">,</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">transform</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">i</span><span class="special">,</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">transform</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">i</span><span class="special">,</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">replace</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">replace</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">replace</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">replace</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">replace_if</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">f</span><span class="special">,</span> <span class="identifier">a</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">replace_if</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">f</span><span class="special">,</span> <span class="identifier">a</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">replace</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">f</span><span class="special">,</span> <span class="identifier">a</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">replace</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">f</span><span class="special">,</span> <span class="identifier">a</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">replace_copy</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">replace_copy</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">replace_copy</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">replace_copy</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">replace_copy_if</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">f</span><span class="special">,</span> <span class="identifier">a</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">replace_copy_if</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">f</span><span class="special">,</span> <span class="identifier">a</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">replace_copy_if</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">f</span><span class="special">,</span> <span class="identifier">a</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">replace_copy_if</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">f</span><span class="special">,</span> <span class="identifier">a</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">fill</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">a</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">fill</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">a</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">fill</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">a</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">fill</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">a</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">fill_n</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">n</span><span class="special">,</span> <span class="identifier">a</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">fill_n</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">n</span><span class="special">,</span> <span class="identifier">a</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">fill_n</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">n</span><span class="special">,</span> <span class="identifier">a</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">fill_n</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">n</span><span class="special">,</span> <span class="identifier">a</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">generate</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">generate</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">generate</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">f</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">generate</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">f</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">generate_n</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">n</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">generate_n</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">n</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">generate_n</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">n</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">generate_n</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">n</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">remove</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">a</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">remove</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">a</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">remove</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">a</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">remove</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">a</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">remove_if</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">remove_if</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">remove_if</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">f</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">remove_if</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">f</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">remove_copy</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">a</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">remove_copy</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">a</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">remove_copy</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">a</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">remove_copy</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">a</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">remove_copy_if</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">remove_copy_if</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">remove_copy_if</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">remove_copy_if</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">unique</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unique</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">unique</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unique</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span>
+ <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">unique_copy</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unique_copy</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">unique_copy</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unique_copy</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">reverse</span><span class="special">(</span><span class="identifier">r</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">reverse</span><span class="special">(</span><span class="identifier">r</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">reverse</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">))</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">reverse</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">))</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">reverse_copy</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">reverse_copy</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">reverse_copy</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">reverse_copy</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">rotate</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">m</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rotate</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">m</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">rotate</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">))</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rotate</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">))</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">rotate_copy</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">o</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rotate_copy</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">o</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">rotate_copy</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rotate_copy</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">random_shuffle</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">random_shuffle</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">random_shuffle</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">f</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">random_shuffle</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">f</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">partition</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">partition</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">partition</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">f</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">partition</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">f</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">stable_partition</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">stable_partition</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">f</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">stable_partition</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">f</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">stable_partition</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">f</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">sort</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">sort</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">sort</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">sort</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span>
+ <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">stable_sort</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">stable_sort</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">stable_sort</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">stable_sort</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span>
+ <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">partial_sort</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">m</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">partial_sort</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">m</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">partial_sort</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">partial_sort</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span>
+ <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">partial_sort_copy</span><span class="special">(</span><span class="identifier">r1</span><span class="special">,</span> <span class="identifier">r2</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">partial_sort_copy</span><span class="special">(</span><span class="identifier">r1</span><span class="special">,</span> <span class="identifier">r2</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">partial_sort_copy</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r2</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r2</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">partial_sort_copy</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r2</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r2</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">nth_element</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">n</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">nth_element</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">n</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">nth_element</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">n</span><span class="special">,</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">nth_element</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">n</span><span class="special">,</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span>
+ <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">merge</span><span class="special">(</span><span class="identifier">r1</span><span class="special">,</span> <span class="identifier">r2</span><span class="special">,</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">merge</span><span class="special">(</span><span class="identifier">r1</span><span class="special">,</span> <span class="identifier">r2</span><span class="special">,</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">merge</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r2</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r2</span><span class="special">),</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">merge</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span>
+ <span class="identifier">end</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span>
+ <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r2</span><span class="special">),</span>
+ <span class="identifier">end</span><span class="special">(</span><span class="identifier">r2</span><span class="special">),</span>
+ <span class="identifier">o</span><span class="special">[,</span>
+ <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">inplace_merge</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">m</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">inplace_merge</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">m</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">inplace_merge</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">inplace_merge</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">m</span><span class="special">,</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span>
+ <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">set_union</span><span class="special">(</span><span class="identifier">r1</span><span class="special">,</span> <span class="identifier">r2</span><span class="special">,</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">set_union</span><span class="special">(</span><span class="identifier">r1</span><span class="special">,</span> <span class="identifier">r2</span><span class="special">,</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">set_union</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r2</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r2</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">set_union</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span>
+ <span class="identifier">end</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span>
+ <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r2</span><span class="special">),</span>
+ <span class="identifier">end</span><span class="special">(</span><span class="identifier">r2</span><span class="special">)[,</span>
+ <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">set_intersection</span><span class="special">(</span><span class="identifier">r1</span><span class="special">,</span> <span class="identifier">r2</span><span class="special">,</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">set_intersection</span><span class="special">(</span><span class="identifier">r1</span><span class="special">,</span> <span class="identifier">r2</span><span class="special">,</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">set_intersection</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r2</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r2</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">set_intersection</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r2</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r2</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">set_difference</span><span class="special">(</span><span class="identifier">r1</span><span class="special">,</span> <span class="identifier">r2</span><span class="special">,</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">set_difference</span><span class="special">(</span><span class="identifier">r1</span><span class="special">,</span> <span class="identifier">r2</span><span class="special">,</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">set_difference</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r2</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r2</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">set_difference</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span>
+ <span class="identifier">end</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span>
+ <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r2</span><span class="special">),</span>
+ <span class="identifier">end</span><span class="special">(</span><span class="identifier">r2</span><span class="special">)[,</span>
+ <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">set_symmetric_difference</span><span class="special">(</span><span class="identifier">r1</span><span class="special">,</span> <span class="identifier">r2</span><span class="special">,</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">set_symmetric_difference</span><span class="special">(</span><span class="identifier">r1</span><span class="special">,</span> <span class="identifier">r2</span><span class="special">,</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">set_symmetric_difference</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r2</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r2</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">set_symmetric_difference</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r1</span><span class="special">),</span> <span class="identifier">begin</span><span class="special">(</span><span class="identifier">r2</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r2</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">push_heap</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">push_heap</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">push_heap</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">push_heap</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span>
+ <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">pop_heap</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pop_heap</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">pop_heap</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pop_heap</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span>
+ <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">make_heap</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">make_heap</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">make_heap</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">make_heap</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span>
+ <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">sort_heap</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">sort_heap</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">sort_heap</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">sort_heap</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span>
+ <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">next_permutation</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">next_permutation</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">next_permutation</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">next_permutation</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">prev_permutation</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">prev_permutation</span><span class="special">(</span><span class="identifier">r</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">prev_permutation</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">prev_permutation</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">)[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">inner_product</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">f1</span><span class="special">,</span> <span class="identifier">f2</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">inner_product</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">,</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">f1</span><span class="special">,</span> <span class="identifier">f2</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">inner_product</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f1</span><span class="special">,</span> <span class="identifier">f2</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">inner_product</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f1</span><span class="special">,</span> <span class="identifier">f2</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">partial_sum</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">partial_sum</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">partial_sum</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">partial_sum</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">adjacent_difference</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">adjacent_difference</span><span class="special">(</span><span class="identifier">r</span><span class="special">,</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">adjacent_difference</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">adjacent_difference</span><span class="special">(</span><span class="identifier">begin</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">end</span><span class="special">(</span><span class="identifier">r</span><span class="special">),</span> <span class="identifier">o</span><span class="special">[,</span> <span class="identifier">f</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
</tbody>
-</table>
+</table></div>
</div>
+<br class="table-break">
</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 Joel
+<td align="right"><div class="copyright-footer">Copyright © 2002-2005 Joel
de Guzman, Dan Marsden<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)
@@ -952,7 +999,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="container.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="inside_phoenix.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="container.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="inside_phoenix.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/phoenix/doc/html/phoenix/basics.html
==============================================================================
--- trunk/libs/spirit/phoenix/doc/html/phoenix/basics.html (original)
+++ trunk/libs/spirit/phoenix/doc/html/phoenix/basics.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -1,11 +1,11 @@
<html>
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Basics</title>
-<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
-<link rel="start" href="../index.html" title="Chapter 1. Phoenix 2.0">
-<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
+<link rel="stylesheet" href="../../../../../../doc/src/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 2.0">
+<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
<link rel="prev" href="starter_kit.html" title="Starter Kit">
<link rel="next" href="organization.html" title="Organization">
</head>
@@ -13,45 +13,46 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="starter_kit.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="organization.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="starter_kit.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="organization.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="phoenix.basics"></a>Basics</h2></div></div></div>
+<a name="phoenix.basics"></a><a class="link" href="basics.html" title="Basics">Basics</a>
+</h2></div></div></div>
<p>
Almost everything is a function in the Phoenix library that can be evaluated
- as <tt class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">a1</span><span class="special">,</span> <span class="identifier">a2</span><span class="special">,</span> <span class="special">...,</span> a<span class="emphasis"><em>n</em></span><span class="special">)</span></tt>, where <span class="emphasis"><em>n</em></span> is the function's
+ as <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">a1</span><span class="special">,</span> <span class="identifier">a2</span><span class="special">,</span> <span class="special">...,</span> a<span class="emphasis"><em>n</em></span><span class="special">)</span></code>, where <span class="emphasis"><em>n</em></span> is the function's
arity, or number of arguments that the function expects. Operators are also
- functions. For example, <tt class="computeroutput"><span class="identifier">a</span> <span class="special">+</span> <span class="identifier">b</span></tt> is just
- a function with arity == 2 (or binary). <tt class="computeroutput"><span class="identifier">a</span>
- <span class="special">+</span> <span class="identifier">b</span></tt>
- is the same as <tt class="computeroutput"><span class="identifier">add</span><span class="special">(</span><span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">)</span></tt>, <tt class="computeroutput"><span class="identifier">a</span>
- <span class="special">+</span> <span class="identifier">b</span> <span class="special">+</span> <span class="identifier">c</span></tt> is the
- same as <tt class="computeroutput"><span class="identifier">add</span><span class="special">(</span><span class="identifier">add</span><span class="special">(</span><span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">),</span>
- <span class="identifier">c</span><span class="special">)</span></tt>.
+ functions. For example, <code class="computeroutput"><span class="identifier">a</span> <span class="special">+</span> <span class="identifier">b</span></code> is just
+ a function with arity == 2 (or binary). <code class="computeroutput"><span class="identifier">a</span>
+ <span class="special">+</span> <span class="identifier">b</span></code>
+ is the same as <code class="computeroutput"><span class="identifier">add</span><span class="special">(</span><span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">)</span></code>, <code class="computeroutput"><span class="identifier">a</span>
+ <span class="special">+</span> <span class="identifier">b</span> <span class="special">+</span> <span class="identifier">c</span></code> is the
+ same as <code class="computeroutput"><span class="identifier">add</span><span class="special">(</span><span class="identifier">add</span><span class="special">(</span><span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">),</span>
+ <span class="identifier">c</span><span class="special">)</span></code>.
</p>
<div class="note"><table border="0" summary="Note">
<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
-<tr><td colspan="2" align="left" valign="top"><p>
+<tr><td align="left" valign="top"><p>
Amusingly, functions may even return functions. We shall see what this means
in a short while.
</p></td></tr>
</table></div>
-<a name="phoenix.basics.partial_function_application"></a><h2>
-<a name="id459690"></a>
- <a href="basics.html#phoenix.basics.partial_function_application">Partial Function
+<a name="phoenix.basics.partial_function_application"></a><h3>
+<a name="id763540"></a>
+ <a class="link" href="basics.html#phoenix.basics.partial_function_application">Partial Function
Application</a>
- </h2>
+ </h3>
<p>
Think of a function as a black box. You pass arguments and it returns something
back. The figure below depicts the typical scenario.
@@ -61,23 +62,23 @@
</p>
<p>
A fully evaluated function is one in which all the arguments are given. All
- functions in plain C++ are fully evaluated. When you call the <tt class="computeroutput"><span class="identifier">sin</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></tt> function, you have to pass a number x. The
- function will return a result in return: the sin of x. When you call the <tt class="computeroutput"><span class="identifier">add</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span> <span class="identifier">y</span><span class="special">)</span></tt>
+ functions in plain C++ are fully evaluated. When you call the <code class="computeroutput"><span class="identifier">sin</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code> function, you have to pass a number x. The
+ function will return a result in return: the sin of x. When you call the <code class="computeroutput"><span class="identifier">add</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span> <span class="identifier">y</span><span class="special">)</span></code>
function, you have to pass two numbers x and y. The function will return the
- sum of the two numbers. The figure below is a fully evaluated <tt class="computeroutput"><span class="identifier">add</span></tt> function.
+ sum of the two numbers. The figure below is a fully evaluated <code class="computeroutput"><span class="identifier">add</span></code> function.
</p>
<p>
<span class="inlinemediaobject"><img src="../images/adder.png" alt="adder"></span>
</p>
<p>
A partially applied function, on the other hand, is one in which not all the
- arguments are supplied. If we are able to partially apply the function <tt class="computeroutput"><span class="identifier">add</span></tt> above, we may pass only the first argument.
+ arguments are supplied. If we are able to partially apply the function <code class="computeroutput"><span class="identifier">add</span></code> above, we may pass only the first argument.
In doing so, the function does not have all the required information it needs
to perform its task to compute and return a result. What it returns instead
is another function, a lambda function --another black box. Unlike the original
- <tt class="computeroutput"><span class="identifier">add</span></tt> function which has an arity
+ <code class="computeroutput"><span class="identifier">add</span></code> function which has an arity
of 2, the resulting lambda function has an arity of 1. Why? because we already
- supplied part of the input: <tt class="computeroutput"><span class="number">2</span></tt>
+ supplied part of the input: <code class="computeroutput"><span class="number">2</span></code>
</p>
<p>
<span class="inlinemediaobject"><img src="../images/add2.png" alt="add2"></span>
@@ -85,7 +86,7 @@
<p>
Now, when we shove in a number into our lambda function, it will return 2 plus
whatever we pass in. The lambda function essentially remembers 1) the original
- function, <tt class="computeroutput"><span class="identifier">add</span></tt>, and 2) the partial
+ function, <code class="computeroutput"><span class="identifier">add</span></code>, and 2) the partial
input, 2. The figure below illustrates a case where we pass 3 to our lambda
function, which then returns 5:
</p>
@@ -93,59 +94,58 @@
<span class="inlinemediaobject"><img src="../images/add2_call.png" alt="add2_call"></span>
</p>
<p>
- Obviously, partially applying the <tt class="computeroutput"><span class="identifier">add</span></tt>
+ Obviously, partially applying the <code class="computeroutput"><span class="identifier">add</span></code>
function, as we see above, cannot be done directly in C++ where we are expected
to supply all the arguments that a function expects. That's where the Phoenix
library comes in. The library provides the facilities to do partial function
application.
</p>
-<a name="phoenix.basics.stl_and_higher_order_functions"></a><h2>
-<a name="id459960"></a>
- <a href="basics.html#phoenix.basics.stl_and_higher_order_functions">STL and higher
+<a name="phoenix.basics.stl_and_higher_order_functions"></a><h3>
+<a name="id763771"></a>
+ <a class="link" href="basics.html#phoenix.basics.stl_and_higher_order_functions">STL and higher
order functions</a>
- </h2>
+ </h3>
<p>
So, what's all the fuss? What makes partial function application so useful?
- Recall our original example in the <a href="starter_kit.html" title="Starter Kit">previous
+ Recall our original example in the <a class="link" href="starter_kit.html" title="Starter Kit">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">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 <tt 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></tt> evaluates to a lambda function. <tt class="computeroutput"><span class="identifier">arg1</span></tt> is a placeholder for an argument to
+ 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> evaluates to a lambda function. <code class="computeroutput"><span class="identifier">arg1</span></code> 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 <tt class="computeroutput"><span class="identifier">find_if</span></tt>
- supplies the unsupplied argument as it loops from <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span></tt>
- to <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span></tt>.
+ function has an arity 1. It just so happens that <code class="computeroutput"><span class="identifier">find_if</span></code>
+ supplies the unsupplied argument as it loops from <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span></code>
+ to <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span></code>.
</p>
<div class="note"><table border="0" summary="Note">
<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
-<tr><td colspan="2" align="left" valign="top"><p>
+<tr><td align="left" valign="top"><p>
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.
</p></td></tr>
</table></div>
-<a name="phoenix.basics.lazy_evaluation"></a><h2>
-<a name="id460216"></a>
- Lazy Evaluation
- </h2>
+<a name="phoenix.basics.lazy_evaluation"></a><h3>
+<a name="id763976"></a>
+ <a class="link" href="basics.html#phoenix.basics.lazy_evaluation">Lazy Evaluation</a>
+ </h3>
<p>
In Phoenix, to put it more accurately, function evaluation has two stages:
</p>
-<div class="orderedlist"><ol type="1">
-<li>
- Partial application
- </li>
-<li>
- Final evaluation
- </li>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+ Partial application
+ </li>
+<li class="listitem">
+ Final evaluation
+ </li>
</ol></div>
<p>
The first stage is handled by a set of generator functions. These are your
@@ -158,17 +158,15 @@
<p>
If we look more closely, the first step involves partial function application:
</p>
-<pre class="programlisting">
-<span class="identifier">arg1</span> <span class="special">%</span> <span class="number">2</span> <span class="special">==</span> <span class="number">1</span>
+<pre class="programlisting"><span class="identifier">arg1</span> <span class="special">%</span> <span class="number">2</span> <span class="special">==</span> <span class="number">1</span>
</pre>
<p>
- The second step is the actual function invocation (done inside the <tt class="computeroutput"><span class="identifier">find_if</span></tt> function. These are the back-ends
+ The second step is the actual function invocation (done inside the <code class="computeroutput"><span class="identifier">find_if</span></code> function. These are the back-ends
(often, the final invocation is never actually seen by the client). In our
- example, the <tt class="computeroutput"><span class="identifier">find_if</span></tt>, if we
+ example, the <code class="computeroutput"><span class="identifier">find_if</span></code>, if we
take a look inside, we'll see something like:
</p>
-<pre class="programlisting">
-<span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">InputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Predicate</span><span class="special">></span>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">InputIterator</span><span class="special">,</span> <span class="keyword">class</span> <span class="identifier">Predicate</span><span class="special">></span>
<span class="identifier">InputIterator</span>
<span class="identifier">find_if</span><span class="special">(</span><span class="identifier">InputIterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">InputIterator</span> <span class="identifier">last</span><span class="special">,</span> <span class="identifier">Predicate</span> <span class="identifier">pred</span><span class="special">)</span>
<span class="special">{</span>
@@ -183,21 +181,20 @@
the first and second steps juxtaposed in order to illustrate the complete semantics
of Phoenix expressions. Examples:
</p>
-<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>
+<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></pre>
-<a name="phoenix.basics.forwarding_function_problem"></a><h2>
-<a name="id460845"></a>
- <a href="basics.html#phoenix.basics.forwarding_function_problem">Forwarding Function
+<a name="phoenix.basics.forwarding_function_problem"></a><h3>
+<a name="id764488"></a>
+ <a class="link" href="basics.html#phoenix.basics.forwarding_function_problem">Forwarding Function
Problem</a>
- </h2>
+ </h3>
<p>
Usually, we, as clients, write the call-back functions while libraries (such
- as STL) provide the callee (e.g. <tt class="computeroutput"><span class="identifier">find_if</span></tt>).
+ as STL) provide the callee (e.g. <code class="computeroutput"><span class="identifier">find_if</span></code>).
In case the role is reversed, e.g. if you have to write an STL algorithm that
takes in a predicate, or develop a GUI library that accepts event handlers,
you have to be aware of a little known problem in C++ called the "<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1385.htm" target="_top">Forwarding
@@ -206,53 +203,50 @@
<p>
Look again at the code above:
</p>
-<pre class="programlisting">
-<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>
+<pre class="programlisting"><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>
</pre>
<p>
Notice that, in the second-stage (the final evaluation), we used a variable
- <tt class="computeroutput"><span class="identifier">x</span></tt>. Be aware that the second
+ <code class="computeroutput"><span class="identifier">x</span></code>. Be aware that the second
stage cannot accept non-const temporaries and literal constants. Hence, this
will fail:
</p>
-<pre class="programlisting">
-<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="number">123</span><span class="special">)</span> <span class="comment">// Error!
+<pre class="programlisting"><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="number">123</span><span class="special">)</span> <span class="comment">// Error!
</span></pre>
<p>
Disallowing non-const rvalues partially solves the "<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1385.htm" target="_top">Forwarding
Function Problem</a>" but prohibits code like above.
</p>
-<a name="phoenix.basics.polymorphic_functions"></a><h2>
-<a name="id461055"></a>
- Polymorphic Functions
- </h2>
+<a name="phoenix.basics.polymorphic_functions"></a><h3>
+<a name="id764657"></a>
+ <a class="link" href="basics.html#phoenix.basics.polymorphic_functions">Polymorphic Functions</a>
+ </h3>
<p>
Unless otherwise noted, Phoenix generated functions are fully polymorphic.
- For instance, the <tt class="computeroutput"><span class="identifier">add</span></tt> example
+ For instance, the <code class="computeroutput"><span class="identifier">add</span></code> example
above can apply to integers, floating points, user defined complex numbers
or even strings. Example:
</p>
-<pre class="programlisting">
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">h</span><span class="special">(</span><span class="string">"Hello"</span><span class="special">);</span>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">h</span><span class="special">(</span><span class="string">"Hello"</span><span class="special">);</span>
<span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">w</span> <span class="special">=</span> <span class="string">" World"</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">r</span> <span class="special">=</span> <span class="identifier">add</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="identifier">h</span><span class="special">,</span> <span class="identifier">w</span><span class="special">);</span>
</pre>
<p>
- evaluates to <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="string">"Hello
- World"</span><span class="special">)</span></tt>. The observant
+ evaluates to <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="string">"Hello
+ World"</span><span class="special">)</span></code>. The observant
reader might notice that this function call in fact takes in heterogeneous
- arguments where <tt class="computeroutput"><span class="identifier">arg1</span></tt> is of
- type <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></tt> and <tt class="computeroutput"><span class="identifier">arg2</span></tt>
- is of type <tt class="computeroutput"><span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span></tt>. <tt class="computeroutput"><span class="identifier">add</span></tt>
- still works because the C++ standard library allows the expression <tt class="computeroutput"><span class="identifier">a</span> <span class="special">+</span> <span class="identifier">b</span></tt>
- where <tt class="computeroutput"><span class="identifier">a</span></tt> is a <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></tt>
- and <tt class="computeroutput"><span class="identifier">b</span></tt> is a <tt class="computeroutput"><span class="keyword">char</span>
- <span class="keyword">const</span><span class="special">*</span></tt>.
+ arguments where <code class="computeroutput"><span class="identifier">arg1</span></code> is of
+ type <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code> and <code class="computeroutput"><span class="identifier">arg2</span></code>
+ is of type <code class="computeroutput"><span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span></code>. <code class="computeroutput"><span class="identifier">add</span></code>
+ still works because the C++ standard library allows the expression <code class="computeroutput"><span class="identifier">a</span> <span class="special">+</span> <span class="identifier">b</span></code>
+ where <code class="computeroutput"><span class="identifier">a</span></code> is a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code>
+ and <code class="computeroutput"><span class="identifier">b</span></code> is a <code class="computeroutput"><span class="keyword">char</span>
+ <span class="keyword">const</span><span class="special">*</span></code>.
</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 Joel
+<td align="right"><div class="copyright-footer">Copyright © 2002-2005 Joel
de Guzman, Dan Marsden<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)
@@ -261,7 +255,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="starter_kit.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="organization.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="starter_kit.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="organization.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/phoenix/doc/html/phoenix/composite.html
==============================================================================
--- trunk/libs/spirit/phoenix/doc/html/phoenix/composite.html (original)
+++ trunk/libs/spirit/phoenix/doc/html/phoenix/composite.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -1,11 +1,11 @@
<html>
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Composite</title>
-<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
-<link rel="start" href="../index.html" title="Chapter 1. Phoenix 2.0">
-<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
+<link rel="stylesheet" href="../../../../../../doc/src/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 2.0">
+<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
<link rel="prev" href="primitives.html" title="Primitives">
<link rel="next" href="container.html" title="Container">
</head>
@@ -13,18 +13,19 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="primitives.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="container.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="primitives.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="container.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="phoenix.composite"></a>Composite</h2></div></div></div>
+<a name="phoenix.composite"></a><a class="link" href="composite.html" title="Composite">Composite</a>
+</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section">Function</span></dt>
<dt><span class="section">Operator</span></dt>
@@ -46,12 +47,12 @@
</p>
<div class="note"><table border="0" summary="Note">
<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
-<tr><td colspan="2" align="left" valign="top"><p>
- You can set <tt class="computeroutput"><span class="identifier">PHOENIX_COMPOSITE_LIMIT</span></tt>,
- the predefined maximum actors a composite can take. By default, <tt class="computeroutput"><span class="identifier">PHOENIX_COMPOSITE_LIMIT</span></tt> is set to <tt class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></tt> (See Actors).
+<tr><td align="left" valign="top"><p>
+ You can set <code class="computeroutput"><span class="identifier">PHOENIX_COMPOSITE_LIMIT</span></code>,
+ the predefined maximum actors a composite can take. By default, <code class="computeroutput"><span class="identifier">PHOENIX_COMPOSITE_LIMIT</span></code> is set to <code class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></code> (See <a class="link" href="actors.html" title="Actors">Actors</a>).
</p></td></tr>
</table></div>
<p>
@@ -59,14 +60,14 @@
since a composite is itself an actor. This makes the composite a recursive
structure. The actual evaluation is handled by a composite specific eval policy.
</p>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.composite.function"></a>Function</h3></div></div></div>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">function</span><span class="special">/</span><span class="identifier">function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<a name="phoenix.composite.function"></a><a class="link" href="composite.html#phoenix.composite.function" title="Function">Function</a>
+</h3></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">function</span><span class="special">/</span><span class="identifier">function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
- The <tt class="computeroutput"><span class="identifier">function</span></tt> class template
+ The <code class="computeroutput"><span class="identifier">function</span></code> class template
provides a mechanism for implementing lazily evaluated functions. Syntactically,
a lazy function looks like an ordinary C/C++ function. The function call
looks familiar and feels the same as ordinary C++ functions. However, unlike
@@ -74,34 +75,34 @@
</p>
<p>
Unlike ordinary function pointers or functor objects that need to be explicitly
- bound through the bind function (see Bind),
+ bound through the bind function (see <a class="link" href="composite.html#phoenix.composite.bind" title="Bind">Bind</a>),
the argument types of these functions are automatically lazily bound.
</p>
<p>
In order to create a lazy function, we need to implement a model of the FunctionEval
- concept. For a function that takes <tt class="computeroutput"><span class="identifier">N</span></tt>
+ concept. For a function that takes <code class="computeroutput"><span class="identifier">N</span></code>
arguments, a model of FunctionEval must provide:
</p>
-<div class="itemizedlist"><ul type="disc">
-<li>
- An <tt class="computeroutput"><span class="keyword">operator</span><span class="special">()</span></tt>
- that implements that takes <tt class="computeroutput"><span class="identifier">N</span></tt>
- arguments, and implements the function logic.
- </li>
-<li>
- A nested metafunction <tt class="computeroutput"><span class="identifier">result</span><span class="special"><</span><span class="identifier">A1</span><span class="special">,</span> <span class="special">...</span> <span class="identifier">AN</span><span class="special">></span></tt> that takes the types of the <tt class="computeroutput"><span class="identifier">N</span></tt> arguments to the function and returns
- the result type of the function. (There is a special case for function
- objects that accept no arguments. Such nullary functors are only required
- to define a typedef <tt class="computeroutput"><span class="identifier">result_type</span></tt>
- that reflects the return type of its <tt class="computeroutput"><span class="keyword">operator</span><span class="special">()</span></tt>).
- </li>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ An <code class="computeroutput"><span class="keyword">operator</span><span class="special">()</span></code>
+ that implements that takes <code class="computeroutput"><span class="identifier">N</span></code>
+ arguments, and implements the function logic.
+ </li>
+<li class="listitem">
+ A nested metafunction <code class="computeroutput"><span class="identifier">result</span><span class="special"><</span><span class="identifier">A1</span><span class="special">,</span> <span class="special">...</span> <span class="identifier">AN</span><span class="special">></span></code>
+ that takes the types of the <code class="computeroutput"><span class="identifier">N</span></code>
+ arguments to the function and returns the result type of the function.
+ (There is a special case for function objects that accept no arguments.
+ Such nullary functors are only required to define a typedef <code class="computeroutput"><span class="identifier">result_type</span></code> that reflects the return
+ type of its <code class="computeroutput"><span class="keyword">operator</span><span class="special">()</span></code>).
+ </li>
</ul></div>
<p>
For example, the following type implements the FunctionEval concept, in order
to provide a lazy factorial function:
</p>
-<pre class="programlisting">
-<span class="keyword">struct</span> <span class="identifier">factorial_impl</span>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">factorial_impl</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">struct</span> <span class="identifier">result</span>
@@ -120,28 +121,25 @@
(See factorial.cpp)
</p>
<p>
- Having implemented the <tt class="computeroutput"><span class="identifier">factorial_impl</span></tt>
- type, we can declare and instantiate a lazy <tt class="computeroutput"><span class="identifier">factorial</span></tt>
+ Having implemented the <code class="computeroutput"><span class="identifier">factorial_impl</span></code>
+ type, we can declare and instantiate a lazy <code class="computeroutput"><span class="identifier">factorial</span></code>
function this way:
</p>
-<pre class="programlisting">
-<span class="identifier">function</span><span class="special"><</span><span class="identifier">factorial_impl</span><span class="special">></span> <span class="identifier">factorial</span><span class="special">;</span>
+<pre class="programlisting"><span class="identifier">function</span><span class="special"><</span><span class="identifier">factorial_impl</span><span class="special">></span> <span class="identifier">factorial</span><span class="special">;</span>
</pre>
<p>
- Invoking a lazy function such as <tt class="computeroutput"><span class="identifier">factorial</span></tt>
- does not immediately execute the function object <tt class="computeroutput"><span class="identifier">factorial_impl</span></tt>.
- Instead, an actor object is created
+ Invoking a lazy function such as <code class="computeroutput"><span class="identifier">factorial</span></code>
+ does not immediately execute the function object <code class="computeroutput"><span class="identifier">factorial_impl</span></code>.
+ Instead, an <a class="link" href="actors.html" title="Actors">actor</a> object is created
and returned to the caller. Example:
</p>
-<pre class="programlisting">
-<span class="identifier">factorial</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">factorial</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">)</span>
</pre>
<p>
does nothing more than return an actor. A second function call will invoke
the actual factorial function. Example:
</p>
-<pre class="programlisting">
-<span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">4</span><span class="special">;</span>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">4</span><span class="special">;</span>
<span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">factorial</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">)(</span><span class="identifier">i</span><span class="special">);</span>
</pre>
<p>
@@ -152,69 +150,68 @@
instance of the model of FunctionEval may be passed on to the constructor.
Example:
</p>
-<pre class="programlisting">
-<span class="identifier">function</span><span class="special"><</span><span class="identifier">factorial_impl</span><span class="special">></span> <span class="identifier">factorial</span><span class="special">(</span><span class="identifier">ftor</span><span class="special">);</span>
+<pre class="programlisting"><span class="identifier">function</span><span class="special"><</span><span class="identifier">factorial_impl</span><span class="special">></span> <span class="identifier">factorial</span><span class="special">(</span><span class="identifier">ftor</span><span class="special">);</span>
</pre>
<p>
where ftor is an instance of factorial_impl (this is not necessary in this
- case as <tt class="computeroutput"><span class="identifier">factorial_impl</span></tt> does
+ case as <code class="computeroutput"><span class="identifier">factorial_impl</span></code> does
not require any state).
</p>
-<div class="sidebar"><p>
+<div class="sidebar">
+<p class="title"><b></b></p>
+<p>
<span class="inlinemediaobject"><img src="../images/alert.png" alt="alert"></span> Take care though when using function objects with state
because they are often copied repeatedly, and state may change in one of
the copies, rather than the original.
- </p></div>
+ </p>
</div>
-<div class="section" lang="en">
+</div>
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.composite.operator"></a>Operator</h3></div></div></div>
+<a name="phoenix.composite.operator"></a><a class="link" href="composite.html#phoenix.composite.operator" title="Operator">Operator</a>
+</h3></div></div></div>
<p>
This facility provides a mechanism for lazily evaluating operators. Syntactically,
a lazy operator looks and feels like an ordinary C/C++ infix, prefix or postfix
operator. The operator application looks the same. However, unlike ordinary
operators, the actual operator execution is deferred. Samples:
</p>
-<pre class="programlisting">
-<span class="identifier">arg1</span> <span class="special">+</span> <span class="identifier">arg2</span>
+<pre class="programlisting"><span class="identifier">arg1</span> <span class="special">+</span> <span class="identifier">arg2</span>
<span class="number">1</span> <span class="special">+</span> <span class="identifier">arg1</span> <span class="special">*</span> <span class="identifier">arg2</span>
<span class="number">1</span> <span class="special">/</span> <span class="special">-</span><span class="identifier">arg1</span>
<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 href="starter_kit.html" title="Starter Kit">Quick
+ We have seen the lazy operators in action (see <a class="link" href="starter_kit.html" title="Starter Kit">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>
+<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>
<p>
- Through operator overloading, the expression <tt 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></tt> actually
- generates an actor. This actor object is passed on to STL's <tt class="computeroutput"><span class="identifier">find_if</span></tt> function. From the viewpoint of
+ Through operator overloading, 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> actually
+ generates an actor. This actor object is passed on to STL's <code class="computeroutput"><span class="identifier">find_if</span></code> function. From the viewpoint of
STL, the composite is simply a function object expecting a single argument
- of the containers value_type. For each element in <tt class="computeroutput"><span class="identifier">c</span></tt>,
- the element is passed on as an argument <tt class="computeroutput"><span class="identifier">arg1</span></tt>
+ of the containers value_type. For each element in <code class="computeroutput"><span class="identifier">c</span></code>,
+ the element is passed on as an argument <code class="computeroutput"><span class="identifier">arg1</span></code>
to the actor (function object). The actor checks if this is an odd value
- based on the expression <tt 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></tt> where arg1 is replaced by the container's
+ based on 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> where arg1 is replaced by the container's
element.
</p>
<p>
- Like lazy functions (see function),
+ Like lazy functions (see <a class="link" href="composite.html#phoenix.composite.function" title="Function">function</a>),
lazy operators are not immediately executed when invoked. Instead, an actor
- (see actors) object is created and
+ (see <a class="link" href="actors.html" title="Actors">actors</a>) object is created and
returned to the caller. Example:
</p>
-<pre class="programlisting">
-<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="identifier">arg3</span>
+<pre class="programlisting"><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="identifier">arg3</span>
</pre>
<p>
does nothing more than return an actor. A second function call will evaluate
the actual operators. Example:
</p>
-<pre class="programlisting">
-<span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">4</span><span class="special">,</span> <span class="identifier">j</span> <span class="special">=</span> <span class="number">5</span><span class="special">,</span> <span class="identifier">k</span> <span class="special">=</span> <span class="number">6</span><span class="special">;</span>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">4</span><span class="special">,</span> <span class="identifier">j</span> <span class="special">=</span> <span class="number">5</span><span class="special">,</span> <span class="identifier">k</span> <span class="special">=</span> <span class="number">6</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="identifier">arg2</span><span class="special">)</span> <span class="special">*</span> <span class="identifier">arg3</span><span class="special">)(</span><span class="identifier">i</span><span class="special">,</span> <span class="identifier">j</span><span class="special">,</span> <span class="identifier">k</span><span class="special">);</span>
</pre>
<p>
@@ -223,114 +220,108 @@
<p>
Operator expressions are lazily evaluated following four simple rules:
</p>
-<div class="orderedlist"><ol type="1">
-<li>
- A binary operator, except <tt class="computeroutput"><span class="special">->*</span></tt>
- will be lazily evaluated when <span class="emphasis"><em>at least</em></span> one of its
- operands is an actor object (see actors).
- </li>
-<li>
- Unary operators are lazily evaluted if their argument is an actor object.
- </li>
-<li>
- Operator <tt class="computeroutput"><span class="special">->*</span></tt> is lazily
- evaluted if the left hand argument is an actor object.
- </li>
-<li>
- The result of a lazy operator is an actor object that can in turn allow
- the applications of rules 1 and 2.
- </li>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+ A binary operator, except <code class="computeroutput"><span class="special">->*</span></code>
+ will be lazily evaluated when <span class="emphasis"><em>at least</em></span> one of its
+ operands is an actor object (see <a class="link" href="actors.html" title="Actors">actors</a>).
+ </li>
+<li class="listitem">
+ Unary operators are lazily evaluted if their argument is an actor object.
+ </li>
+<li class="listitem">
+ Operator <code class="computeroutput"><span class="special">->*</span></code> is lazily
+ evaluted if the left hand argument is an actor object.
+ </li>
+<li class="listitem">
+ The result of a lazy operator is an actor object that can in turn allow
+ the applications of rules 1 and 2.
+ </li>
</ol></div>
<p>
For example, to check the following expression is lazily evaluated:
</p>
-<pre class="programlisting">
-<span class="special">-(</span><span class="identifier">arg1</span> <span class="special">+</span> <span class="number">3</span> <span class="special">+</span> <span class="number">6</span><span class="special">)</span>
+<pre class="programlisting"><span class="special">-(</span><span class="identifier">arg1</span> <span class="special">+</span> <span class="number">3</span> <span class="special">+</span> <span class="number">6</span><span class="special">)</span>
</pre>
-<div class="orderedlist"><ol type="1">
-<li>
- Following rule 1, <tt class="computeroutput"><span class="identifier">arg1</span> <span class="special">+</span> <span class="number">3</span></tt> is lazily
- evaluated since <tt class="computeroutput"><span class="identifier">arg1</span></tt> is
- an actor (see primitives).
- </li>
-<li>
- The result of this <tt class="computeroutput"><span class="identifier">arg1</span> <span class="special">+</span> <span class="number">3</span></tt> expression
- is an actor object, following rule 4.
- </li>
-<li>
- Continuing, <tt class="computeroutput"><span class="identifier">arg1</span> <span class="special">+</span>
- <span class="number">3</span> <span class="special">+</span> <span class="number">6</span></tt> is again lazily evaluated. Rule 2.
- </li>
-<li>
- By rule 4 again, the result of <tt class="computeroutput"><span class="identifier">arg1</span>
- <span class="special">+</span> <span class="number">3</span> <span class="special">+</span> <span class="number">6</span></tt> is an
- actor object.
- </li>
-<li>
- As <tt class="computeroutput"><span class="identifier">arg1</span> <span class="special">+</span>
- <span class="number">3</span> <span class="special">+</span> <span class="number">6</span></tt> is an actor, <tt class="computeroutput"><span class="special">-(</span><span class="identifier">arg1</span> <span class="special">+</span> <span class="number">3</span> <span class="special">+</span> <span class="number">6</span><span class="special">)</span></tt> is lazily evaluated. Rule 2.
- </li>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+ Following rule 1, <code class="computeroutput"><span class="identifier">arg1</span> <span class="special">+</span> <span class="number">3</span></code> is
+ lazily evaluated since <code class="computeroutput"><span class="identifier">arg1</span></code>
+ is an actor (see <a class="link" href="primitives.html" title="Primitives">primitives</a>).
+ </li>
+<li class="listitem">
+ The result of this <code class="computeroutput"><span class="identifier">arg1</span> <span class="special">+</span> <span class="number">3</span></code> expression
+ is an actor object, following rule 4.
+ </li>
+<li class="listitem">
+ Continuing, <code class="computeroutput"><span class="identifier">arg1</span> <span class="special">+</span>
+ <span class="number">3</span> <span class="special">+</span> <span class="number">6</span></code> is again lazily evaluated. Rule 2.
+ </li>
+<li class="listitem">
+ By rule 4 again, the result of <code class="computeroutput"><span class="identifier">arg1</span>
+ <span class="special">+</span> <span class="number">3</span> <span class="special">+</span> <span class="number">6</span></code> is
+ an actor object.
+ </li>
+<li class="listitem">
+ As <code class="computeroutput"><span class="identifier">arg1</span> <span class="special">+</span>
+ <span class="number">3</span> <span class="special">+</span> <span class="number">6</span></code> is an actor, <code class="computeroutput"><span class="special">-(</span><span class="identifier">arg1</span> <span class="special">+</span> <span class="number">3</span> <span class="special">+</span> <span class="number">6</span><span class="special">)</span></code> is lazily evaluated. Rule 2.
+ </li>
</ol></div>
<p>
Lazy-operator application is highly contagious. In most cases, a single
- <tt class="computeroutput"><span class="identifier">argN</span></tt> actor infects all its
+ <code class="computeroutput"><span class="identifier">argN</span></code> actor infects all its
immediate neighbors within a group (first level or parenthesized expression).
</p>
<p>
Note that at least one operand of any operator must be a valid actor for
lazy evaluation to take effect. To force lazy evaluation of an ordinary expression,
- we can use <tt class="computeroutput"><span class="identifier">ref</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></tt>, <tt class="computeroutput"><span class="identifier">val</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></tt> or <tt class="computeroutput"><span class="identifier">cref</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></tt>
- to transform an operand into a valid actor object (see primitives.
+ we can use <code class="computeroutput"><span class="identifier">ref</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>, <code class="computeroutput"><span class="identifier">val</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code> or <code class="computeroutput"><span class="identifier">cref</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ to transform an operand into a valid actor object (see <a class="link" href="primitives.html" title="Primitives">primitives</a>.
For example:
</p>
-<pre class="programlisting">
-<span class="number">1</span> <span class="special"><<</span> <span class="number">3</span><span class="special">;</span> <span class="comment">// Immediately evaluated
+<pre class="programlisting"><span class="number">1</span> <span class="special"><<</span> <span class="number">3</span><span class="special">;</span> <span class="comment">// Immediately evaluated
</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.composite.operator.supported_operators"></a><h2>
-<a name="id469184"></a>
- <a href="composite.html#phoenix.composite.operator.supported_operators">Supported
+<a name="phoenix.composite.operator.supported_operators"></a><h3>
+<a name="id771576"></a>
+ <a class="link" href="composite.html#phoenix.composite.operator.supported_operators">Supported
operators</a>
- </h2>
-<a name="phoenix.composite.operator.unary_operators"></a><h3>
-<a name="id469209"></a>
- Unary operators
</h3>
-<pre class="programlisting">
-<span class="identifier">prefix</span><span class="special">:</span> <span class="special">~,</span> <span class="special">!,</span> <span class="special">-,</span> <span class="special">+,</span> <span class="special">++,</span> <span class="special">--,</span> <span class="special">&</span> <span class="special">(</span><span class="identifier">reference</span><span class="special">),</span> <span class="special">*</span> <span class="special">(</span><span class="identifier">dereference</span><span class="special">)</span>
+<a name="phoenix.composite.operator.unary_operators"></a><h4>
+<a name="id771597"></a>
+ <a class="link" href="composite.html#phoenix.composite.operator.unary_operators">Unary operators</a>
+ </h4>
+<pre class="programlisting"><span class="identifier">prefix</span><span class="special">:</span> <span class="special">~,</span> <span class="special">!,</span> <span class="special">-,</span> <span class="special">+,</span> <span class="special">++,</span> <span class="special">--,</span> <span class="special">&</span> <span class="special">(</span><span class="identifier">reference</span><span class="special">),</span> <span class="special">*</span> <span class="special">(</span><span class="identifier">dereference</span><span class="special">)</span>
<span class="identifier">postfix</span><span class="special">:</span> <span class="special">++,</span> <span class="special">--</span>
</pre>
-<a name="phoenix.composite.operator.binary_operators"></a><h3>
-<a name="id469357"></a>
- Binary operators
- </h3>
-<pre class="programlisting">
-<span class="special">=,</span> <span class="special">[],</span> <span class="special">+=,</span> <span class="special">-=,</span> <span class="special">*=,</span> <span class="special">/=,</span> <span class="special">%=,</span> <span class="special">&=,</span> <span class="special">|=,</span> <span class="special">^=,</span> <span class="special"><<=,</span> <span class="special">>>=</span>
+<a name="phoenix.composite.operator.binary_operators"></a><h4>
+<a name="id771727"></a>
+ <a class="link" href="composite.html#phoenix.composite.operator.binary_operators">Binary operators</a>
+ </h4>
+<pre class="programlisting"><span class="special">=,</span> <span class="special">[],</span> <span class="special">+=,</span> <span class="special">-=,</span> <span class="special">*=,</span> <span class="special">/=,</span> <span class="special">%=,</span> <span class="special">&=,</span> <span class="special">|=,</span> <span class="special">^=,</span> <span class="special"><<=,</span> <span class="special">>>=</span>
<span class="special">+,</span> <span class="special">-,</span> <span class="special">*,</span> <span class="special">/,</span> <span class="special">%,</span> <span class="special">&,</span> <span class="special">|,</span> <span class="special">^,</span> <span class="special"><<,</span> <span class="special">>></span>
<span class="special">==,</span> <span class="special">!=,</span> <span class="special"><,</span> <span class="special">>,</span> <span class="special"><=,</span> <span class="special">>=</span>
<span class="special">&&,</span> <span class="special">||,</span> <span class="special">->*</span>
</pre>
-<a name="phoenix.composite.operator.ternary_operator"></a><h3>
-<a name="id469580"></a>
- Ternary operator
- </h3>
-<pre class="programlisting">
-<span class="identifier">if_else</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">)</span>
+<a name="phoenix.composite.operator.ternary_operator"></a><h4>
+<a name="id771926"></a>
+ <a class="link" href="composite.html#phoenix.composite.operator.ternary_operator">Ternary operator</a>
+ </h4>
+<pre class="programlisting"><span class="identifier">if_else</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">)</span>
</pre>
<p>
The ternary operator deserves special mention. Since C++ does not allow us
- to overload the conditional expression: <tt class="computeroutput"><span class="identifier">c</span>
- <span class="special">?</span> <span class="identifier">a</span> <span class="special">:</span> <span class="identifier">b</span></tt>, the
+ to overload the conditional expression: <code class="computeroutput"><span class="identifier">c</span>
+ <span class="special">?</span> <span class="identifier">a</span> <span class="special">:</span> <span class="identifier">b</span></code>, the
if_else pseudo function is provided for this purpose. The behavior is identical,
albeit in a lazy manner.
</p>
-<a name="phoenix.composite.operator.member_pointer_operator"></a><h3>
-<a name="id469700"></a>
- <a href="composite.html#phoenix.composite.operator.member_pointer_operator">Member
+<a name="phoenix.composite.operator.member_pointer_operator"></a><h4>
+<a name="id772030"></a>
+ <a class="link" href="composite.html#phoenix.composite.operator.member_pointer_operator">Member
pointer operator</a>
- </h3>
-<pre class="programlisting">
-<span class="identifier">a</span><span class="special">->*</span><span class="identifier">member_object_pointer</span>
+ </h4>
+<pre class="programlisting"><span class="identifier">a</span><span class="special">->*</span><span class="identifier">member_object_pointer</span>
<span class="identifier">a</span><span class="special">->*</span><span class="identifier">member_function_pointer</span>
</pre>
<p>
@@ -342,8 +333,7 @@
If the right hand side is a member object pointer, the result is an actor
which, when evaluated, returns a reference to that member. For example:
</p>
-<pre class="programlisting">
-<span class="keyword">struct</span> <span class="identifier">A</span>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span>
<span class="special">{</span>
<span class="keyword">int</span> <span class="identifier">member</span><span class="special">;</span>
<span class="special">};</span>
@@ -357,8 +347,7 @@
If the right hand side is a member function pointer, the result is an actor
which, when invoked, calls the specified member function. For example:
</p>
-<pre class="programlisting">
-<span class="keyword">struct</span> <span class="identifier">A</span>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">A</span>
<span class="special">{</span>
<span class="keyword">int</span> <span class="identifier">func</span><span class="special">(</span><span class="keyword">int</span><span class="special">);</span>
<span class="special">};</span>
@@ -369,140 +358,142 @@
<span class="special">(</span><span class="identifier">arg1</span><span class="special">->*&</span><span class="identifier">A</span><span class="special">::</span><span class="identifier">func</span><span class="special">)(</span><span class="identifier">arg2</span><span class="special">)(</span><span class="identifier">a</span><span class="special">,</span> <span class="identifier">i</span><span class="special">);</span> <span class="comment">// returns a->func(i)
</span></pre>
<div class="table">
-<a name="id470127"></a><p class="title"><b>Table 1.4. Include Files</b></p>
-<table class="table" summary="Include Files">
+<a name="id772403"></a><p class="title"><b>Table 1.4. Include Files</b></p>
+<div class="table-contents"><table class="table" summary="Include Files">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
- <p>
- Operators
- </p>
- </th>
+ <p>
+ Operators
+ </p>
+ </th>
<th>
- <p>
- File
- </p>
- </th>
+ <p>
+ File
+ </p>
+ </th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="special">-</span></tt>, <tt class="computeroutput"><span class="special">+</span></tt>,
- <tt class="computeroutput"><span class="special">++</span></tt>, <tt class="computeroutput"><span class="special">--</span></tt>,
- <tt class="computeroutput"><span class="special">+=</span></tt>, <tt class="computeroutput"><span class="special">-=</span></tt>,
- <tt class="computeroutput"><span class="special">*=</span></tt>, <tt class="computeroutput"><span class="special">/=</span></tt>,
- <tt class="computeroutput"><span class="special">%=</span></tt>, <tt class="computeroutput"><span class="special">*</span></tt>,
- <tt class="computeroutput"><span class="special">/</span></tt>, <tt class="computeroutput"><span class="special">%</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="special">-</span></code>, <code class="computeroutput"><span class="special">+</span></code>,
+ <code class="computeroutput"><span class="special">++</span></code>, <code class="computeroutput"><span class="special">--</span></code>, <code class="computeroutput"><span class="special">+=</span></code>,
+ <code class="computeroutput"><span class="special">-=</span></code>, <code class="computeroutput"><span class="special">*=</span></code>, <code class="computeroutput"><span class="special">/=</span></code>,
+ <code class="computeroutput"><span class="special">%=</span></code>, <code class="computeroutput"><span class="special">*</span></code>, <code class="computeroutput"><span class="special">/</span></code>,
+ <code class="computeroutput"><span class="special">%</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="keyword">operator</span><span class="special">/</span><span class="identifier">arithmetic</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
- </p>
- </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">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="keyword">operator</span><span class="special">/</span><span class="identifier">arithmetic</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="special">&=</span></tt>, <tt class="computeroutput"><span class="special">|=</span></tt>, <tt class="computeroutput"><span class="special">^=</span></tt>,
- <tt class="computeroutput"><span class="special"><<=</span></tt>, <tt class="computeroutput"><span class="special">>>=</span></tt>, <tt class="computeroutput"><span class="special">&</span></tt>,
- <tt class="computeroutput"><span class="special">|</span></tt>, <tt class="computeroutput"><span class="special">^</span></tt>,
- <tt class="computeroutput"><span class="special"><<</span></tt>, <tt class="computeroutput"><span class="special">>></span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="special">&=</span></code>, <code class="computeroutput"><span class="special">|=</span></code>, <code class="computeroutput"><span class="special">^=</span></code>,
+ <code class="computeroutput"><span class="special"><<=</span></code>, <code class="computeroutput"><span class="special">>>=</span></code>, <code class="computeroutput"><span class="special">&</span></code>,
+ <code class="computeroutput"><span class="special">|</span></code>, <code class="computeroutput"><span class="special">^</span></code>,
+ <code class="computeroutput"><span class="special"><<</span></code>, <code class="computeroutput"><span class="special">>></span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="keyword">operator</span><span class="special">/</span><span class="identifier">bitwise</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
- </p>
- </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">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="keyword">operator</span><span class="special">/</span><span class="identifier">bitwise</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="special">==</span></tt>, <tt class="computeroutput"><span class="special">!=</span></tt>,
- <tt class="computeroutput"><span class="special"><</span></tt>, <tt class="computeroutput"><span class="special"><=</span></tt>,
- <tt class="computeroutput"><span class="special">></span></tt>, <tt class="computeroutput"><span class="special">>=</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="special">==</span></code>, <code class="computeroutput"><span class="special">!=</span></code>, <code class="computeroutput"><span class="special"><</span></code>,
+ <code class="computeroutput"><span class="special"><=</span></code>, <code class="computeroutput"><span class="special">></span></code>, <code class="computeroutput"><span class="special">>=</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="keyword">operator</span><span class="special">/</span><span class="identifier">comparison</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
- </p>
- </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">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="keyword">operator</span><span class="special">/</span><span class="identifier">comparison</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="special"><<</span></tt>, <tt class="computeroutput"><span class="special">>></span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="special"><<</span></code>, <code class="computeroutput"><span class="special">>></span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="keyword">operator</span><span class="special">/</span><span class="identifier">io</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
- </p>
- </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">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="keyword">operator</span><span class="special">/</span><span class="identifier">io</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="special">!</span></tt>, &&, <tt class="computeroutput"><span class="special">||</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="special">!</span></code>, &&, <code class="computeroutput"><span class="special">||</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="keyword">operator</span><span class="special">/</span><span class="identifier">logical</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
- </p>
- </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">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="keyword">operator</span><span class="special">/</span><span class="identifier">logical</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="special">&</span><span class="identifier">x</span></tt>,
- <tt class="computeroutput"><span class="special">*</span><span class="identifier">p</span></tt>,
- <tt class="computeroutput"><span class="special">=</span></tt>, <tt class="computeroutput"><span class="special">[]</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="special">&</span><span class="identifier">x</span></code>,
+ <code class="computeroutput"><span class="special">*</span><span class="identifier">p</span></code>,
+ <code class="computeroutput"><span class="special">=</span></code>, <code class="computeroutput"><span class="special">[]</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="keyword">operator</span><span class="special">/</span><span class="identifier">self</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
- </p>
- </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">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="keyword">operator</span><span class="special">/</span><span class="identifier">self</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">if_else</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span> <span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">if_else</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span>
+ <span class="identifier">a</span><span class="special">,</span>
+ <span class="identifier">b</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="keyword">operator</span><span class="special">/</span><span class="identifier">if_else</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
- </p>
- </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">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="keyword">operator</span><span class="special">/</span><span class="identifier">if_else</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="special">->*</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="special">->*</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="keyword">operator</span><span class="special">/</span><span class="identifier">member</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
- </p>
- </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">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="keyword">operator</span><span class="special">/</span><span class="identifier">member</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
+ </p>
+ </td>
</tr>
</tbody>
-</table>
+</table></div>
</div>
+<br class="table-break">
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.composite.statement"></a>Statement</h3></div></div></div>
+<a name="phoenix.composite.statement"></a><a class="link" href="composite.html#phoenix.composite.statement" title="Statement">Statement</a>
+</h3></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="composite.html#phoenix.composite.statement.block_statement">Block
Statement</a></span></dt>
@@ -519,7 +510,7 @@
<dt><span class="section">throw_</span></dt>
</dl></div>
<p>
- <span class="bold"><b><span class="emphasis"><em>Lazy statements...</em></span></b></span>
+ <span class="bold"><strong><span class="emphasis"><em>Lazy statements...</em></span></strong></span>
</p>
<p>
The primitives and composite building blocks presented so far are sufficiently
@@ -527,11 +518,10 @@
functions and lazy-operators. How about lazy-statements? First, an appetizer:
</p>
<p>
- Print all odd-numbered contents of an STL container using <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span></tt>
+ Print all odd-numbered contents of an STL container using <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span></code>
(all_odds.cpp):
</p>
-<pre class="programlisting">
-<span class="identifier">for_each</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>
+<pre class="programlisting"><span class="identifier">for_each</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">if_</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="special">[</span>
<span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">arg1</span> <span class="special"><<</span> <span class="char">' '</span>
@@ -544,18 +534,18 @@
<p>
Yes, it is valid C++. The sample code above is as close as you can get to
the syntax of C++. This stylized C++ syntax differs from actual C++ code.
- First, the <tt class="computeroutput"><span class="keyword">if</span></tt> has a trailing
+ First, the <code class="computeroutput"><span class="keyword">if</span></code> has a trailing
underscore. Second, the block uses square brackets instead of the familiar
curly braces {}.
</p>
<div class="note"><table border="0" summary="Note">
<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
-<tr><td colspan="2" align="left" valign="top">
+<tr><td align="left" valign="top">
<p>
- <span class="bold"><b>C++ in C++?</b></span>
+ <span class="bold"><strong>C++ in C++?</strong></span>
</p>
<p>
In as much as Spirit
@@ -566,31 +556,28 @@
<p>
Here are more examples with annotations. The code almost speaks for itself.
</p>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h4 class="title">
-<a name="phoenix.composite.statement.block_statement"></a><a href="composite.html#phoenix.composite.statement.block_statement" title="Block
- Statement">Block
- Statement</a></h4></div></div></div>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">statement</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<a name="phoenix.composite.statement.block_statement"></a><a class="link" href="composite.html#phoenix.composite.statement.block_statement" title="Block Statement">Block
+ Statement</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">statement</span><span class="special">/</span><span class="identifier">sequence</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
Syntax:
</p>
-<pre class="programlisting">
-<span class="identifier">statement</span><span class="special">,</span>
+<pre class="programlisting"><span class="identifier">statement</span><span class="special">,</span>
<span class="identifier">statement</span><span class="special">,</span>
<span class="special">....</span>
<span class="identifier">statement</span>
</pre>
<p>
Basically, these are comma separated statements. Take note that unlike
- the C/C++ semicolon, the comma is a separator put <span class="bold"><b>in-between</b></span>
+ the C/C++ semicolon, the comma is a separator put <span class="bold"><strong>in-between</strong></span>
statements. This is like Pascal's semicolon separator, rather than C/C++'s
semicolon terminator. For example:
</p>
-<pre class="programlisting">
-<span class="identifier">statement</span><span class="special">,</span>
+<pre class="programlisting"><span class="identifier">statement</span><span class="special">,</span>
<span class="identifier">statement</span><span class="special">,</span>
<span class="identifier">statement</span><span class="special">,</span> <span class="comment">// ERROR!
</span></pre>
@@ -599,8 +586,7 @@
can be grouped using the parentheses. Again, the last statement in a group
should not have a trailing comma.
</p>
-<pre class="programlisting">
-<span class="identifier">statement</span><span class="special">,</span>
+<pre class="programlisting"><span class="identifier">statement</span><span class="special">,</span>
<span class="identifier">statement</span><span class="special">,</span>
<span class="special">(</span>
<span class="identifier">statement</span><span class="special">,</span>
@@ -611,8 +597,7 @@
<p>
Outside the square brackets, block statements should be grouped. For example:
</p>
-<pre class="programlisting">
-<span class="identifier">for_each</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>
+<pre class="programlisting"><span class="identifier">for_each</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">do_this</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">),</span>
<span class="identifier">do_that</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">)</span>
@@ -627,34 +612,32 @@
chain (and spits out an error for zero arguments).
</p>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h4 class="title">
-<a name="phoenix.composite.statement.if__statement"></a>if_ Statement</h4></div></div></div>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">statement</span><span class="special">/</span><span class="keyword">if</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<a name="phoenix.composite.statement.if__statement"></a><a class="link" href="composite.html#phoenix.composite.statement.if__statement" title="if_ Statement">if_ Statement</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">statement</span><span class="special">/</span><span class="keyword">if</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
- We have seen the <tt class="computeroutput"><span class="identifier">if_</span></tt> statement.
+ We have seen the <code class="computeroutput"><span class="identifier">if_</span></code> statement.
The syntax is:
</p>
-<pre class="programlisting">
-<span class="identifier">if_</span><span class="special">(</span><span class="identifier">conditional_expression</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">if_</span><span class="special">(</span><span class="identifier">conditional_expression</span><span class="special">)</span>
<span class="special">[</span>
<span class="identifier">sequenced_statements</span>
<span class="special">]</span>
</pre>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h4 class="title">
-<a name="phoenix.composite.statement.if_else__statement"></a>ifelse statement</h4></div></div></div>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">statement</span><span class="special">/</span><span class="keyword">if</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<a name="phoenix.composite.statement.if_else__statement"></a><a class="link" href="composite.html#phoenix.composite.statement.if_else__statement" title="ifelse statement">if<span class="underline">else</span> statement</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">statement</span><span class="special">/</span><span class="keyword">if</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
The syntax is
</p>
-<pre class="programlisting">
-<span class="identifier">if_</span><span class="special">(</span><span class="identifier">conditional_expression</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">if_</span><span class="special">(</span><span class="identifier">conditional_expression</span><span class="special">)</span>
<span class="special">[</span>
<span class="identifier">sequenced_statements</span>
<span class="special">]</span>
@@ -664,16 +647,15 @@
<span class="special">]</span>
</pre>
<p>
- Take note that <tt class="computeroutput"><span class="keyword">else</span></tt> has a
- leading dot and a trailing underscore: <tt class="computeroutput"><span class="special">.</span><span class="identifier">else_</span></tt>
+ Take note that <code class="computeroutput"><span class="keyword">else</span></code> has a
+ leading dot and a trailing underscore: <code class="computeroutput"><span class="special">.</span><span class="identifier">else_</span></code>
</p>
<p>
- Example: This code prints out all the elements and appends <tt class="computeroutput"><span class="string">" > 5"</span></tt>, <tt class="computeroutput"><span class="string">"
- == 5"</span></tt> or <tt class="computeroutput"><span class="string">" < 5"</span></tt>
+ Example: This code prints out all the elements and appends <code class="computeroutput"><span class="string">" > 5"</span></code>, <code class="computeroutput"><span class="string">"
+ == 5"</span></code> or <code class="computeroutput"><span class="string">" < 5"</span></code>
depending on the element's actual value:
</p>
-<pre class="programlisting">
-<span class="identifier">for_each</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>
+<pre class="programlisting"><span class="identifier">for_each</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">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">cout</span> <span class="special"><<</span> <span class="identifier">arg1</span> <span class="special"><<</span> <span class="string">" > 5\n"</span>
@@ -692,23 +674,21 @@
<span class="special">);</span>
</pre>
<p>
- Notice how the <tt class="computeroutput"><span class="identifier">if_else_</span></tt>
+ Notice how the <code class="computeroutput"><span class="identifier">if_else_</span></code>
statement is nested.
</p>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h4 class="title">
-<a name="phoenix.composite.statement.switch__statement"></a><a href="composite.html#phoenix.composite.statement.switch__statement" title="switch_
- statement">switch_
- statement</a></h4></div></div></div>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">statement</span><span class="special">/</span><span class="keyword">switch</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<a name="phoenix.composite.statement.switch__statement"></a><a class="link" href="composite.html#phoenix.composite.statement.switch__statement" title="switch_ statement">switch_
+ statement</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">statement</span><span class="special">/</span><span class="keyword">switch</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
The syntax is:
</p>
-<pre class="programlisting">
-<span class="identifier">switch_</span><span class="special">(</span><span class="identifier">integral_expression</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">switch_</span><span class="special">(</span><span class="identifier">integral_expression</span><span class="special">)</span>
<span class="special">[</span>
<span class="identifier">case_</span><span class="special"><</span><span class="identifier">integral_value</span><span class="special">>(</span><span class="identifier">sequenced_statements</span><span class="special">),</span>
<span class="special">...</span>
@@ -720,12 +700,11 @@
Note unlike a normal switch statement, cases do not fall through.
</p>
<p>
- Example: This code prints out <tt class="computeroutput"><span class="string">"one"</span></tt>,
- <tt class="computeroutput"><span class="string">"two"</span></tt> or <tt class="computeroutput"><span class="string">"other value"</span></tt> depending on the
+ Example: This code prints out <code class="computeroutput"><span class="string">"one"</span></code>,
+ <code class="computeroutput"><span class="string">"two"</span></code> or <code class="computeroutput"><span class="string">"other value"</span></code> depending on the
element's actual value:
</p>
-<pre class="programlisting">
-<span class="identifier">for_each</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>
+<pre class="programlisting"><span class="identifier">for_each</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">switch_</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">)</span>
<span class="special">[</span>
<span class="identifier">case_</span><span class="special"><</span><span class="number">1</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="string">"one"</span><span class="special">)</span> <span class="special"><<</span> <span class="char">'\n'</span><span class="special">),</span>
@@ -735,19 +714,17 @@
<span class="special">);</span>
</pre>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h4 class="title">
-<a name="phoenix.composite.statement.while__statement"></a><a href="composite.html#phoenix.composite.statement.while__statement" title="while_
- Statement">while_
- Statement</a></h4></div></div></div>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">statement</span><span class="special">/</span><span class="keyword">while</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<a name="phoenix.composite.statement.while__statement"></a><a class="link" href="composite.html#phoenix.composite.statement.while__statement" title="while_ Statement">while_
+ Statement</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">statement</span><span class="special">/</span><span class="keyword">while</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
The syntax is:
</p>
-<pre class="programlisting">
-<span class="identifier">while_</span><span class="special">(</span><span class="identifier">conditional_expression</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">while_</span><span class="special">(</span><span class="identifier">conditional_expression</span><span class="special">)</span>
<span class="special">[</span>
<span class="identifier">sequenced_statements</span>
<span class="special">]</span>
@@ -757,8 +734,7 @@
out the number at each step. A newline terminates the printout of each
value.
</p>
-<pre class="programlisting">
-<span class="identifier">for_each</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>
+<pre class="programlisting"><span class="identifier">for_each</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">while_</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">--)</span>
<span class="special">[</span>
@@ -769,32 +745,30 @@
<span class="special">);</span>
</pre>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h4 class="title">
-<a name="phoenix.composite.statement.do_while__statement"></a>dowhile Statement</h4></div></div></div>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">statement</span><span class="special">/</span><span class="identifier">do_while</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<a name="phoenix.composite.statement.do_while__statement"></a><a class="link" href="composite.html#phoenix.composite.statement.do_while__statement" title="dowhile Statement">do<span class="underline">while</span> Statement</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">statement</span><span class="special">/</span><span class="identifier">do_while</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
The syntax is:
</p>
-<pre class="programlisting">
-<span class="identifier">do_</span>
+<pre class="programlisting"><span class="identifier">do_</span>
<span class="special">[</span>
<span class="identifier">sequenced_statements</span>
<span class="special">]</span>
<span class="special">.</span><span class="identifier">while_</span><span class="special">(</span><span class="identifier">conditional_expression</span><span class="special">)</span>
</pre>
<p>
- Again, take note that <tt class="computeroutput"><span class="keyword">while</span></tt>
- has a leading dot and a trailing underscore: <tt class="computeroutput"><span class="special">.</span><span class="identifier">while_</span></tt>
+ Again, take note that <code class="computeroutput"><span class="keyword">while</span></code>
+ has a leading dot and a trailing underscore: <code class="computeroutput"><span class="special">.</span><span class="identifier">while_</span></code>
</p>
<p>
Example: This code is almost the same as the previous example above with
a slight twist in logic.
</p>
-<pre class="programlisting">
-<span class="identifier">for_each</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>
+<pre class="programlisting"><span class="identifier">for_each</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">do_</span>
<span class="special">[</span>
@@ -806,17 +780,16 @@
<span class="special">);</span>
</pre>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h4 class="title">
-<a name="phoenix.composite.statement.for__statement"></a>for_ Statement</h4></div></div></div>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">statement</span><span class="special">/</span><span class="keyword">for</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<a name="phoenix.composite.statement.for__statement"></a><a class="link" href="composite.html#phoenix.composite.statement.for__statement" title="for_ Statement">for_ Statement</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">statement</span><span class="special">/</span><span class="keyword">for</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
The syntax is:
</p>
-<pre class="programlisting">
-<span class="identifier">for_</span><span class="special">(</span><span class="identifier">init_statement</span><span class="special">,</span> <span class="identifier">conditional_expression</span><span class="special">,</span> <span class="identifier">step_statement</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">for_</span><span class="special">(</span><span class="identifier">init_statement</span><span class="special">,</span> <span class="identifier">conditional_expression</span><span class="special">,</span> <span class="identifier">step_statement</span><span class="special">)</span>
<span class="special">[</span>
<span class="identifier">sequenced_statements</span>
<span class="special">]</span>
@@ -825,14 +798,13 @@
It is again very similar to the C++ for statement. Take note that the init_statement,
conditional_expression and step<span class="underline">statement are
separated by the comma instead of the semi-colon and each must be present
- (i.e. `for</span>(,,)` is invalid). This is a case where the nothing actor can be useful.
+ (i.e. `for</span>(,,)` is invalid). This is a case where the <a class="link" href="primitives.html#phoenix.primitives.nothing" title="Nothing">nothing</a> actor can be useful.
</p>
<p>
Example: This code prints each element N times where N is the element's
value. A newline terminates the printout of each value.
</p>
-<pre class="programlisting">
-<span class="keyword">int</span> <span class="identifier">iii</span><span class="special">;</span>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">iii</span><span class="special">;</span>
<span class="identifier">for_each</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">for_</span><span class="special">(</span><span class="identifier">ref</span><span class="special">(</span><span class="identifier">iii</span><span class="special">)</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span> <span class="identifier">ref</span><span class="special">(</span><span class="identifier">iii</span><span class="special">)</span> <span class="special"><</span> <span class="identifier">arg1</span><span class="special">,</span> <span class="special">++</span><span class="identifier">ref</span><span class="special">(</span><span class="identifier">iii</span><span class="special">))</span>
@@ -846,33 +818,31 @@
<p>
As before, all these are lazily evaluated. The result of such statements
are in fact composites that are passed on to STL's for_each function. In
- the viewpoint of <tt class="computeroutput"><span class="identifier">for_each</span></tt>,
+ the viewpoint of <code class="computeroutput"><span class="identifier">for_each</span></code>,
what was passed is just a functor, no more, no less.
</p>
<div class="note"><table border="0" summary="Note">
<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
-<tr><td colspan="2" align="left" valign="top"><p>
+<tr><td align="left" valign="top"><p>
Unlike lazy functions and lazy operators, lazy statements always return
void.
</p></td></tr>
</table></div>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h4 class="title">
-<a name="phoenix.composite.statement.try__catch__statement"></a><a href="composite.html#phoenix.composite.statement.try__catch__statement" title="try_
- catch_ Statement">try_
- catch_ Statement</a></h4></div></div></div>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">statement</span><span class="special">/</span><span class="identifier">try_catch</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<a name="phoenix.composite.statement.try__catch__statement"></a><a class="link" href="composite.html#phoenix.composite.statement.try__catch__statement" title="try_ catch_ Statement">try_
+ catch_ Statement</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">statement</span><span class="special">/</span><span class="identifier">try_catch</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
The syntax is:
</p>
-<pre class="programlisting">
-<span class="identifier">try_</span>
+<pre class="programlisting"><span class="identifier">try_</span>
<span class="special">[</span>
<span class="identifier">sequenced_statements</span>
<span class="special">]</span>
@@ -891,12 +861,11 @@
required after the catch.
</p>
<p>
- Example: The following code calls the (lazy) function <tt class="computeroutput"><span class="identifier">f</span></tt>
+ Example: The following code calls the (lazy) function <code class="computeroutput"><span class="identifier">f</span></code>
for each element, and prints messages about different exception types it
catches.
</p>
-<pre class="programlisting">
-<span class="identifier">try_</span>
+<pre class="programlisting"><span class="identifier">try_</span>
<span class="special">[</span>
<span class="identifier">f</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">)</span>
<span class="special">]</span>
@@ -914,11 +883,11 @@
<span class="special">]</span>
</pre>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h4 class="title">
-<a name="phoenix.composite.statement.throw_"></a>throw_</h4></div></div></div>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">statement</span><span class="special">/</span><span class="keyword">throw</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<a name="phoenix.composite.statement.throw_"></a><a class="link" href="composite.html#phoenix.composite.statement.throw_" title="throw_">throw_</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">statement</span><span class="special">/</span><span class="keyword">throw</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
As a natural companion to the try/catch support, the statement module provides
@@ -927,22 +896,19 @@
<p>
The syntax to throw an exception is:
</p>
-<pre class="programlisting">
-<span class="identifier">throw_</span><span class="special">(</span><span class="identifier">exception_expression</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">throw_</span><span class="special">(</span><span class="identifier">exception_expression</span><span class="special">)</span>
</pre>
<p>
The syntax to rethrow an exception is:
</p>
-<pre class="programlisting">
-<span class="identifier">throw_</span><span class="special">()</span>
+<pre class="programlisting"><span class="identifier">throw_</span><span class="special">()</span>
</pre>
<p>
Example: This code extends the try/catch example, rethrowing exceptions
derived from runtime_error or exception, and translating other exception
types to runtime_errors.
</p>
-<pre class="programlisting">
-<span class="identifier">try_</span>
+<pre class="programlisting"><span class="identifier">try_</span>
<span class="special">[</span>
<span class="identifier">f</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">)</span>
<span class="special">]</span>
@@ -964,30 +930,29 @@
</pre>
</div>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.composite.object"></a>Object</h3></div></div></div>
+<a name="phoenix.composite.object"></a><a class="link" href="composite.html#phoenix.composite.object" title="Object">Object</a>
+</h3></div></div></div>
<p>
The Object module deals with object construction, destruction and conversion.
The module provides <span class="emphasis"><em>"lazy"</em></span> versions of C++'s
- object constructor, <tt class="computeroutput"><span class="keyword">new</span></tt>, <tt class="computeroutput"><span class="keyword">delete</span></tt>, <tt class="computeroutput"><span class="keyword">static_cast</span></tt>,
- <tt class="computeroutput"><span class="keyword">dynamic_cast</span></tt>, <tt class="computeroutput"><span class="keyword">const_cast</span></tt> and <tt class="computeroutput"><span class="keyword">reinterpret_cast</span></tt>.
+ object constructor, <code class="computeroutput"><span class="keyword">new</span></code>, <code class="computeroutput"><span class="keyword">delete</span></code>, <code class="computeroutput"><span class="keyword">static_cast</span></code>,
+ <code class="computeroutput"><span class="keyword">dynamic_cast</span></code>, <code class="computeroutput"><span class="keyword">const_cast</span></code> and <code class="computeroutput"><span class="keyword">reinterpret_cast</span></code>.
</p>
-<a name="phoenix.composite.object.construction"></a><h2>
-<a name="id475908"></a>
- Construction
- </h2>
+<a name="phoenix.composite.object.construction"></a><h3>
+<a name="id777481"></a>
+ <a class="link" href="composite.html#phoenix.composite.object.construction">Construction</a>
+ </h3>
<p>
- <span class="bold"><b><span class="emphasis"><em>Lazy constructors...</em></span></b></span>
+ <span class="bold"><strong><span class="emphasis"><em>Lazy constructors...</em></span></strong></span>
</p>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">object</span><span class="special">/</span><span class="identifier">construct</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">object</span><span class="special">/</span><span class="identifier">construct</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
Lazily construct an object from an arbitrary set of arguments:
</p>
-<pre class="programlisting">
-<span class="identifier">construct</span><span class="special"><</span><span class="identifier">T</span><span class="special">>(</span><span class="identifier">ctor_arg1</span><span class="special">,</span> <span class="identifier">ctor_arg2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">ctor_argN</span><span class="special">);</span>
+<pre class="programlisting"><span class="identifier">construct</span><span class="special"><</span><span class="identifier">T</span><span class="special">>(</span><span class="identifier">ctor_arg1</span><span class="special">,</span> <span class="identifier">ctor_arg2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">ctor_argN</span><span class="special">);</span>
</pre>
<p>
where the given parameters are the parameters to the contructor of the object
@@ -997,41 +962,38 @@
<p>
Example:
</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>
+<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>
</pre>
<p>
- Constructs a <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></tt> from <tt class="computeroutput"><span class="identifier">arg1</span></tt>
- and <tt class="computeroutput"><span class="identifier">arg2</span></tt>.
+ Constructs a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code> from <code class="computeroutput"><span class="identifier">arg1</span></code>
+ and <code class="computeroutput"><span class="identifier">arg2</span></code>.
</p>
<div class="note"><table border="0" summary="Note">
<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
-<tr><td colspan="2" align="left" valign="top"><p>
+<tr><td align="left" valign="top"><p>
The maximum number of actual parameters is limited by the preprocessor
constant PHOENIX_COMPOSITE_LIMIT. Note though, that this limit should not
- be greater than PHOENIX_LIMIT. By default, <tt class="computeroutput"><span class="identifier">PHOENIX_COMPOSITE_LIMIT</span></tt>
- is set to <tt class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></tt>
- (See Actors).
+ be greater than PHOENIX_LIMIT. By default, <code class="computeroutput"><span class="identifier">PHOENIX_COMPOSITE_LIMIT</span></code>
+ is set to <code class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></code>
+ (See <a class="link" href="actors.html" title="Actors">Actors</a>).
</p></td></tr>
</table></div>
-<a name="phoenix.composite.object.new"></a><h2>
-<a name="id476272"></a>
- New
- </h2>
+<a name="phoenix.composite.object.new"></a><h3>
+<a name="id777797"></a>
+ <a class="link" href="composite.html#phoenix.composite.object.new">New</a>
+ </h3>
<p>
- <span class="bold"><b><span class="emphasis"><em>Lazy new...</em></span></b></span>
+ <span class="bold"><strong><span class="emphasis"><em>Lazy new...</em></span></strong></span>
</p>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">object</span><span class="special">/</span><span class="keyword">new</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">object</span><span class="special">/</span><span class="keyword">new</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
Lazily construct an object, on the heap, from an arbitrary set of arguments:
</p>
-<pre class="programlisting">
-<span class="identifier">new_</span><span class="special"><</span><span class="identifier">T</span><span class="special">>(</span><span class="identifier">ctor_arg1</span><span class="special">,</span> <span class="identifier">ctor_arg2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">ctor_argN</span><span class="special">);</span>
+<pre class="programlisting"><span class="identifier">new_</span><span class="special"><</span><span class="identifier">T</span><span class="special">>(</span><span class="identifier">ctor_arg1</span><span class="special">,</span> <span class="identifier">ctor_arg2</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">ctor_argN</span><span class="special">);</span>
</pre>
<p>
where the given parameters are the parameters to the contructor of the object
@@ -1041,38 +1003,35 @@
<p>
Example:
</p>
-<pre class="programlisting">
-<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">// note the spelling of new_ (with trailing underscore)
+<pre class="programlisting"><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">// note the spelling of new_ (with trailing underscore)
</span></pre>
<p>
- Creates a <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></tt> from <tt class="computeroutput"><span class="identifier">arg1</span></tt>
- and <tt class="computeroutput"><span class="identifier">arg2</span></tt> on the heap.
+ Creates a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code> from <code class="computeroutput"><span class="identifier">arg1</span></code>
+ and <code class="computeroutput"><span class="identifier">arg2</span></code> on the heap.
</p>
<div class="note"><table border="0" summary="Note">
<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
-<tr><td colspan="2" align="left" valign="top"><p>
+<tr><td align="left" valign="top"><p>
Again, the maximum number of actual parameters is limited by the preprocessor
constant PHOENIX_COMPOSITE_LIMIT. See the note above.
</p></td></tr>
</table></div>
-<a name="phoenix.composite.object.delete"></a><h2>
-<a name="id476608"></a>
- Delete
- </h2>
+<a name="phoenix.composite.object.delete"></a><h3>
+<a name="id778089"></a>
+ <a class="link" href="composite.html#phoenix.composite.object.delete">Delete</a>
+ </h3>
<p>
- <span class="bold"><b><span class="emphasis"><em>Lazy delete...</em></span></b></span>
+ <span class="bold"><strong><span class="emphasis"><em>Lazy delete...</em></span></strong></span>
</p>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">object</span><span class="special">/</span><span class="keyword">delete</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">object</span><span class="special">/</span><span class="keyword">delete</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
Lazily delete an object, from the heap:
</p>
-<pre class="programlisting">
-<span class="identifier">delete_</span><span class="special">(</span><span class="identifier">arg</span><span class="special">);</span>
+<pre class="programlisting"><span class="identifier">delete_</span><span class="special">(</span><span class="identifier">arg</span><span class="special">);</span>
</pre>
<p>
where arg is assumed to be a pointer to an object.
@@ -1080,18 +1039,16 @@
<p>
Example:
</p>
-<pre class="programlisting">
-<span class="identifier">delete_</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="comment">// note the spelling of delete_ (with trailing underscore)
+<pre class="programlisting"><span class="identifier">delete_</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="comment">// note the spelling of delete_ (with trailing underscore)
</span></pre>
-<a name="phoenix.composite.object.casts"></a><h2>
-<a name="id476828"></a>
- Casts
- </h2>
+<a name="phoenix.composite.object.casts"></a><h3>
+<a name="id778280"></a>
+ <a class="link" href="composite.html#phoenix.composite.object.casts">Casts</a>
+ </h3>
<p>
- <span class="bold"><b><span class="emphasis"><em>Lazy casts...</em></span></b></span>
+ <span class="bold"><strong><span class="emphasis"><em>Lazy casts...</em></span></strong></span>
</p>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">object</span><span class="special">/</span><span class="keyword">static_cast</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">object</span><span class="special">/</span><span class="keyword">static_cast</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">object</span><span class="special">/</span><span class="keyword">dynamic_cast</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">object</span><span class="special">/</span><span class="keyword">const_cast</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">object</span><span class="special">/</span><span class="keyword">reinterpret_cast</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
@@ -1102,8 +1059,7 @@
known C++ casts. Take note however that the lazy versions have a trailing
underscore.
</p>
-<pre class="programlisting">
-<span class="identifier">static_cast_</span><span class="special"><</span><span class="identifier">T</span><span class="special">>(</span><span class="identifier">lambda_expression</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">static_cast_</span><span class="special"><</span><span class="identifier">T</span><span class="special">>(</span><span class="identifier">lambda_expression</span><span class="special">)</span>
<span class="identifier">dynamic_cast_</span><span class="special"><</span><span class="identifier">T</span><span class="special">>(</span><span class="identifier">lambda_expression</span><span class="special">)</span>
<span class="identifier">const_cast_</span><span class="special"><</span><span class="identifier">T</span><span class="special">>(</span><span class="identifier">lambda_expression</span><span class="special">)</span>
<span class="identifier">reinterpret_cast_</span><span class="special"><</span><span class="identifier">T</span><span class="special">>(</span><span class="identifier">lambda_expression</span><span class="special">)</span>
@@ -1111,17 +1067,17 @@
<p>
Example:
</p>
-<pre class="programlisting">
-<span class="identifier">static_cast_</span><span class="special"><</span><span class="identifier">Base</span><span class="special">*>(&</span><span class="identifier">arg1</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">static_cast_</span><span class="special"><</span><span class="identifier">Base</span><span class="special">*>(&</span><span class="identifier">arg1</span><span class="special">)</span>
</pre>
<p>
- Static-casts the address of <tt class="computeroutput"><span class="identifier">arg1</span></tt>
- to a <tt class="computeroutput"><span class="identifier">Base</span><span class="special">*</span></tt>.
+ Static-casts the address of <code class="computeroutput"><span class="identifier">arg1</span></code>
+ to a <code class="computeroutput"><span class="identifier">Base</span><span class="special">*</span></code>.
</p>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.composite.scope"></a>Scope</h3></div></div></div>
+<a name="phoenix.composite.scope"></a><a class="link" href="composite.html#phoenix.composite.scope" title="Scope">Scope</a>
+</h3></div></div></div>
<p>
Up until now, the most basic ingredient is missing: creation of and access
to local variables in the stack. When recursion comes into play, you will
@@ -1140,107 +1096,97 @@
<p>
This section deals with local variables and nested lambda scopes.
</p>
-<a name="phoenix.composite.scope.local_variables"></a><h2>
-<a name="id477747"></a>
- Local Variables
- </h2>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">scope</span><span class="special">/</span><span class="identifier">local_variable</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<a name="phoenix.composite.scope.local_variables"></a><h3>
+<a name="id778838"></a>
+ <a class="link" href="composite.html#phoenix.composite.scope.local_variables">Local Variables</a>
+ </h3>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">scope</span><span class="special">/</span><span class="identifier">local_variable</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
We use an instance of:
</p>
-<pre class="programlisting">
-<span class="identifier">actor</span><span class="special"><</span><span class="identifier">local_variable</span><span class="special"><</span><span class="identifier">Key</span><span class="special">></span> <span class="special">></span>
+<pre class="programlisting"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">local_variable</span><span class="special"><</span><span class="identifier">Key</span><span class="special">></span> <span class="special">></span>
</pre>
<p>
to represent a local variable. The local variable acts as an imaginary data-bin
- where a local, stack based data will be placed. <tt class="computeroutput"><span class="identifier">Key</span></tt>
+ where a local, stack based data will be placed. <code class="computeroutput"><span class="identifier">Key</span></code>
is an arbitrary type that is used to identify the local variable. Example:
</p>
-<pre class="programlisting">
-<span class="keyword">struct</span> <span class="identifier">size_key</span><span class="special">;</span>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">size_key</span><span class="special">;</span>
<span class="identifier">actor</span><span class="special"><</span><span class="identifier">local_variable</span><span class="special"><</span><span class="identifier">size_key</span><span class="special">></span> <span class="special">></span> <span class="identifier">size</span><span class="special">;</span>
</pre>
-<a name="phoenix.composite.scope.predefined_local_variables"></a><h2>
-<a name="id477871"></a>
- <a href="composite.html#phoenix.composite.scope.predefined_local_variables">Predefined
+<a name="phoenix.composite.scope.predefined_local_variables"></a><h3>
+<a name="id779063"></a>
+ <a class="link" href="composite.html#phoenix.composite.scope.predefined_local_variables">Predefined
Local Variables</a>
- </h2>
+ </h3>
<p>
- There are a few predefined instances of <tt class="computeroutput"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">local_variable</span><span class="special"><</span><span class="identifier">Key</span><span class="special">></span> <span class="special">></span></tt>
- named <tt class="computeroutput"><span class="identifier">_a</span></tt>..<tt class="computeroutput"><span class="identifier">_z</span></tt>
- that you can already use. To make use of them, simply use the <tt class="computeroutput"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">phoenix</span><span class="special">::</span><span class="identifier">local_names</span></tt>:
- </p>
-<pre class="programlisting">
-<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">phoenix</span><span class="special">::</span><span class="identifier">local_names</span><span class="special">;</span>
-</pre>
-<a name="phoenix.composite.scope.let"></a><h2>
-<a name="id478058"></a>
- let
- </h2>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">scope</span><span class="special">/</span><span class="identifier">let</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+ There are a few predefined instances of <code class="computeroutput"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">local_variable</span><span class="special"><</span><span class="identifier">Key</span><span class="special">></span> <span class="special">></span></code>
+ named <code class="computeroutput"><span class="identifier">_a</span></code>..<code class="computeroutput"><span class="identifier">_z</span></code>
+ that you can already use. To make use of them, simply use the <code class="computeroutput"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">phoenix</span><span class="special">::</span><span class="identifier">local_names</span></code>:
+ </p>
+<pre class="programlisting"><span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">phoenix</span><span class="special">::</span><span class="identifier">local_names</span><span class="special">;</span>
+</pre>
+<a name="phoenix.composite.scope.let"></a><h3>
+<a name="id779228"></a>
+ <a class="link" href="composite.html#phoenix.composite.scope.let">let</a>
+ </h3>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">scope</span><span class="special">/</span><span class="identifier">let</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
You declare local variables using the syntax:
</p>
-<pre class="programlisting">
-<span class="identifier">let</span><span class="special">(</span><span class="identifier">local</span><span class="special">-</span><span class="identifier">declarations</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">let</span><span class="special">(</span><span class="identifier">local</span><span class="special">-</span><span class="identifier">declarations</span><span class="special">)</span>
<span class="special">[</span>
<span class="identifier">let</span><span class="special">-</span><span class="identifier">body</span>
<span class="special">]</span>
</pre>
<p>
- <tt class="computeroutput"><span class="identifier">let</span></tt> allows 1..N local variable
- declarations (where N == <tt class="computeroutput"><span class="identifier">PHOENIX_LOCAL_LIMIT</span></tt>).
+ <code class="computeroutput"><span class="identifier">let</span></code> allows 1..N local variable
+ declarations (where N == <code class="computeroutput"><span class="identifier">PHOENIX_LOCAL_LIMIT</span></code>).
Each declaration follows the form:
</p>
-<pre class="programlisting">
-<span class="identifier">local</span><span class="special">-</span><span class="identifier">id</span> <span class="special">=</span> <span class="identifier">lambda</span><span class="special">-</span><span class="identifier">expression</span>
+<pre class="programlisting"><span class="identifier">local</span><span class="special">-</span><span class="identifier">id</span> <span class="special">=</span> <span class="identifier">lambda</span><span class="special">-</span><span class="identifier">expression</span>
</pre>
<div class="note"><table border="0" summary="Note">
<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
-<tr><td colspan="2" align="left" valign="top"><p>
- You can set <tt class="computeroutput"><span class="identifier">PHOENIX_LOCAL_LIMIT</span></tt>,
+<tr><td align="left" valign="top"><p>
+ You can set <code class="computeroutput"><span class="identifier">PHOENIX_LOCAL_LIMIT</span></code>,
the predefined maximum local variable declarations in a let expression.
- By default, <tt class="computeroutput"><span class="identifier">PHOENIX_LOCAL_LIMIT</span></tt>
- is set to <tt class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></tt>.
+ By default, <code class="computeroutput"><span class="identifier">PHOENIX_LOCAL_LIMIT</span></code>
+ is set to <code class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></code>.
</p></td></tr>
</table></div>
<p>
Example:
</p>
-<pre class="programlisting">
-<span class="identifier">let</span><span class="special">(</span><span class="identifier">_a</span> <span class="special">=</span> <span class="number">123</span><span class="special">,</span> <span class="identifier">_b</span> <span class="special">=</span> <span class="number">456</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">let</span><span class="special">(</span><span class="identifier">_a</span> <span class="special">=</span> <span class="number">123</span><span class="special">,</span> <span class="identifier">_b</span> <span class="special">=</span> <span class="number">456</span><span class="special">)</span>
<span class="special">[</span>
<span class="identifier">_a</span> <span class="special">+</span> <span class="identifier">_b</span>
<span class="special">]</span>
</pre>
-<a name="phoenix.composite.scope.reference_preservation"></a><h2>
-<a name="id478463"></a>
- <a href="composite.html#phoenix.composite.scope.reference_preservation">Reference
+<a name="phoenix.composite.scope.reference_preservation"></a><h3>
+<a name="id779579"></a>
+ <a class="link" href="composite.html#phoenix.composite.scope.reference_preservation">Reference
Preservation</a>
- </h2>
+ </h3>
<p>
The type of the local variable assumes the type of the lambda- expression.
Type deduction is reference preserving. For example:
</p>
-<pre class="programlisting">
-<span class="identifier">let</span><span class="special">(</span><span class="identifier">_a</span> <span class="special">=</span> <span class="identifier">arg1</span><span class="special">,</span> <span class="identifier">_b</span> <span class="special">=</span> <span class="number">456</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">let</span><span class="special">(</span><span class="identifier">_a</span> <span class="special">=</span> <span class="identifier">arg1</span><span class="special">,</span> <span class="identifier">_b</span> <span class="special">=</span> <span class="number">456</span><span class="special">)</span>
</pre>
<p>
- <tt class="computeroutput"><span class="identifier">_a</span></tt> assumes the type of <tt class="computeroutput"><span class="identifier">arg1</span></tt>: a reference to an argument, while
- <tt class="computeroutput"><span class="identifier">_b</span></tt> has type <tt class="computeroutput"><span class="keyword">int</span></tt>.
+ <code class="computeroutput"><span class="identifier">_a</span></code> assumes the type of <code class="computeroutput"><span class="identifier">arg1</span></code>: a reference to an argument, while
+ <code class="computeroutput"><span class="identifier">_b</span></code> has type <code class="computeroutput"><span class="keyword">int</span></code>.
</p>
<p>
Consider this:
</p>
-<pre class="programlisting">
-<span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span>
<span class="identifier">let</span><span class="special">(</span><span class="identifier">_a</span> <span class="special">=</span> <span class="identifier">arg1</span><span class="special">)</span>
<span class="special">[</span>
@@ -1256,8 +1202,7 @@
<p>
While with this:
</p>
-<pre class="programlisting">
-<span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span>
<span class="identifier">let</span><span class="special">(</span><span class="identifier">_a</span> <span class="special">=</span> <span class="identifier">val</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">))</span>
<span class="special">[</span>
@@ -1272,20 +1217,19 @@
</p>
<p>
Reference preservation is necessary because we need to have L-value access
- to outer lambda-scopes (especially the arguments). <tt class="computeroutput"><span class="identifier">arg</span></tt>s
- and <tt class="computeroutput"><span class="identifier">ref</span></tt>s are L-values. <tt class="computeroutput"><span class="identifier">val</span></tt>s are R-values.
+ to outer lambda-scopes (especially the arguments). <code class="computeroutput"><span class="identifier">arg</span></code>s
+ and <code class="computeroutput"><span class="identifier">ref</span></code>s are L-values. <code class="computeroutput"><span class="identifier">val</span></code>s are R-values.
</p>
-<a name="phoenix.composite.scope.visibility"></a><h2>
-<a name="id479015"></a>
- Visibility
- </h2>
+<a name="phoenix.composite.scope.visibility"></a><h3>
+<a name="id780063"></a>
+ <a class="link" href="composite.html#phoenix.composite.scope.visibility">Visibility</a>
+ </h3>
<p>
The scope and lifetimes of the local variables is limited within the let-body.
- <tt class="computeroutput"><span class="identifier">let</span></tt> blocks can be nested.
+ <code class="computeroutput"><span class="identifier">let</span></code> blocks can be nested.
A local variable may hide an outer local variable. For example:
</p>
-<pre class="programlisting">
-<span class="identifier">let</span><span class="special">(</span><span class="identifier">_x</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="string">", World"</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">let</span><span class="special">(</span><span class="identifier">_x</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="string">", World"</span><span class="special">)</span>
<span class="special">[</span>
<span class="comment">// _x here is an int: 1
</span>
@@ -1300,8 +1244,7 @@
refer to any LHS local-id. At this point, the local-ids are not in scope
yet; they will only be in scope in the let-body. The code below is in error:
</p>
-<pre class="programlisting">
-<span class="identifier">let</span><span class="special">(</span>
+<pre class="programlisting"><span class="identifier">let</span><span class="special">(</span>
<span class="identifier">_a</span> <span class="special">=</span> <span class="number">1</span>
<span class="special">,</span> <span class="identifier">_b</span> <span class="special">=</span> <span class="identifier">_a</span> <span class="comment">// Error: _a is not in scope yet
</span><span class="special">)</span>
@@ -1316,8 +1259,7 @@
the let, the RHS of a local-declaration can refer to a local variable of
an outer scope:
</p>
-<pre class="programlisting">
-<span class="identifier">let</span><span class="special">(</span><span class="identifier">_a</span> <span class="special">=</span> <span class="number">1</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">let</span><span class="special">(</span><span class="identifier">_a</span> <span class="special">=</span> <span class="number">1</span><span class="special">)</span>
<span class="special">[</span>
<span class="identifier">let</span><span class="special">(</span>
<span class="identifier">_a</span> <span class="special">=</span> <span class="number">1</span>
@@ -1328,20 +1270,18 @@
<span class="special">]</span>
<span class="special">]</span>
</pre>
-<a name="phoenix.composite.scope.lambda"></a><h2>
-<a name="id479480"></a>
- lambda
- </h2>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">scope</span><span class="special">/</span><span class="identifier">lambda</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<a name="phoenix.composite.scope.lambda"></a><h3>
+<a name="id780472"></a>
+ <a class="link" href="composite.html#phoenix.composite.scope.lambda">lambda</a>
+ </h3>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">scope</span><span class="special">/</span><span class="identifier">lambda</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
A lot of times, you'd want to write a lazy function that accepts one or more
functions (higher order functions). STL algorithms come to mind, for example.
- Consider a lazy version of <tt class="computeroutput"><span class="identifier">stl</span><span class="special">::</span><span class="identifier">for_each</span></tt>:
+ Consider a lazy version of <code class="computeroutput"><span class="identifier">stl</span><span class="special">::</span><span class="identifier">for_each</span></code>:
</p>
-<pre class="programlisting">
-<span class="keyword">struct</span> <span class="identifier">for_each_impl</span>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">for_each_impl</span>
<span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">C</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">F</span><span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">result</span>
@@ -1359,28 +1299,26 @@
<span class="identifier">function</span><span class="special"><</span><span class="identifier">for_each_impl</span><span class="special">></span> <span class="keyword">const</span> <span class="identifier">for_each</span> <span class="special">=</span> <span class="identifier">for_each_impl</span><span class="special">();</span>
</pre>
<p>
- Notice that the function accepts another function, <tt class="computeroutput"><span class="identifier">f</span></tt>
- as an argument. The scope of this function, <tt class="computeroutput"><span class="identifier">f</span></tt>,
- is limited within the <tt class="computeroutput"><span class="keyword">operator</span><span class="special">()</span></tt>. When <tt class="computeroutput"><span class="identifier">f</span></tt>
- is called inside <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span></tt>, it exists in a new scope, along
+ Notice that the function accepts another function, <code class="computeroutput"><span class="identifier">f</span></code>
+ as an argument. The scope of this function, <code class="computeroutput"><span class="identifier">f</span></code>,
+ is limited within the <code class="computeroutput"><span class="keyword">operator</span><span class="special">()</span></code>. When <code class="computeroutput"><span class="identifier">f</span></code>
+ is called inside <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span></code>, it exists in a new scope, along
with new arguments and, possibly, local variables. This new scope is not
- at all related to the outer scopes beyond the <tt class="computeroutput"><span class="keyword">operator</span><span class="special">()</span></tt>.
+ at all related to the outer scopes beyond the <code class="computeroutput"><span class="keyword">operator</span><span class="special">()</span></code>.
</p>
<p>
Simple syntax:
</p>
-<pre class="programlisting">
-<span class="identifier">lambda</span>
+<pre class="programlisting"><span class="identifier">lambda</span>
<span class="special">[</span>
<span class="identifier">lambda</span><span class="special">-</span><span class="identifier">body</span>
<span class="special">]</span>
</pre>
<p>
- Like <tt class="computeroutput"><span class="identifier">let</span></tt>, local variables
- may be declared, allowing 1..N local variable declarations (where N == <tt class="computeroutput"><span class="identifier">PHOENIX_LOCAL_LIMIT</span></tt>):
+ Like <code class="computeroutput"><span class="identifier">let</span></code>, local variables
+ may be declared, allowing 1..N local variable declarations (where N == <code class="computeroutput"><span class="identifier">PHOENIX_LOCAL_LIMIT</span></code>):
</p>
-<pre class="programlisting">
-<span class="identifier">lambda</span><span class="special">(</span><span class="identifier">local</span><span class="special">-</span><span class="identifier">declarations</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">lambda</span><span class="special">(</span><span class="identifier">local</span><span class="special">-</span><span class="identifier">declarations</span><span class="special">)</span>
<span class="special">[</span>
<span class="identifier">lambda</span><span class="special">-</span><span class="identifier">body</span>
<span class="special">]</span>
@@ -1391,56 +1329,53 @@
to any LHS local-id. The local-ids are not in scope yet; they will be in
scope only in the lambda-body:
</p>
-<pre class="programlisting">
-<span class="identifier">lambda</span><span class="special">(</span>
+<pre class="programlisting"><span class="identifier">lambda</span><span class="special">(</span>
<span class="identifier">_a</span> <span class="special">=</span> <span class="number">1</span>
<span class="special">,</span> <span class="identifier">_b</span> <span class="special">=</span> <span class="identifier">_a</span> <span class="comment">// Error: _a is not in scope yet
</span><span class="special">)</span>
</pre>
<p>
- See <a href="composite.html#phoenix.composite.scope.visibility"><tt class="computeroutput"><span class="identifier">let</span></tt>
+ See <a class="link" href="composite.html#phoenix.composite.scope.visibility"><code class="computeroutput"><span class="identifier">let</span></code>
Visibility</a> above for more information.
</p>
<p>
- Example: Using our lazy <tt class="computeroutput"><span class="identifier">for_each</span></tt>
+ Example: Using our lazy <code class="computeroutput"><span class="identifier">for_each</span></code>
let's print all the elements in a container:
</p>
-<pre class="programlisting">
-<span class="identifier">for_each</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">,</span> <span class="identifier">lambda</span><span class="special">[</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">arg1</span><span class="special">])</span>
+<pre class="programlisting"><span class="identifier">for_each</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">,</span> <span class="identifier">lambda</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>
As far as the arguments are concerned (arg1..argN), the scope in which the
- lambda-body exists is totally new. The left <tt class="computeroutput"><span class="identifier">arg1</span></tt>
- refers to the argument passed to <tt class="computeroutput"><span class="identifier">for_each</span></tt>
- (a container). The right <tt class="computeroutput"><span class="identifier">arg1</span></tt>
- refers to the argument passed by <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span></tt>
- when we finally get to call <tt class="computeroutput"><span class="keyword">operator</span><span class="special">()</span></tt> in our <tt class="computeroutput"><span class="identifier">for_each_impl</span></tt>
+ lambda-body exists is totally new. The left <code class="computeroutput"><span class="identifier">arg1</span></code>
+ refers to the argument passed to <code class="computeroutput"><span class="identifier">for_each</span></code>
+ (a container). The right <code class="computeroutput"><span class="identifier">arg1</span></code>
+ refers to the argument passed by <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span></code>
+ when we finally get to call <code class="computeroutput"><span class="keyword">operator</span><span class="special">()</span></code> in our <code class="computeroutput"><span class="identifier">for_each_impl</span></code>
above (a container element).
</p>
<p>
Yet, we may wish to get information from outer scopes. While we do not have
access to arguments in outer scopes, what we still have is access to local
variables from outer scopes. We may only be able to pass argument related
- information from outer <tt class="computeroutput"><span class="identifier">lambda</span></tt>
+ information from outer <code class="computeroutput"><span class="identifier">lambda</span></code>
scopes through the local variables.
</p>
<div class="note"><table border="0" summary="Note">
<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
-<tr><td colspan="2" align="left" valign="top"><p>
- This is a crucial difference between <tt class="computeroutput"><span class="identifier">let</span></tt>
- and <tt class="computeroutput"><span class="identifier">lambda</span></tt>: <tt class="computeroutput"><span class="identifier">let</span></tt> does not introduce new arguments;
- <tt class="computeroutput"><span class="identifier">lambda</span></tt> does.
+<tr><td align="left" valign="top"><p>
+ This is a crucial difference between <code class="computeroutput"><span class="identifier">let</span></code>
+ and <code class="computeroutput"><span class="identifier">lambda</span></code>: <code class="computeroutput"><span class="identifier">let</span></code> does not introduce new arguments;
+ <code class="computeroutput"><span class="identifier">lambda</span></code> does.
</p></td></tr>
</table></div>
<p>
- Another example: Using our lazy <tt class="computeroutput"><span class="identifier">for_each</span></tt>,
- and a lazy <tt class="computeroutput"><span class="identifier">push_back</span></tt>:
+ Another example: Using our lazy <code class="computeroutput"><span class="identifier">for_each</span></code>,
+ and a lazy <code class="computeroutput"><span class="identifier">push_back</span></code>:
</p>
-<pre class="programlisting">
-<span class="keyword">struct</span> <span class="identifier">push_back_impl</span>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">push_back_impl</span>
<span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">C</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">result</span>
@@ -1460,22 +1395,21 @@
<p>
write a lambda expression that accepts:
</p>
-<div class="orderedlist"><ol type="1">
-<li>
- a 2-dimensional container (e.g. <tt class="computeroutput"><span class="identifier">vector</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="special">></span></tt>)
- </li>
-<li>
- a container element (e.g. <tt class="computeroutput"><span class="keyword">int</span></tt>)
- </li>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+ a 2-dimensional container (e.g. <code class="computeroutput"><span class="identifier">vector</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="special">></span></code>)
+ </li>
+<li class="listitem">
+ a container element (e.g. <code class="computeroutput"><span class="keyword">int</span></code>)
+ </li>
</ol></div>
<p>
- and pushes-back the element to each of the <tt class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></tt>.
+ and pushes-back the element to each of the <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></code>.
</p>
<p>
Solution:
</p>
-<pre class="programlisting">
-<span class="identifier">for_each</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">,</span>
+<pre class="programlisting"><span class="identifier">for_each</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">,</span>
<span class="identifier">lambda</span><span class="special">(</span><span class="identifier">_a</span> <span class="special">=</span> <span class="identifier">arg2</span><span class="special">)</span>
<span class="special">[</span>
<span class="identifier">push_back</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">,</span> <span class="identifier">_a</span><span class="special">)</span>
@@ -1484,150 +1418,139 @@
</pre>
<p>
Since we do not have access to the arguments of the outer scopes beyond the
- lambda-body, we introduce a local variable <tt class="computeroutput"><span class="identifier">_a</span></tt>
- that captures the second outer argument: <tt class="computeroutput"><span class="identifier">arg2</span></tt>.
+ lambda-body, we introduce a local variable <code class="computeroutput"><span class="identifier">_a</span></code>
+ that captures the second outer argument: <code class="computeroutput"><span class="identifier">arg2</span></code>.
Hence: _a = arg2. This local variable is visible inside the lambda scope.
</p>
<p>
(See lambda.cpp)
</p>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.composite.bind"></a>Bind</h3></div></div></div>
+<a name="phoenix.composite.bind"></a><a class="link" href="composite.html#phoenix.composite.bind" title="Bind">Bind</a>
+</h3></div></div></div>
<p>
<span class="emphasis"><em>Binding</em></span> is the act of tying together a function to some
- arguments for deferred (lazy) evaluation. Named <a href="composite.html#phoenix.composite.function" title="Function">Lazy
+ arguments for deferred (lazy) evaluation. Named <a class="link" href="composite.html#phoenix.composite.function" title="Function">Lazy
functions</a> require a bit of typing. Unlike (unnamed) lambda expressions,
we need to write a functor somewhere offline, detached from the call site.
If you wish to transform a plain function, member function or member variable
- to a lambda expression, <tt class="computeroutput"><span class="identifier">bind</span></tt>
+ to a lambda expression, <code class="computeroutput"><span class="identifier">bind</span></code>
is your friend.
</p>
<div class="note"><table border="0" summary="Note">
<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
-<tr><td colspan="2" align="left" valign="top"><p>
+<tr><td align="left" valign="top"><p>
Take note that binders are monomorphic. Rather than binding functions,
- the preferred way is to write true generic and polymorphic lazy-functions.
+ the preferred way is to write true generic and polymorphic <a class="link" href="composite.html#phoenix.composite.function" title="Function">lazy-functions</a>.
However, since most of the time we are dealing with adaptation of exisiting
code, binders get the job done faster.
</p></td></tr>
</table></div>
<p>
- There is a set of overloaded <tt class="computeroutput"><span class="identifier">bind</span></tt>
- template functions. Each <tt class="computeroutput"><span class="identifier">bind</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></tt>
- function generates a suitable binder object, a composite.
- </p>
-<a name="phoenix.composite.bind.binding_functions"></a><h2>
-<a name="id481353"></a>
- Binding Functions
- </h2>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">bind</span><span class="special">/</span><span class="identifier">bind_function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+ There is a set of overloaded <code class="computeroutput"><span class="identifier">bind</span></code>
+ template functions. Each <code class="computeroutput"><span class="identifier">bind</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code>
+ function generates a suitable binder object, a <a class="link" href="composite.html" title="Composite">composite</a>.
+ </p>
+<a name="phoenix.composite.bind.binding_functions"></a><h3>
+<a name="id782121"></a>
+ <a class="link" href="composite.html#phoenix.composite.bind.binding_functions">Binding Functions</a>
+ </h3>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">bind</span><span class="special">/</span><span class="identifier">bind_function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
- Example, given a function <tt class="computeroutput"><span class="identifier">foo</span></tt>:
+ Example, given a function <code class="computeroutput"><span class="identifier">foo</span></code>:
</p>
-<pre class="programlisting">
-<span class="keyword">void</span> <span class="identifier">foo</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">n</span><span class="special">)</span>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">foo</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">n</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">n</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="special">}</span>
</pre>
<p>
- Here's how the function <tt class="computeroutput"><span class="identifier">foo</span></tt>
+ Here's how the function <code class="computeroutput"><span class="identifier">foo</span></code>
may be bound:
</p>
-<pre class="programlisting">
-<span class="identifier">bind</span><span class="special">(&</span><span class="identifier">foo</span><span class="special">,</span> <span class="identifier">arg1</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">bind</span><span class="special">(&</span><span class="identifier">foo</span><span class="special">,</span> <span class="identifier">arg1</span><span class="special">)</span>
</pre>
<p>
- This is now a full-fledged composite
+ This is now a full-fledged <a class="link" href="composite.html" title="Composite">composite</a>
that can finally be evaluated by another function call invocation. A second
- function call will invoke the actual <tt class="computeroutput"><span class="identifier">foo</span></tt>
+ function call will invoke the actual <code class="computeroutput"><span class="identifier">foo</span></code>
function. Example:
</p>
-<pre class="programlisting">
-<span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">4</span><span class="special">;</span>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">4</span><span class="special">;</span>
<span class="identifier">bind</span><span class="special">(&</span><span class="identifier">foo</span><span class="special">,</span> <span class="identifier">arg1</span><span class="special">)(</span><span class="identifier">i</span><span class="special">);</span>
</pre>
<p>
will print out "4".
</p>
-<a name="phoenix.composite.bind.binding_member_functions"></a><h2>
-<a name="id481759"></a>
- <a href="composite.html#phoenix.composite.bind.binding_member_functions">Binding Member
+<a name="phoenix.composite.bind.binding_member_functions"></a><h3>
+<a name="id782474"></a>
+ <a class="link" href="composite.html#phoenix.composite.bind.binding_member_functions">Binding Member
Functions</a>
- </h2>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">bind</span><span class="special">/</span><span class="identifier">bind_member_function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+ </h3>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">bind</span><span class="special">/</span><span class="identifier">bind_member_function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
Binding member functions can be done similarly. A bound member function takes
in a pointer or reference to an object as the first argument. For instance,
given:
</p>
-<pre class="programlisting">
-<span class="keyword">struct</span> <span class="identifier">xyz</span>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">xyz</span>
<span class="special">{</span>
<span class="keyword">void</span> <span class="identifier">foo</span><span class="special">(</span><span class="keyword">int</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="special">};</span>
</pre>
<p>
- <tt class="computeroutput"><span class="identifier">xyz</span></tt>'s <tt class="computeroutput"><span class="identifier">foo</span></tt>
+ <code class="computeroutput"><span class="identifier">xyz</span></code>'s <code class="computeroutput"><span class="identifier">foo</span></code>
member function can be bound as:
</p>
-<pre class="programlisting">
-<span class="identifier">bind</span><span class="special">(&</span><span class="identifier">xyz</span><span class="special">::</span><span class="identifier">foo</span><span class="special">,</span> <span class="identifier">obj</span><span class="special">,</span> <span class="identifier">arg1</span><span class="special">)</span> <span class="comment">// obj is an xyz object
+<pre class="programlisting"><span class="identifier">bind</span><span class="special">(&</span><span class="identifier">xyz</span><span class="special">::</span><span class="identifier">foo</span><span class="special">,</span> <span class="identifier">obj</span><span class="special">,</span> <span class="identifier">arg1</span><span class="special">)</span> <span class="comment">// obj is an xyz object
</span></pre>
<p>
Take note that a lazy-member functions expects the first argument to be a
pointer or reference to an object. Both the object (reference or pointer)
and the arguments can be lazily bound. Examples:
</p>
-<pre class="programlisting">
-<span class="identifier">xyz</span> <span class="identifier">obj</span><span class="special">;</span>
+<pre class="programlisting"><span class="identifier">xyz</span> <span class="identifier">obj</span><span class="special">;</span>
<span class="identifier">bind</span><span class="special">(&</span><span class="identifier">xyz</span><span class="special">::</span><span class="identifier">foo</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">// arg1.foo(arg2)
</span><span class="identifier">bind</span><span class="special">(&</span><span class="identifier">xyz</span><span class="special">::</span><span class="identifier">foo</span><span class="special">,</span> <span class="identifier">obj</span><span class="special">,</span> <span class="identifier">arg1</span><span class="special">)</span> <span class="comment">// obj.foo(arg1)
</span><span class="identifier">bind</span><span class="special">(&</span><span class="identifier">xyz</span><span class="special">::</span><span class="identifier">foo</span><span class="special">,</span> <span class="identifier">obj</span><span class="special">,</span> <span class="number">100</span><span class="special">)</span> <span class="comment">// obj.foo(100)
</span></pre>
-<a name="phoenix.composite.bind.binding_member_variables"></a><h2>
-<a name="id482250"></a>
- <a href="composite.html#phoenix.composite.bind.binding_member_variables">Binding Member
+<a name="phoenix.composite.bind.binding_member_variables"></a><h3>
+<a name="id782905"></a>
+ <a class="link" href="composite.html#phoenix.composite.bind.binding_member_variables">Binding Member
Variables</a>
- </h2>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">bind</span><span class="special">/</span><span class="identifier">bind_member_variable</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+ </h3>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">bind</span><span class="special">/</span><span class="identifier">bind_member_variable</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
Member variables can also be bound much like member functions. Member variables
- are not functions. Yet, like the ref(x) that acts like a nullary function
+ are not functions. Yet, like the <a class="link" href="primitives.html#phoenix.primitives.references" title="References"><code class="computeroutput"><span class="identifier">ref</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code></a> that acts like a nullary function
returning a reference to the data, member variables, when bound, act like
a unary function, taking in a pointer or reference to an object as its argument
and returning a reference to the bound member variable. For instance, given:
</p>
-<pre class="programlisting">
-<span class="keyword">struct</span> <span class="identifier">xyz</span>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">xyz</span>
<span class="special">{</span>
<span class="keyword">int</span> <span class="identifier">v</span><span class="special">;</span>
<span class="special">};</span>
</pre>
<p>
- <tt class="computeroutput"><span class="identifier">xyz</span><span class="special">::</span><span class="identifier">v</span></tt> can be bound as:
+ <code class="computeroutput"><span class="identifier">xyz</span><span class="special">::</span><span class="identifier">v</span></code> can be bound as:
</p>
-<pre class="programlisting">
-<span class="identifier">bind</span><span class="special">(&</span><span class="identifier">xyz</span><span class="special">::</span><span class="identifier">v</span><span class="special">,</span> <span class="identifier">obj</span><span class="special">)</span> <span class="comment">// obj is an xyz object
+<pre class="programlisting"><span class="identifier">bind</span><span class="special">(&</span><span class="identifier">xyz</span><span class="special">::</span><span class="identifier">v</span><span class="special">,</span> <span class="identifier">obj</span><span class="special">)</span> <span class="comment">// obj is an xyz object
</span></pre>
<p>
As noted, just like the bound member function, a bound member variable also
expects the first (and only) argument to be a pointer or reference to an
object. The object (reference or pointer) can be lazily bound. Examples:
</p>
-<pre class="programlisting">
-<span class="identifier">xyz</span> <span class="identifier">obj</span><span class="special">;</span>
+<pre class="programlisting"><span class="identifier">xyz</span> <span class="identifier">obj</span><span class="special">;</span>
<span class="identifier">bind</span><span class="special">(&</span><span class="identifier">xyz</span><span class="special">::</span><span class="identifier">v</span><span class="special">,</span> <span class="identifier">arg1</span><span class="special">)</span> <span class="comment">// arg1.v
</span><span class="identifier">bind</span><span class="special">(&</span><span class="identifier">xyz</span><span class="special">::</span><span class="identifier">v</span><span class="special">,</span> <span class="identifier">obj</span><span class="special">)</span> <span class="comment">// obj.v
</span><span class="identifier">bind</span><span class="special">(&</span><span class="identifier">xyz</span><span class="special">::</span><span class="identifier">v</span><span class="special">,</span> <span class="identifier">arg1</span><span class="special">)(</span><span class="identifier">obj</span><span class="special">)</span> <span class="special">=</span> <span class="number">4</span> <span class="comment">// obj.v = 4
@@ -1636,7 +1559,7 @@
</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 Joel
+<td align="right"><div class="copyright-footer">Copyright © 2002-2005 Joel
de Guzman, Dan Marsden<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)
@@ -1645,7 +1568,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="primitives.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="container.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="primitives.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="container.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/phoenix/doc/html/phoenix/container.html
==============================================================================
--- trunk/libs/spirit/phoenix/doc/html/phoenix/container.html (original)
+++ trunk/libs/spirit/phoenix/doc/html/phoenix/container.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -1,11 +1,11 @@
<html>
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Container</title>
-<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
-<link rel="start" href="../index.html" title="Chapter 1. Phoenix 2.0">
-<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
+<link rel="stylesheet" href="../../../../../../doc/src/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 2.0">
+<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
<link rel="prev" href="composite.html" title="Composite">
<link rel="next" href="algorithm.html" title="Algorithm">
</head>
@@ -13,20 +13,20 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="composite.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="algorithm.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="composite.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="algorithm.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="phoenix.container"></a>Container</h2></div></div></div>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</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>
+<a name="phoenix.container"></a><a class="link" href="container.html" title="Container">Container</a>
+</h2></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</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>
</pre>
<p>
The container module predefines a set of lazy functions that work on STL containers.
@@ -38,104 +38,104 @@
Lazy functions are provided for all of the member functions of the following
containers:
</p>
-<div class="itemizedlist"><ul type="disc">
-<li>
- deque
- </li>
-<li>
- list
- </li>
-<li>
- map
- </li>
-<li>
- multimap
- </li>
-<li>
- vector
- </li>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ deque
+ </li>
+<li class="listitem">
+ list
+ </li>
+<li class="listitem">
+ map
+ </li>
+<li class="listitem">
+ multimap
+ </li>
+<li class="listitem">
+ vector
+ </li>
</ul></div>
<p>
Indeed, should your class have member functions with the same names and signatures
as those listed below, then it will automatically be supported. To summarize,
lazy functions are provided for member functions:
</p>
-<div class="itemizedlist"><ul type="disc">
-<li>
- assign
- </li>
-<li>
- at
- </li>
-<li>
- back
- </li>
-<li>
- begin
- </li>
-<li>
- capacity
- </li>
-<li>
- clear
- </li>
-<li>
- empty
- </li>
-<li>
- end
- </li>
-<li>
- erase
- </li>
-<li>
- front
- </li>
-<li>
- get_allocator
- </li>
-<li>
- insert
- </li>
-<li>
- key_comp
- </li>
-<li>
- max_size
- </li>
-<li>
- pop_back
- </li>
-<li>
- pop_front
- </li>
-<li>
- push_back
- </li>
-<li>
- push_front
- </li>
-<li>
- rbegin
- </li>
-<li>
- rend
- </li>
-<li>
- reserve
- </li>
-<li>
- resize
- </li>
-<li>
- size
- </li>
-<li>
- splice
- </li>
-<li>
- value_comp
- </li>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ assign
+ </li>
+<li class="listitem">
+ at
+ </li>
+<li class="listitem">
+ back
+ </li>
+<li class="listitem">
+ begin
+ </li>
+<li class="listitem">
+ capacity
+ </li>
+<li class="listitem">
+ clear
+ </li>
+<li class="listitem">
+ empty
+ </li>
+<li class="listitem">
+ end
+ </li>
+<li class="listitem">
+ erase
+ </li>
+<li class="listitem">
+ front
+ </li>
+<li class="listitem">
+ get_allocator
+ </li>
+<li class="listitem">
+ insert
+ </li>
+<li class="listitem">
+ key_comp
+ </li>
+<li class="listitem">
+ max_size
+ </li>
+<li class="listitem">
+ pop_back
+ </li>
+<li class="listitem">
+ pop_front
+ </li>
+<li class="listitem">
+ push_back
+ </li>
+<li class="listitem">
+ push_front
+ </li>
+<li class="listitem">
+ rbegin
+ </li>
+<li class="listitem">
+ rend
+ </li>
+<li class="listitem">
+ reserve
+ </li>
+<li class="listitem">
+ resize
+ </li>
+<li class="listitem">
+ size
+ </li>
+<li class="listitem">
+ splice
+ </li>
+<li class="listitem">
+ value_comp
+ </li>
</ul></div>
<p>
The lazy functions' names are the same as the corresponding member function.
@@ -143,417 +143,423 @@
does not use the member "dot" syntax.
</p>
<div class="table">
-<a name="id482988"></a><p class="title"><b>Table 1.5. Sample usage</b></p>
-<table class="table" summary="Sample usage">
+<a name="id783648"></a><p class="title"><b>Table 1.5. Sample usage</b></p>
+<div class="table-contents"><table class="table" summary="Sample usage">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
- <p>
- "Normal" version
- </p>
- </th>
+ <p>
+ "Normal" version
+ </p>
+ </th>
<th>
- <p>
- "Lazy" version
- </p>
- </th>
+ <p>
+ "Lazy" version
+ </p>
+ </th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">my_vector</span><span class="special">.</span><span class="identifier">at</span><span class="special">(</span><span class="number">5</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">my_vector</span><span class="special">.</span><span class="identifier">at</span><span class="special">(</span><span class="number">5</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">at</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">,</span> <span class="number">5</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">at</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">,</span>
+ <span class="number">5</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">my_list</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">my_list</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">size</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">size</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">my_vector1</span><span class="special">.</span><span class="identifier">swap</span><span class="special">(</span><span class="identifier">my_vector2</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">my_vector1</span><span class="special">.</span><span class="identifier">swap</span><span class="special">(</span><span class="identifier">my_vector2</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">swap</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">,</span> <span class="identifier">arg2</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">swap</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">,</span>
+ <span class="identifier">arg2</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
</tbody>
-</table>
+</table></div>
</div>
-<p>
+<br class="table-break"><p>
Notice that member functions with names that clash with stl algorithms are
absent. This will be provided in Phoenix's algorithm module.
</p>
<p>
- No support is provided here for lazy versions of <tt class="computeroutput"><span class="keyword">operator</span><span class="special">+=</span></tt>, <tt class="computeroutput"><span class="keyword">operator</span><span class="special">[]</span></tt> etc. Such operators are not specific to STL
- containers and lazy versions can therefore be found in operators.
+ No support is provided here for lazy versions of <code class="computeroutput"><span class="keyword">operator</span><span class="special">+=</span></code>, <code class="computeroutput"><span class="keyword">operator</span><span class="special">[]</span></code> etc. Such operators are not specific to STL
+ containers and lazy versions can therefore be found in <a class="link" href="composite.html#phoenix.composite.operator" title="Operator">operators</a>.
</p>
<p>
The following table describes the container functions and their semantics.
</p>
-<div class="sidebar"><p>
+<div class="sidebar">
+<p class="title"><b></b></p>
+<p>
<span class="inlinemediaobject"><img src="../images/tip.png" alt="tip"></span> Arguments in brackets denote optional parameters.
- </p></div>
+ </p>
+</div>
<div class="table">
-<a name="id483365"></a><p class="title"><b>Table 1.6. Lazy STL Container Functions</b></p>
-<table class="table" summary="Lazy STL Container Functions">
+<a name="id783986"></a><p class="title"><b>Table 1.6. Lazy STL Container Functions</b></p>
+<div class="table-contents"><table class="table" summary="Lazy STL Container Functions">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
- <p>
- Function
- </p>
- </th>
+ <p>
+ Function
+ </p>
+ </th>
<th>
- <p>
- Semantics
- </p>
- </th>
+ <p>
+ Semantics
+ </p>
+ </th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">assign</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">b</span><span class="special">,</span> <span class="identifier">c</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">assign</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">b</span><span class="special">,</span> <span class="identifier">c</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">assign</span><span class="special">(</span><span class="identifier">a</span><span class="special">[,</span> <span class="identifier">b</span><span class="special">,</span> <span class="identifier">c</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">assign</span><span class="special">(</span><span class="identifier">a</span><span class="special">[,</span> <span class="identifier">b</span><span class="special">,</span> <span class="identifier">c</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">at</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span> <span class="identifier">i</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">at</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span> <span class="identifier">i</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">at</span><span class="special">(</span><span class="identifier">i</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">at</span><span class="special">(</span><span class="identifier">i</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">back</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">back</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">back</span><span class="special">()</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">back</span><span class="special">()</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">begin</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">begin</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">capacity</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">capacity</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">capacity</span><span class="special">()</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">capacity</span><span class="special">()</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">clear</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">clear</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">clear</span><span class="special">()</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">clear</span><span class="special">()</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">empty</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">empty</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">empty</span><span class="special">()</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">empty</span><span class="special">()</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">end</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">end</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">erase</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">b</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">erase</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">b</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">erase</span><span class="special">(</span><span class="identifier">a</span><span class="special">[,</span> <span class="identifier">b</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">erase</span><span class="special">(</span><span class="identifier">a</span><span class="special">[,</span> <span class="identifier">b</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">front</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">front</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">front</span><span class="special">()</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">front</span><span class="special">()</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">get_allocator</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">get_allocator</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">get_allocator</span><span class="special">()</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">get_allocator</span><span class="special">()</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">insert</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">b</span><span class="special">,</span> <span class="identifier">c</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">insert</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">b</span><span class="special">,</span> <span class="identifier">c</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">insert</span><span class="special">(</span><span class="identifier">a</span><span class="special">[,</span> <span class="identifier">b</span><span class="special">,</span> <span class="identifier">c</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">insert</span><span class="special">(</span><span class="identifier">a</span><span class="special">[,</span> <span class="identifier">b</span><span class="special">,</span> <span class="identifier">c</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">key_comp</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">key_comp</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">key_comp</span><span class="special">()</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">key_comp</span><span class="special">()</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">max_size</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">max_size</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">max_size</span><span class="special">()</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">max_size</span><span class="special">()</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">pop_back</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pop_back</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">pop_back</span><span class="special">()</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">pop_back</span><span class="special">()</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">pop_front</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pop_front</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">pop_front</span><span class="special">()</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">pop_front</span><span class="special">()</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span> <span class="identifier">d</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span> <span class="identifier">d</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">d</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">d</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">push_front</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span> <span class="identifier">d</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">push_front</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span> <span class="identifier">d</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">push_front</span><span class="special">(</span><span class="identifier">d</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">push_front</span><span class="special">(</span><span class="identifier">d</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">pop_front</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pop_front</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">pop_front</span><span class="special">()</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">pop_front</span><span class="special">()</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">rbegin</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rbegin</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">rbegin</span><span class="special">()</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">rbegin</span><span class="special">()</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">rend</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rend</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">rend</span><span class="special">()</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">rend</span><span class="special">()</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">reserve</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span> <span class="identifier">n</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">reserve</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span> <span class="identifier">n</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">reserve</span><span class="special">(</span><span class="identifier">n</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">reserve</span><span class="special">(</span><span class="identifier">n</span><span class="special">)</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">resize</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">b</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">resize</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">b</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">resize</span><span class="special">(</span><span class="identifier">a</span><span class="special">[,</span> <span class="identifier">b</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">resize</span><span class="special">(</span><span class="identifier">a</span><span class="special">[,</span> <span class="identifier">b</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">size</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">size</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">splice</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">b</span><span class="special">,</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">d</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">splice</span><span class="special">(</span><span class="identifier">c</span><span class="special">,</span> <span class="identifier">a</span><span class="special">[,</span> <span class="identifier">b</span><span class="special">,</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">d</span><span class="special">])</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">splice</span><span class="special">(</span><span class="identifier">a</span><span class="special">[,</span> <span class="identifier">b</span><span class="special">,</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">d</span><span class="special">])</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">splice</span><span class="special">(</span><span class="identifier">a</span><span class="special">[,</span> <span class="identifier">b</span><span class="special">,</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">d</span><span class="special">])</span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">value_comp</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">value_comp</span><span class="special">(</span><span class="identifier">c</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">value_comp</span><span class="special">()</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">c</span><span class="special">.</span><span class="identifier">value_comp</span><span class="special">()</span></code>
+ </p>
+ </td>
</tr>
</tbody>
-</table>
+</table></div>
</div>
+<br class="table-break">
</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 Joel
+<td align="right"><div class="copyright-footer">Copyright © 2002-2005 Joel
de Guzman, Dan Marsden<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)
@@ -562,7 +568,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="composite.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="algorithm.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="composite.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="algorithm.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/phoenix/doc/html/phoenix/inside_phoenix.html
==============================================================================
--- trunk/libs/spirit/phoenix/doc/html/phoenix/inside_phoenix.html (original)
+++ trunk/libs/spirit/phoenix/doc/html/phoenix/inside_phoenix.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -1,11 +1,11 @@
<html>
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Inside Phoenix</title>
-<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
-<link rel="start" href="../index.html" title="Chapter 1. Phoenix 2.0">
-<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
+<link rel="stylesheet" href="../../../../../../doc/src/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 2.0">
+<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
<link rel="prev" href="algorithm.html" title="Algorithm">
<link rel="next" href="wrap_up.html" title="Wrap Up">
</head>
@@ -13,18 +13,19 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="algorithm.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="wrap_up.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="algorithm.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="wrap_up.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="phoenix.inside_phoenix"></a>Inside Phoenix</h2></div></div></div>
+<a name="phoenix.inside_phoenix"></a><a class="link" href="inside_phoenix.html" title="Inside Phoenix">Inside Phoenix</a>
+</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section">Actors In Detail</span></dt>
<dt><span class="section">Actor Example</span></dt>
@@ -39,40 +40,40 @@
the library. However, a microscopic view might prove to be beneficial to moderate
to advanced programmers who wish to extend the library.
</p>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.inside_phoenix.actors_in_detail"></a>Actors In Detail</h3></div></div></div>
-<a name="phoenix.inside_phoenix.actors_in_detail.actor_concept"></a><h3>
-<a name="id495846"></a>
- <a href="inside_phoenix.html#phoenix.inside_phoenix.actors_in_detail.actor_concept">Actor
+<a name="phoenix.inside_phoenix.actors_in_detail"></a><a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.actors_in_detail" title="Actors In Detail">Actors In Detail</a>
+</h3></div></div></div>
+<a name="phoenix.inside_phoenix.actors_in_detail.actor_concept"></a><h4>
+<a name="id795342"></a>
+ <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.actors_in_detail.actor_concept">Actor
Concept</a>
- </h3>
+ </h4>
<p>
- The main concept is the <tt class="computeroutput"><span class="identifier">Actor</span></tt>.
+ The main concept is the <code class="computeroutput"><span class="identifier">Actor</span></code>.
Actors are function objects (that can accept 0 to N arguments (where N is
a predefined maximum).
</p>
<div class="note"><table border="0" summary="Note">
<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
-<tr><td colspan="2" align="left" valign="top"><p>
- You can set <tt class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></tt>,
- the predefined maximum arity an actor can take. By default, <tt class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></tt> is set to 10.
+<tr><td align="left" valign="top"><p>
+ You can set <code class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></code>,
+ the predefined maximum arity an actor can take. By default, <code class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></code> is set to 10.
</p></td></tr>
</table></div>
-<a name="phoenix.inside_phoenix.actors_in_detail.actor_template_class"></a><h3>
-<a name="id495923"></a>
- <a href="inside_phoenix.html#phoenix.inside_phoenix.actors_in_detail.actor_template_class">actor
+<a name="phoenix.inside_phoenix.actors_in_detail.actor_template_class"></a><h4>
+<a name="id795408"></a>
+ <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.actors_in_detail.actor_template_class">actor
template class</a>
- </h3>
+ </h4>
<p>
- The <tt class="computeroutput"><span class="identifier">actor</span></tt> template class
- models the <tt class="computeroutput"><span class="identifier">Actor</span></tt> concept:
+ The <code class="computeroutput"><span class="identifier">actor</span></code> template class
+ models the <code class="computeroutput"><span class="identifier">Actor</span></code> concept:
</p>
-<pre class="programlisting">
-<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Eval</span><span class="special">></span>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Eval</span><span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">actor</span> <span class="special">:</span> <span class="identifier">Eval</span>
<span class="special">{</span>
<span class="keyword">typedef</span> <span class="identifier">Eval</span> <span class="identifier">eval_type</span><span class="special">;</span>
@@ -103,167 +104,171 @@
</span><span class="special">};</span>
</pre>
<div class="table">
-<a name="id496708"></a><p class="title"><b>Table 1.10. Actor Concept Requirements</b></p>
-<table class="table" summary="Actor Concept Requirements">
+<a name="id796097"></a><p class="title"><b>Table 1.10. Actor Concept Requirements</b></p>
+<div class="table-contents"><table class="table" summary="Actor Concept Requirements">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
- <p>
- Expression
- </p>
- </th>
+ <p>
+ Expression
+ </p>
+ </th>
<th>
- <p>
- Result/Semantics
- </p>
- </th>
+ <p>
+ Result/Semantics
+ </p>
+ </th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">T</span><span class="special">::</span><span class="identifier">eval_type</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">T</span><span class="special">::</span><span class="identifier">eval_type</span></code>
+ </p>
+ </td>
<td>
- <p>
- The actor's Eval type
- </p>
- </td>
+ <p>
+ The actor's Eval type
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">T</span><span class="special">()</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">T</span><span class="special">()</span></code>
+ </p>
+ </td>
<td>
- <p>
- Default Constructor
- </p>
- </td>
+ <p>
+ Default Constructor
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">T</span><span class="special">(</span><span class="identifier">base</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">T</span><span class="special">(</span><span class="identifier">base</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- Constructor from Eval
- </p>
- </td>
+ <p>
+ Constructor from Eval
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">T</span><span class="special">(</span><span class="identifier">arg0</span><span class="special">,</span> <span class="identifier">arg1</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">argN</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">T</span><span class="special">(</span><span class="identifier">arg0</span><span class="special">,</span>
+ <span class="identifier">arg1</span><span class="special">,</span>
+ <span class="special">...,</span> <span class="identifier">argN</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- Pass through constructors
- </p>
- </td>
+ <p>
+ Pass through constructors
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">x</span><span class="special">(</span><span class="identifier">arg0</span><span class="special">,</span> <span class="identifier">arg1</span><span class="special">,</span> <span class="special">...,</span> <span class="identifier">argN</span><span class="special">)</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">x</span><span class="special">(</span><span class="identifier">arg0</span><span class="special">,</span>
+ <span class="identifier">arg1</span><span class="special">,</span>
+ <span class="special">...,</span> <span class="identifier">argN</span><span class="special">)</span></code>
+ </p>
+ </td>
<td>
- <p>
- Function call operators
- </p>
- </td>
+ <p>
+ Function call operators
+ </p>
+ </td>
</tr>
</tbody>
-</table>
+</table></div>
</div>
-<a name="phoenix.inside_phoenix.actors_in_detail.eval_concept"></a><h3>
-<a name="id497020"></a>
- <a href="inside_phoenix.html#phoenix.inside_phoenix.actors_in_detail.eval_concept">Eval
+<br class="table-break"><a name="phoenix.inside_phoenix.actors_in_detail.eval_concept"></a><h4>
+<a name="id796380"></a>
+ <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.actors_in_detail.eval_concept">Eval
Concept</a>
- </h3>
+ </h4>
<p>
- The <tt class="computeroutput"><span class="identifier">actor</span></tt> template class
- has a single template parameter, <tt class="computeroutput"><span class="identifier">Eval</span></tt>,
- from which it derives from. While the <tt class="computeroutput"><span class="identifier">Actor</span></tt>
- concept represents a function, the <tt class="computeroutput"><span class="identifier">Eval</span></tt>
- concept represents the function body. The requirements for <tt class="computeroutput"><span class="identifier">Eval</span></tt> are intentionally kept simple, to
+ The <code class="computeroutput"><span class="identifier">actor</span></code> template class
+ has a single template parameter, <code class="computeroutput"><span class="identifier">Eval</span></code>,
+ from which it derives from. While the <code class="computeroutput"><span class="identifier">Actor</span></code>
+ concept represents a function, the <code class="computeroutput"><span class="identifier">Eval</span></code>
+ concept represents the function body. The requirements for <code class="computeroutput"><span class="identifier">Eval</span></code> are intentionally kept simple, to
make it easy to write models of the concept. We shall see an example in the
- next section.
+ <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.actor_example" title="Actor Example">next section</a>.
</p>
<div class="table">
-<a name="id497115"></a><p class="title"><b>Table 1.11. Eval Concept Requirements</b></p>
-<table class="table" summary="Eval Concept Requirements">
+<a name="id796466"></a><p class="title"><b>Table 1.11. Eval Concept Requirements</b></p>
+<div class="table-contents"><table class="table" summary="Eval Concept Requirements">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
- <p>
- Expression
- </p>
- </th>
+ <p>
+ Expression
+ </p>
+ </th>
<th>
- <p>
- Result/Semantics
- </p>
- </th>
+ <p>
+ Result/Semantics
+ </p>
+ </th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="keyword">return</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">eval</span><span class="special">(</span><span class="identifier">env</span><span class="special">)</span></tt>
- </p>
- </td>
-<td>
- <p>
- Evaluates the function (see Environment below)
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="keyword">return</span> <span class="identifier">x</span><span class="special">.</span><span class="identifier">eval</span><span class="special">(</span><span class="identifier">env</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Evaluates the function (see Environment below)
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">T</span><span class="special">::</span><span class="identifier">result</span><span class="special"><</span><span class="identifier">Env</span><span class="special">>::</span><span class="identifier">type</span></tt>
- </p>
- </td>
-<td>
- <p>
- The return type of eval (see Environment below)
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">T</span><span class="special">::</span><span class="identifier">result</span><span class="special"><</span><span class="identifier">Env</span><span class="special">>::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The return type of eval (see Environment below)
+ </p>
+ </td>
</tr>
</tbody>
-</table>
+</table></div>
</div>
-<a name="phoenix.inside_phoenix.actors_in_detail.constructors"></a><h3>
-<a name="id497287"></a>
- Constructors
- </h3>
+<br class="table-break"><a name="phoenix.inside_phoenix.actors_in_detail.constructors"></a><h4>
+<a name="id796619"></a>
+ <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.actors_in_detail.constructors">Constructors</a>
+ </h4>
<p>
In addition to a default constructor and an constructor from a Eval object,
there are templated (pass through) constructors for 1 to N arguments (N ==
- <tt class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></tt>). These constructors
- simply forward the arguments to the <tt class="computeroutput"><span class="identifier">base</span></tt>.
+ <code class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></code>). These constructors
+ simply forward the arguments to the <code class="computeroutput"><span class="identifier">base</span></code>.
</p>
<div class="note"><table border="0" summary="Note">
<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
-<tr><td colspan="2" align="left" valign="top">
+<tr><td align="left" valign="top">
<p>
- <span class="bold"><b>Parametric Base Class Pattern</b></span>
+ <span class="bold"><strong>Parametric Base Class Pattern</strong></span>
</p>
<p>
Notice that actor derives from its template argument Eval. This is the
@@ -277,172 +282,168 @@
</p>
</td></tr>
</table></div>
-<a name="phoenix.inside_phoenix.actors_in_detail.function_call_operators"></a><h3>
-<a name="id497372"></a>
- <a href="inside_phoenix.html#phoenix.inside_phoenix.actors_in_detail.function_call_operators">Function
+<a name="phoenix.inside_phoenix.actors_in_detail.function_call_operators"></a><h4>
+<a name="id796684"></a>
+ <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.actors_in_detail.function_call_operators">Function
Call Operators</a>
- </h3>
+ </h4>
<p>
- There are N function call operators for 0 to N arguments (N == <tt class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></tt>). The actor class accepts
- the arguments and forwards the arguments to the actor's base <tt class="computeroutput"><span class="identifier">Eval</span></tt> for evaluation.
+ There are N function call operators for 0 to N arguments (N == <code class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></code>). The actor class accepts
+ the arguments and forwards the arguments to the actor's base <code class="computeroutput"><span class="identifier">Eval</span></code> for evaluation.
</p>
<div class="note"><table border="0" summary="Note">
<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
-<tr><td colspan="2" align="left" valign="top">
+<tr><td align="left" valign="top">
<p>
- <span class="bold"><b>Forwarding Function Problem</b></span>
+ <span class="bold"><strong>Forwarding Function Problem</strong></span>
</p>
<p>
The function call operators cannot accept non-const temporaries and literal
constants. There is a known issue with current C++ called the "<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1385.htm" target="_top">Forwarding
Function Problem</a>". The problem is that given an arbitrary
- function <tt class="computeroutput"><span class="identifier">F</span></tt>, using current
- C++ language rules, one cannot create a forwarding function <tt class="computeroutput"><span class="identifier">FF</span></tt> that transparently assumes the arguments
- of <tt class="computeroutput"><span class="identifier">F</span></tt>. Disallowing non-const
+ function <code class="computeroutput"><span class="identifier">F</span></code>, using current
+ C++ language rules, one cannot create a forwarding function <code class="computeroutput"><span class="identifier">FF</span></code> that transparently assumes the arguments
+ of <code class="computeroutput"><span class="identifier">F</span></code>. Disallowing non-const
rvalues arguments partially solves the problem but prohibits code such
- as <tt class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">3</span><span class="special">);</span></tt>.
+ as <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">3</span><span class="special">);</span></code>.
</p>
</td></tr>
</table></div>
-<a name="phoenix.inside_phoenix.actors_in_detail.environment"></a><h3>
-<a name="id497544"></a>
- Environment
- </h3>
-<p>
- On an actor function call, before calling the actor's <tt class="computeroutput"><span class="identifier">Eval</span><span class="special">::</span><span class="identifier">eval</span></tt>
- for evaluation, the actor creates an <span class="emphasis"><em><span class="bold"><b>environment</b></span></em></span>.
- Basically, the environment packages the arguments in a tuple. The <tt class="computeroutput"><span class="identifier">Environment</span></tt> is a concept, of which, the
- <tt class="computeroutput"><span class="identifier">basic_environment</span></tt> template
+<a name="phoenix.inside_phoenix.actors_in_detail.environment"></a><h4>
+<a name="id796836"></a>
+ <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.actors_in_detail.environment">Environment</a>
+ </h4>
+<p>
+ On an actor function call, before calling the actor's <code class="computeroutput"><span class="identifier">Eval</span><span class="special">::</span><span class="identifier">eval</span></code>
+ for evaluation, the actor creates an <span class="emphasis"><em><span class="bold"><strong>environment</strong></span></em></span>.
+ Basically, the environment packages the arguments in a tuple. The <code class="computeroutput"><span class="identifier">Environment</span></code> is a concept, of which, the
+ <code class="computeroutput"><span class="identifier">basic_environment</span></code> template
class is a model of.
</p>
<div class="table">
-<a name="id497623"></a><p class="title"><b>Table 1.12. Environment Concept Requirements</b></p>
-<table class="table" summary="Environment Concept Requirements">
+<a name="id796904"></a><p class="title"><b>Table 1.12. Environment Concept Requirements</b></p>
+<div class="table-contents"><table class="table" summary="Environment Concept Requirements">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
- <p>
- Expression
- </p>
- </th>
+ <p>
+ Expression
+ </p>
+ </th>
<th>
- <p>
- Result/Semantics
- </p>
- </th>
+ <p>
+ Result/Semantics
+ </p>
+ </th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">x</span><span class="special">.</span><span class="identifier">args</span><span class="special">()</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">x</span><span class="special">.</span><span class="identifier">args</span><span class="special">()</span></code>
+ </p>
+ </td>
<td>
- <p>
- The arguments in a tie (a tuple of references)
- </p>
- </td>
+ <p>
+ The arguments in a tie (a tuple of references)
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">T</span><span class="special">::</span><span class="identifier">args_type</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">T</span><span class="special">::</span><span class="identifier">args_type</span></code>
+ </p>
+ </td>
<td>
- <p>
- The arguments' types in an MPL sequence
- </p>
- </td>
+ <p>
+ The arguments' types in an MPL sequence
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">T</span><span class="special">::</span><span class="identifier">tie_type</span></tt>
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">T</span><span class="special">::</span><span class="identifier">tie_type</span></code>
+ </p>
+ </td>
<td>
- <p>
- The tie (tuple of references) type
- </p>
- </td>
+ <p>
+ The tie (tuple of references) type
+ </p>
+ </td>
</tr>
</tbody>
-</table>
+</table></div>
</div>
-<p>
+<br class="table-break"><p>
Schematically:
</p>
<p>
<span class="inlinemediaobject"><img src="../images/funnel_in.png" alt="funnel_in"></span>
</p>
<p>
- Other parts of the library (e.g. the scope module) extends the <tt class="computeroutput"><span class="identifier">Environment</span></tt> concept to hold other information
+ Other parts of the library (e.g. the scope module) extends the <code class="computeroutput"><span class="identifier">Environment</span></code> concept to hold other information
such as local variables, etc.
</p>
-<a name="phoenix.inside_phoenix.actors_in_detail.apply_actor"></a><h3>
-<a name="id497839"></a>
- apply_actor
- </h3>
+<a name="phoenix.inside_phoenix.actors_in_detail.apply_actor"></a><h4>
+<a name="id797100"></a>
+ <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.actors_in_detail.apply_actor">apply_actor</a>
+ </h4>
<p>
- <tt class="computeroutput"><span class="identifier">apply_actor</span></tt> is a standard
- MPL style metafunction that simply calls the Action's <tt class="computeroutput"><span class="identifier">result</span></tt>
+ <code class="computeroutput"><span class="identifier">apply_actor</span></code> is a standard
+ MPL style metafunction that simply calls the Action's <code class="computeroutput"><span class="identifier">result</span></code>
nested metafunction:
</p>
-<pre class="programlisting">
-<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Action</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Env</span><span class="special">></span>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Action</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Env</span><span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">apply_actor</span>
<span class="special">{</span>
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">Action</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">result</span><span class="special"><</span><span class="identifier">Env</span><span class="special">>::</span><span class="identifier">type</span> <span class="identifier">type</span><span class="special">;</span>
<span class="special">};</span>
</pre>
<p>
- After evaluating the arguments and doing some computation, the <tt class="computeroutput"><span class="identifier">eval</span></tt> member function returns something
- back to the client. To do this, the forwarding function (the actor's <tt class="computeroutput"><span class="keyword">operator</span><span class="special">()</span></tt>)
+ After evaluating the arguments and doing some computation, the <code class="computeroutput"><span class="identifier">eval</span></code> member function returns something
+ back to the client. To do this, the forwarding function (the actor's <code class="computeroutput"><span class="keyword">operator</span><span class="special">()</span></code>)
needs to know the return type of the eval member function that it is calling.
- For this purpose, models of <tt class="computeroutput"><span class="identifier">Eval</span></tt>
+ For this purpose, models of <code class="computeroutput"><span class="identifier">Eval</span></code>
are required to provide a nested template class:
</p>
-<pre class="programlisting">
-<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Env</span><span class="special">></span>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Env</span><span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">result</span><span class="special">;</span>
</pre>
<p>
- This nested class provides the result type information returned by the <tt class="computeroutput"><span class="identifier">Eval</span></tt>'s <tt class="computeroutput"><span class="identifier">eval</span></tt>
- member function. The nested template class <tt class="computeroutput"><span class="identifier">result</span></tt>
- should have a typedef <tt class="computeroutput"><span class="identifier">type</span></tt>
- that reflects the return type of its member function <tt class="computeroutput"><span class="identifier">eval</span></tt>.
+ This nested class provides the result type information returned by the <code class="computeroutput"><span class="identifier">Eval</span></code>'s <code class="computeroutput"><span class="identifier">eval</span></code>
+ member function. The nested template class <code class="computeroutput"><span class="identifier">result</span></code>
+ should have a typedef <code class="computeroutput"><span class="identifier">type</span></code>
+ that reflects the return type of its member function <code class="computeroutput"><span class="identifier">eval</span></code>.
</p>
<p>
- For reference, here's a typical <tt class="computeroutput"><span class="identifier">actor</span><span class="special">::</span><span class="keyword">operator</span><span class="special">()</span></tt> that accepts two arguments:
+ For reference, here's a typical <code class="computeroutput"><span class="identifier">actor</span><span class="special">::</span><span class="keyword">operator</span><span class="special">()</span></code> that accepts two arguments:
</p>
-<pre class="programlisting">
-<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">></span>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">></span>
<span class="keyword">typename</span> <span class="identifier">apply_actor</span><span class="special"><</span><span class="identifier">eval_type</span><span class="special">,</span> <span class="identifier">basic_environment</span><span class="special"><</span><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">></span> <span class="special">>::</span><span class="identifier">type</span>
<span class="keyword">operator</span><span class="special">()(</span><span class="identifier">T0</span><span class="special">&</span> <span class="identifier">_0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">&</span> <span class="identifier">_1</span><span class="special">)</span> <span class="keyword">const</span>
<span class="special">{</span>
<span class="keyword">return</span> <span class="identifier">eval_type</span><span class="special">::</span><span class="identifier">eval</span><span class="special">(</span><span class="identifier">basic_environment</span><span class="special"><</span><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">>(</span><span class="identifier">_0</span><span class="special">,</span> <span class="identifier">_1</span><span class="special">));</span>
<span class="special">}</span>
</pre>
-<a name="phoenix.inside_phoenix.actors_in_detail.actor_result"></a><h3>
-<a name="id498520"></a>
- actor_result
- </h3>
+<a name="phoenix.inside_phoenix.actors_in_detail.actor_result"></a><h4>
+<a name="id797697"></a>
+ <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.actors_in_detail.actor_result">actor_result</a>
+ </h4>
<p>
- For reasons of symmetry to the family of <tt class="computeroutput"><span class="identifier">actor</span><span class="special">::</span><span class="keyword">operator</span><span class="special">()</span></tt> there is a special metafunction usable
- for actor result type calculation named <tt class="computeroutput"><span class="identifier">actor_result</span></tt>.
+ For reasons of symmetry to the family of <code class="computeroutput"><span class="identifier">actor</span><span class="special">::</span><span class="keyword">operator</span><span class="special">()</span></code> there is a special metafunction usable
+ for actor result type calculation named <code class="computeroutput"><span class="identifier">actor_result</span></code>.
This metafunction allows us to directly to specify the types of the parameters
- to be passed to the <tt class="computeroutput"><span class="identifier">actor</span><span class="special">::</span><span class="keyword">operator</span><span class="special">()</span></tt> function. Here's a typical <tt class="computeroutput"><span class="identifier">actor_result</span></tt> that accepts two arguments:
+ to be passed to the <code class="computeroutput"><span class="identifier">actor</span><span class="special">::</span><span class="keyword">operator</span><span class="special">()</span></code> function. Here's a typical <code class="computeroutput"><span class="identifier">actor_result</span></code> that accepts two arguments:
</p>
-<pre class="programlisting">
-<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Action</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">></span>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Action</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T0</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">actor_result</span>
<span class="special">{</span>
<span class="keyword">typedef</span> <span class="identifier">basic_environment</span><span class="special"><</span><span class="identifier">T0</span><span class="special">,</span> <span class="identifier">T1</span><span class="special">></span> <span class="identifier">env_type</span><span class="special">;</span>
@@ -450,19 +451,19 @@
<span class="special">};</span>
</pre>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.inside_phoenix.actor_example"></a>Actor Example</h3></div></div></div>
+<a name="phoenix.inside_phoenix.actor_example"></a><a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.actor_example" title="Actor Example">Actor Example</a>
+</h3></div></div></div>
<p>
Let us see a very simple prototypical example of an actor. This is not a
- toy example. This is actually part of the library. Remember the reference?.
+ toy example. This is actually part of the library. Remember the <a class="link" href="primitives.html#phoenix.primitives.references" title="References"><code class="computeroutput"><span class="identifier">reference</span></code></a>?.
</p>
<p>
- First, we have a model of the <tt class="computeroutput"><span class="identifier">Eval</span></tt>
- concept: the <tt class="computeroutput"><span class="identifier">reference</span></tt>:
+ First, we have a model of the <code class="computeroutput"><span class="identifier">Eval</span></code>
+ concept: the <code class="computeroutput"><span class="identifier">reference</span></code>:
</p>
-<pre class="programlisting">
-<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">reference</span>
<span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Env</span><span class="special">></span>
@@ -484,14 +485,13 @@
<span class="special">};</span>
</pre>
<p>
- Models of <tt class="computeroutput"><span class="identifier">Eval</span></tt> are never
+ Models of <code class="computeroutput"><span class="identifier">Eval</span></code> are never
created directly and its instances never exist alone. We have to wrap it
- inside the <tt class="computeroutput"><span class="identifier">actor</span></tt> template
- class to be useful. The <tt class="computeroutput"><span class="identifier">ref</span></tt>
+ inside the <code class="computeroutput"><span class="identifier">actor</span></code> template
+ class to be useful. The <code class="computeroutput"><span class="identifier">ref</span></code>
template function does this for us:
</p>
-<pre class="programlisting">
-<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
<span class="identifier">actor</span><span class="special"><</span><span class="identifier">reference</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">></span> <span class="keyword">const</span>
<span class="identifier">ref</span><span class="special">(</span><span class="identifier">T</span><span class="special">&</span> <span class="identifier">v</span><span class="special">)</span>
<span class="special">{</span>
@@ -499,69 +499,68 @@
<span class="special">}</span>
</pre>
<p>
- The <tt class="computeroutput"><span class="identifier">reference</span></tt> template class
- conforms to the Eval concept. It has a nested <tt class="computeroutput"><span class="identifier">result</span></tt> metafunction that reflects the return
- type of its <tt class="computeroutput"><span class="identifier">eval</span></tt> member function,
- which peforms the actual function. <tt class="computeroutput"><span class="identifier">reference</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span></tt>
- stores a reference to a <tt class="computeroutput"><span class="identifier">T</span></tt>.
- Its <tt class="computeroutput"><span class="identifier">eval</span></tt> member function
- simply returns the reference. It does not make use of the environment <tt class="computeroutput"><span class="identifier">Env</span></tt>.
+ The <code class="computeroutput"><span class="identifier">reference</span></code> template class
+ conforms to the <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.actors_in_detail.eval_concept"><code class="computeroutput"><span class="identifier">Eval</span></code></a> concept. It has a nested <code class="computeroutput"><span class="identifier">result</span></code> metafunction that reflects the return
+ type of its <code class="computeroutput"><span class="identifier">eval</span></code> member function,
+ which peforms the actual function. <code class="computeroutput"><span class="identifier">reference</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span></code>
+ stores a reference to a <code class="computeroutput"><span class="identifier">T</span></code>.
+ Its <code class="computeroutput"><span class="identifier">eval</span></code> member function
+ simply returns the reference. It does not make use of the environment <code class="computeroutput"><span class="identifier">Env</span></code>.
</p>
<p>
<span class="emphasis"><em>Pretty simple...</em></span>
</p>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.inside_phoenix.composites_in_detail"></a><a href="inside_phoenix.html#phoenix.inside_phoenix.composites_in_detail" title="Composites
- In Detail">Composites
- In Detail</a></h3></div></div></div>
+<a name="phoenix.inside_phoenix.composites_in_detail"></a><a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.composites_in_detail" title="Composites In Detail">Composites
+ In Detail</a>
+</h3></div></div></div>
<p>
We stated before that composites are actors that are composed of zero or
- more actors (see Composite). This
+ more actors (see <a class="link" href="composite.html" title="Composite">Composite</a>). This
is not quite accurate. The definition was sufficient at that point where
we opted to keep things simple and not bury the reader with details which
she might not need anyway.
</p>
<p>
- Actually, a composite is a model of the Eval concept (more on this later).
+ Actually, a composite is a model of the <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.actors_in_detail.eval_concept"><code class="computeroutput"><span class="identifier">Eval</span></code></a> concept (more on this later).
At the same time, it is also composed of 0..N (where N is a predefined maximum)
- Eval instances and an eval policy.
- The individual Eval instances are stored in a tuple.
+ <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.actors_in_detail.eval_concept"><code class="computeroutput"><span class="identifier">Eval</span></code></a> instances and an eval policy.
+ The individual <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.actors_in_detail.eval_concept"><code class="computeroutput"><span class="identifier">Eval</span></code></a> instances are stored in a tuple.
</p>
<div class="note"><table border="0" summary="Note">
<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
-<tr><td colspan="2" align="left" valign="top"><p>
+<tr><td align="left" valign="top"><p>
In a sense, the original definition of "composite", more or less,
- will do just fine because Eval instances never exist alone
- and are always wrapped in an <tt class="computeroutput"><span class="identifier">actor</span></tt>
+ will do just fine because <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.actors_in_detail.eval_concept"><code class="computeroutput"><span class="identifier">Eval</span></code></a> instances never exist alone
+ and are always wrapped in an <code class="computeroutput"><span class="identifier">actor</span></code>
template class which inherits from it anyway. The resulting actor IS-AN
- Eval.
+ <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.actors_in_detail.eval_concept"><code class="computeroutput"><span class="identifier">Eval</span></code></a>.
</p></td></tr>
</table></div>
<div class="note"><table border="0" summary="Note">
<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
-<tr><td colspan="2" align="left" valign="top"><p>
- You can set <tt class="computeroutput"><span class="identifier">PHOENIX_COMPOSITE_LIMIT</span></tt>,
- the predefined maximum <tt class="computeroutput"><span class="identifier">Eval</span></tt>s
- (actors) a composite can take. By default, <tt class="computeroutput"><span class="identifier">PHOENIX_COMPOSITE_LIMIT</span></tt>
- is set to <tt class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></tt>
- (See Actors).
+<tr><td align="left" valign="top"><p>
+ You can set <code class="computeroutput"><span class="identifier">PHOENIX_COMPOSITE_LIMIT</span></code>,
+ the predefined maximum <code class="computeroutput"><span class="identifier">Eval</span></code>s
+ (actors) a composite can take. By default, <code class="computeroutput"><span class="identifier">PHOENIX_COMPOSITE_LIMIT</span></code>
+ is set to <code class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></code>
+ (See <a class="link" href="actors.html" title="Actors">Actors</a>).
</p></td></tr>
</table></div>
-<a name="phoenix.inside_phoenix.composites_in_detail.composite_template_class"></a><h2>
-<a name="id499816"></a>
- <a href="inside_phoenix.html#phoenix.inside_phoenix.composites_in_detail.composite_template_class">composite
+<a name="phoenix.inside_phoenix.composites_in_detail.composite_template_class"></a><h3>
+<a name="id798837"></a>
+ <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.composites_in_detail.composite_template_class">composite
template class</a>
- </h2>
-<pre class="programlisting">
-<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">EvalPolicy</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">EvalTuple</span><span class="special">></span>
+ </h3>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">EvalPolicy</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">EvalTuple</span><span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">composite</span> <span class="special">:</span> <span class="identifier">EvalTuple</span>
<span class="special">{</span>
<span class="keyword">typedef</span> <span class="identifier">EvalTuple</span> <span class="identifier">base_type</span><span class="special">;</span>
@@ -589,27 +588,27 @@
<span class="identifier">eval</span><span class="special">(</span><span class="identifier">Env</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">env</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="special">};</span>
</pre>
-<a name="phoenix.inside_phoenix.composites_in_detail.evaltuple"></a><h2>
-<a name="id500422"></a>
- EvalTuple
- </h2>
-<p>
- <tt class="computeroutput"><span class="identifier">EvalTuple</span></tt>, holds all the
- Eval instances. The <tt class="computeroutput"><span class="identifier">composite</span></tt> template class inherits from
- it. In addition to a default constructor and a constructor from an <tt class="computeroutput"><span class="identifier">EvalTuple</span></tt> object, there are templated (pass
- through) constructors for 1 to N arguments (again, where N == <tt class="computeroutput"><span class="identifier">PHOENIX_COMPOSITE_LIMIT</span></tt>). These constructors
- simply forward the arguments to the <tt class="computeroutput"><span class="identifier">EvalTuple</span></tt>
+<a name="phoenix.inside_phoenix.composites_in_detail.evaltuple"></a><h3>
+<a name="id799366"></a>
+ <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.composites_in_detail.evaltuple">EvalTuple</a>
+ </h3>
+<p>
+ <code class="computeroutput"><span class="identifier">EvalTuple</span></code>, holds all the
+ <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.actors_in_detail.eval_concept"><code class="computeroutput"><span class="identifier">Eval</span></code></a> instances. The <code class="computeroutput"><span class="identifier">composite</span></code> template class inherits from
+ it. In addition to a default constructor and a constructor from an <code class="computeroutput"><span class="identifier">EvalTuple</span></code> object, there are templated (pass
+ through) constructors for 1 to N arguments (again, where N == <code class="computeroutput"><span class="identifier">PHOENIX_COMPOSITE_LIMIT</span></code>). These constructors
+ simply forward the arguments to the <code class="computeroutput"><span class="identifier">EvalTuple</span></code>
base class.
</p>
-<a name="phoenix.inside_phoenix.composites_in_detail.evalpolicy"></a><h2>
-<a name="id500533"></a>
- EvalPolicy
- </h2>
-<p>
- The composite's <tt class="computeroutput"><span class="identifier">eval</span></tt> member
- function calls its <tt class="computeroutput"><span class="identifier">EvalPolicy</span></tt>'s
- <tt class="computeroutput"><span class="identifier">eval</span></tt> member function (a static
- member function) passing in the environment
+<a name="phoenix.inside_phoenix.composites_in_detail.evalpolicy"></a><h3>
+<a name="id799463"></a>
+ <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.composites_in_detail.evalpolicy">EvalPolicy</a>
+ </h3>
+<p>
+ The composite's <code class="computeroutput"><span class="identifier">eval</span></code> member
+ function calls its <code class="computeroutput"><span class="identifier">EvalPolicy</span></code>'s
+ <code class="computeroutput"><span class="identifier">eval</span></code> member function (a static
+ member function) passing in the <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.actors_in_detail.environment">environment</a>
and each of its actors, in parallel. The following diagram illustrates what's
happening:
</p>
@@ -617,67 +616,68 @@
<span class="inlinemediaobject"><img src="../images/funnel_out.png" alt="funnel_out"></span>
</p>
<div class="table">
-<a name="id500623"></a><p class="title"><b>Table 1.13. EvalPolicy Requirements</b></p>
-<table class="table" summary="EvalPolicy Requirements">
+<a name="id799542"></a><p class="title"><b>Table 1.13. EvalPolicy Requirements</b></p>
+<div class="table-contents"><table class="table" summary="EvalPolicy Requirements">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
- <p>
- Expression
- </p>
- </th>
+ <p>
+ Expression
+ </p>
+ </th>
<th>
- <p>
- Result/Semantics
- </p>
- </th>
+ <p>
+ Result/Semantics
+ </p>
+ </th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">x</span><span class="special">.</span><span class="identifier">eval</span><span class="special"><</span><span class="identifier">RT</span><span class="special">>(</span><span class="identifier">env</span><span class="special">,</span> <span class="identifier">eval0</span><span class="special">,</span>
- <span class="identifier">eval1</span><span class="special">,</span>
- <span class="special">...,</span> <span class="identifier">evalN</span><span class="special">)</span></tt>
- </p>
- </td>
-<td>
- <p>
- Evaluate the composite
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">x</span><span class="special">.</span><span class="identifier">eval</span><span class="special"><</span><span class="identifier">RT</span><span class="special">>(</span><span class="identifier">env</span><span class="special">,</span>
+ <span class="identifier">eval0</span><span class="special">,</span>
+ <span class="identifier">eval1</span><span class="special">,</span>
+ <span class="special">...,</span> <span class="identifier">evalN</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Evaluate the composite
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <tt class="computeroutput"><span class="identifier">T</span><span class="special">::</span><span class="identifier">result</span><span class="special"><</span><span class="identifier">Env</span><span class="special">,</span> <span class="identifier">Eval0</span><span class="special">,</span>
- <span class="identifier">Eval1</span><span class="special">,</span>
- <span class="identifier">Eval2</span><span class="special">,</span>
- <span class="special">...,</span> <span class="identifier">EvalN</span><span class="special">>::</span><span class="identifier">type</span></tt>
- </p>
- </td>
-<td>
- <p>
- The return type of eval
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">T</span><span class="special">::</span><span class="identifier">result</span><span class="special"><</span><span class="identifier">Env</span><span class="special">,</span>
+ <span class="identifier">Eval0</span><span class="special">,</span>
+ <span class="identifier">Eval1</span><span class="special">,</span>
+ <span class="identifier">Eval2</span><span class="special">,</span>
+ <span class="special">...,</span> <span class="identifier">EvalN</span><span class="special">>::</span><span class="identifier">type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The return type of eval
+ </p>
+ </td>
</tr>
</tbody>
-</table>
+</table></div>
</div>
-<p>
- The <tt class="computeroutput"><span class="identifier">EvalPolicy</span></tt> is expected
- to have a nested template class <tt class="computeroutput"><span class="identifier">result</span></tt>
- which has a typedef <tt class="computeroutput"><span class="identifier">type</span></tt>
- that reflects the return type of its member function <tt class="computeroutput"><span class="identifier">eval</span></tt>.
+<br class="table-break"><p>
+ The <code class="computeroutput"><span class="identifier">EvalPolicy</span></code> is expected
+ to have a nested template class <code class="computeroutput"><span class="identifier">result</span></code>
+ which has a typedef <code class="computeroutput"><span class="identifier">type</span></code>
+ that reflects the return type of its member function <code class="computeroutput"><span class="identifier">eval</span></code>.
Here's a typical example of the composite's eval member function for a 2-actor
composite:
</p>
-<pre class="programlisting">
-<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Env</span><span class="special">></span>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Env</span><span class="special">></span>
<span class="keyword">typename</span> <span class="identifier">result</span><span class="special"><</span><span class="identifier">Env</span><span class="special">>::</span><span class="identifier">type</span>
<span class="identifier">eval</span><span class="special">(</span><span class="identifier">Env</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">env</span><span class="special">)</span> <span class="keyword">const</span>
<span class="special">{</span>
@@ -690,9 +690,10 @@
</span><span class="special">}</span>
</pre>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.inside_phoenix.composing"></a>Composing</h3></div></div></div>
+<a name="phoenix.inside_phoenix.composing"></a><a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.composing" title="Composing">Composing</a>
+</h3></div></div></div>
<div class="toc"><dl>
<dt><span class="section">compose</span></dt>
<dt><span class="section">as_composite</span></dt>
@@ -704,73 +705,68 @@
are used to generate the composites. Using expression templates, we implement
a DSEL (Domain Specific Embedded Language) that mimicks native C++. You've
seen this DSEL in action in the preceding sections. It is most evident in
- the Statement section.
+ the <a class="link" href="composite.html#phoenix.composite.statement" title="Statement">Statement</a> section.
</p>
<p>
There are some facilities in the library to make composition of composites
- easier. We have a set of overloaded <tt class="computeroutput"><span class="identifier">compose</span></tt>
- functions and an <tt class="computeroutput"><span class="identifier">as_composite</span></tt>
+ easier. We have a set of overloaded <code class="computeroutput"><span class="identifier">compose</span></code>
+ functions and an <code class="computeroutput"><span class="identifier">as_composite</span></code>
metafunction. Together, these helpers make composing a breeze. We'll provide
- an <a href="inside_phoenix.html#phoenix.inside_phoenix.composing.composite_example" title="Composite
- Example">example
+ an <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.composing.composite_example" title="Composite Example">example
of a composite</a> later to see why.
</p>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h4 class="title">
-<a name="phoenix.inside_phoenix.composing.compose"></a>compose</h4></div></div></div>
-<pre class="programlisting">
-<span class="identifier">compose</span><span class="special"><</span><span class="identifier">EvalPolicy</span><span class="special">>(</span><span class="identifier">arg0</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="identifier">argN</span><span class="special">);</span>
+<a name="phoenix.inside_phoenix.composing.compose"></a><a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.composing.compose" title="compose">compose</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="identifier">compose</span><span class="special"><</span><span class="identifier">EvalPolicy</span><span class="special">>(</span><span class="identifier">arg0</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="identifier">argN</span><span class="special">);</span>
</pre>
<p>
- Given an EvalPolicy and some arguments
- <tt class="computeroutput"><span class="identifier">arg0</span></tt>...argN, returns a
- proper <tt class="computeroutput"><span class="identifier">composite</span></tt>. The arguments
+ Given an <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.composites_in_detail.evalpolicy"><code class="computeroutput"><span class="identifier">EvalPolicy</span></code></a> and some arguments
+ <code class="computeroutput"><span class="identifier">arg0</span></code>...argN, returns a
+ proper <code class="computeroutput"><span class="identifier">composite</span></code>. The arguments
may or may not be phoenix actors (primitives of composites). If not, the
arguments are converted to actors appropriately. For example:
</p>
-<pre class="programlisting">
-<span class="identifier">compose</span><span class="special"><</span><span class="identifier">X</span><span class="special">>(</span><span class="number">3</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">compose</span><span class="special"><</span><span class="identifier">X</span><span class="special">>(</span><span class="number">3</span><span class="special">)</span>
</pre>
<p>
- converts the argument <tt class="computeroutput"><span class="number">3</span></tt> to
- an <tt class="computeroutput"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">value</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">>(</span><span class="number">3</span><span class="special">)</span></tt>.
+ converts the argument <code class="computeroutput"><span class="number">3</span></code> to
+ an <code class="computeroutput"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">value</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">>(</span><span class="number">3</span><span class="special">)</span></code>.
</p>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h4 class="title">
-<a name="phoenix.inside_phoenix.composing.as_composite"></a>as_composite</h4></div></div></div>
-<pre class="programlisting">
-<span class="identifier">as_composite</span><span class="special"><</span><span class="identifier">EvalPolicy</span><span class="special">,</span> <span class="identifier">Arg0</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="identifier">ArgN</span><span class="special">>::</span><span class="identifier">type</span>
+<a name="phoenix.inside_phoenix.composing.as_composite"></a><a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.composing.as_composite" title="as_composite">as_composite</a>
+</h4></div></div></div>
+<pre class="programlisting"><span class="identifier">as_composite</span><span class="special"><</span><span class="identifier">EvalPolicy</span><span class="special">,</span> <span class="identifier">Arg0</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="identifier">ArgN</span><span class="special">>::</span><span class="identifier">type</span>
</pre>
<p>
- This is the metafunction counterpart of <tt class="computeroutput"><span class="identifier">compose</span></tt>.
- Given an EvalPolicy and some argument types
- <tt class="computeroutput"><span class="identifier">Arg0</span></tt>...ArgN, returns a
- proper <tt class="computeroutput"><span class="identifier">composite</span></tt> type.
+ This is the metafunction counterpart of <code class="computeroutput"><span class="identifier">compose</span></code>.
+ Given an <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.composites_in_detail.evalpolicy"><code class="computeroutput"><span class="identifier">EvalPolicy</span></code></a> and some argument types
+ <code class="computeroutput"><span class="identifier">Arg0</span></code>...ArgN, returns a
+ proper <code class="computeroutput"><span class="identifier">composite</span></code> type.
For example:
</p>
-<pre class="programlisting">
-<span class="identifier">as_composite</span><span class="special"><</span><span class="identifier">X</span><span class="special">,</span> <span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span>
+<pre class="programlisting"><span class="identifier">as_composite</span><span class="special"><</span><span class="identifier">X</span><span class="special">,</span> <span class="keyword">int</span><span class="special">>::</span><span class="identifier">type</span>
</pre>
<p>
- is the composite type of the <tt class="computeroutput"><span class="identifier">compose</span><span class="special"><</span><span class="identifier">X</span><span class="special">>(</span><span class="number">3</span><span class="special">)</span></tt>
+ is the composite type of the <code class="computeroutput"><span class="identifier">compose</span><span class="special"><</span><span class="identifier">X</span><span class="special">>(</span><span class="number">3</span><span class="special">)</span></code>
expression above.
</p>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h4 class="title">
-<a name="phoenix.inside_phoenix.composing.composite_example"></a><a href="inside_phoenix.html#phoenix.inside_phoenix.composing.composite_example" title="Composite
- Example">Composite
- Example</a></h4></div></div></div>
+<a name="phoenix.inside_phoenix.composing.composite_example"></a><a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.composing.composite_example" title="Composite Example">Composite
+ Example</a>
+</h4></div></div></div>
<p>
Now, let's examine an example. Again, this is not a toy example. This is
- actually part of the library. Remember the <a href="composite.html#phoenix.composite.statement.while__statement" title="while_
- Statement"><tt class="computeroutput"><span class="identifier">while_</span></tt></a> lazy statement? Putting
+ actually part of the library. Remember the <a class="link" href="composite.html#phoenix.composite.statement.while__statement" title="while_ Statement"><code class="computeroutput"><span class="identifier">while_</span></code></a> lazy statement? Putting
together everything we've learned so far, we will present it here in its
entirety (verbatim):
</p>
-<pre class="programlisting">
-<span class="keyword">struct</span> <span class="identifier">while_eval</span>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">while_eval</span>
<span class="special">{</span>
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Env</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Cond</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Do</span><span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">result</span>
@@ -811,26 +807,24 @@
<span class="special">}</span>
</pre>
<p>
- <tt class="computeroutput"><span class="identifier">while_eval</span></tt> is an example
- of an EvalPolicy. <tt class="computeroutput"><span class="identifier">while_gen</span></tt>
- and <tt class="computeroutput"><span class="identifier">while_</span></tt> are the expression
+ <code class="computeroutput"><span class="identifier">while_eval</span></code> is an example
+ of an <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.composites_in_detail.evalpolicy"><code class="computeroutput"><span class="identifier">EvalPolicy</span></code></a>. <code class="computeroutput"><span class="identifier">while_gen</span></code>
+ and <code class="computeroutput"><span class="identifier">while_</span></code> are the expression
template front ends. Let's break this apart to understand what's happening.
Let's start at the bottom. It's easier that way.
</p>
<p>
When you write:
</p>
-<pre class="programlisting">
-<span class="identifier">while_</span><span class="special">(</span><span class="identifier">cond</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">while_</span><span class="special">(</span><span class="identifier">cond</span><span class="special">)</span>
</pre>
<p>
- we generate an instance of <tt class="computeroutput"><span class="identifier">while_gen</span><span class="special"><</span><span class="identifier">Cond</span><span class="special">></span></tt>, where <tt class="computeroutput"><span class="identifier">Cond</span></tt>
- is the type of <tt class="computeroutput"><span class="identifier">cond</span></tt>. <tt class="computeroutput"><span class="identifier">cond</span></tt> can be an arbitrarily complex actor
- expression. The <tt class="computeroutput"><span class="identifier">while_gen</span></tt>
- template class has an <tt class="computeroutput"><span class="keyword">operator</span><span class="special">[]</span></tt> accepting another expression. If we write:
+ we generate an instance of <code class="computeroutput"><span class="identifier">while_gen</span><span class="special"><</span><span class="identifier">Cond</span><span class="special">></span></code>, where <code class="computeroutput"><span class="identifier">Cond</span></code>
+ is the type of <code class="computeroutput"><span class="identifier">cond</span></code>. <code class="computeroutput"><span class="identifier">cond</span></code> can be an arbitrarily complex actor
+ expression. The <code class="computeroutput"><span class="identifier">while_gen</span></code>
+ template class has an <code class="computeroutput"><span class="keyword">operator</span><span class="special">[]</span></code> accepting another expression. If we write:
</p>
-<pre class="programlisting">
-<span class="identifier">while_</span><span class="special">(</span><span class="identifier">cond</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">while_</span><span class="special">(</span><span class="identifier">cond</span><span class="special">)</span>
<span class="special">[</span>
<span class="identifier">do_</span>
<span class="special">]</span>
@@ -838,17 +832,15 @@
<p>
it will generate a proper composite with the type:
</p>
-<pre class="programlisting">
-<span class="identifier">as_composite</span><span class="special"><</span><span class="identifier">while_eval</span><span class="special">,</span> <span class="identifier">Cond</span><span class="special">,</span> <span class="identifier">Do</span><span class="special">>::</span><span class="identifier">type</span>
+<pre class="programlisting"><span class="identifier">as_composite</span><span class="special"><</span><span class="identifier">while_eval</span><span class="special">,</span> <span class="identifier">Cond</span><span class="special">,</span> <span class="identifier">Do</span><span class="special">>::</span><span class="identifier">type</span>
</pre>
<p>
- where <tt class="computeroutput"><span class="identifier">Cond</span></tt> is the type
- of <tt class="computeroutput"><span class="identifier">cond</span></tt> and <tt class="computeroutput"><span class="identifier">Do</span></tt> is the type of <tt class="computeroutput"><span class="identifier">do_</span></tt>.
- Notice how we are using phoenix's composition
- (<tt class="computeroutput"><span class="identifier">compose</span></tt> and <tt class="computeroutput"><span class="identifier">as_composite</span></tt>) mechanisms here
+ where <code class="computeroutput"><span class="identifier">Cond</span></code> is the type
+ of <code class="computeroutput"><span class="identifier">cond</span></code> and <code class="computeroutput"><span class="identifier">Do</span></code> is the type of <code class="computeroutput"><span class="identifier">do_</span></code>.
+ Notice how we are using phoenix's <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.composing" title="Composing">composition</a>
+ (<code class="computeroutput"><span class="identifier">compose</span></code> and <code class="computeroutput"><span class="identifier">as_composite</span></code>) mechanisms here
</p>
-<pre class="programlisting">
-<span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Do</span><span class="special">></span>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Do</span><span class="special">></span>
<span class="identifier">actor</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">as_composite</span><span class="special"><</span><span class="identifier">while_eval</span><span class="special">,</span> <span class="identifier">Cond</span><span class="special">,</span> <span class="identifier">Do</span><span class="special">>::</span><span class="identifier">type</span><span class="special">></span>
<span class="keyword">operator</span><span class="special">[](</span><span class="identifier">Do</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">do_</span><span class="special">)</span> <span class="keyword">const</span>
<span class="special">{</span>
@@ -856,25 +848,25 @@
<span class="special">}</span>
</pre>
<p>
- Finally, the <tt class="computeroutput"><span class="identifier">while_eval</span></tt>
+ Finally, the <code class="computeroutput"><span class="identifier">while_eval</span></code>
does its thing:
</p>
-<pre class="programlisting">
-<span class="keyword">while</span> <span class="special">(</span><span class="identifier">cond</span><span class="special">.</span><span class="identifier">eval</span><span class="special">(</span><span class="identifier">env</span><span class="special">))</span>
+<pre class="programlisting"><span class="keyword">while</span> <span class="special">(</span><span class="identifier">cond</span><span class="special">.</span><span class="identifier">eval</span><span class="special">(</span><span class="identifier">env</span><span class="special">))</span>
<span class="identifier">do_</span><span class="special">.</span><span class="identifier">eval</span><span class="special">(</span><span class="identifier">env</span><span class="special">);</span>
</pre>
<p>
- <tt class="computeroutput"><span class="identifier">cond</span></tt> and <tt class="computeroutput"><span class="identifier">do_</span></tt>, at this point, are instances of
- Eval. <tt class="computeroutput"><span class="identifier">cond</span></tt>
- and <tt class="computeroutput"><span class="identifier">do_</span></tt> are the Eval elements held by the composite's
- EvalTuple. <tt class="computeroutput"><span class="identifier">env</span></tt>
- is the Environment.
+ <code class="computeroutput"><span class="identifier">cond</span></code> and <code class="computeroutput"><span class="identifier">do_</span></code>, at this point, are instances of
+ <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.actors_in_detail.eval_concept"><code class="computeroutput"><span class="identifier">Eval</span></code></a>. <code class="computeroutput"><span class="identifier">cond</span></code>
+ and <code class="computeroutput"><span class="identifier">do_</span></code> are the <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.actors_in_detail.eval_concept"><code class="computeroutput"><span class="identifier">Eval</span></code></a> elements held by the composite's
+ <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.composites_in_detail.evaltuple"><code class="computeroutput"><span class="identifier">EvalTuple</span></code></a>. <code class="computeroutput"><span class="identifier">env</span></code>
+ is the <a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.actors_in_detail.environment"><code class="computeroutput"><span class="identifier">Environment</span></code></a>.
</p>
</div>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.inside_phoenix.extending"></a>Extending</h3></div></div></div>
+<a name="phoenix.inside_phoenix.extending"></a><a class="link" href="inside_phoenix.html#phoenix.inside_phoenix.extending" title="Extending">Extending</a>
+</h3></div></div></div>
<p>
We've shown how it is very easy to extend phoenix by writing new primitives
and composites. The modular design of Phoenix makes it extremely extensible.
@@ -894,7 +886,7 @@
</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 Joel
+<td align="right"><div class="copyright-footer">Copyright © 2002-2005 Joel
de Guzman, Dan Marsden<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)
@@ -903,7 +895,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="algorithm.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="wrap_up.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="algorithm.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="wrap_up.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/phoenix/doc/html/phoenix/introduction.html
==============================================================================
--- trunk/libs/spirit/phoenix/doc/html/phoenix/introduction.html (original)
+++ trunk/libs/spirit/phoenix/doc/html/phoenix/introduction.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -1,30 +1,31 @@
<html>
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Introduction</title>
-<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
-<link rel="start" href="../index.html" title="Chapter 1. Phoenix 2.0">
-<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
-<link rel="prev" href="../index.html" title="Chapter 1. Phoenix 2.0">
+<link rel="stylesheet" href="../../../../../../doc/src/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 2.0">
+<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
+<link rel="prev" href="../index.html" title="Chapter 1. Phoenix 2.0">
<link rel="next" href="starter_kit.html" title="Starter Kit">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="../index.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="starter_kit.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../index.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="starter_kit.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="phoenix.introduction"></a>Introduction</h2></div></div></div>
+<a name="phoenix.introduction"></a><a class="link" href="introduction.html" title="Introduction">Introduction</a>
+</h2></div></div></div>
<p>
<span class="inlinemediaobject"><img src="../images/banner.png" alt="banner"></span>
</p>
@@ -55,7 +56,7 @@
</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 Joel
+<td align="right"><div class="copyright-footer">Copyright © 2002-2005 Joel
de Guzman, Dan Marsden<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)
@@ -64,7 +65,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="../index.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="starter_kit.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../index.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="starter_kit.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/phoenix/doc/html/phoenix/organization.html
==============================================================================
--- trunk/libs/spirit/phoenix/doc/html/phoenix/organization.html (original)
+++ trunk/libs/spirit/phoenix/doc/html/phoenix/organization.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -1,11 +1,11 @@
<html>
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Organization</title>
-<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
-<link rel="start" href="../index.html" title="Chapter 1. Phoenix 2.0">
-<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
+<link rel="stylesheet" href="../../../../../../doc/src/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 2.0">
+<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
<link rel="prev" href="basics.html" title="Basics">
<link rel="next" href="actors.html" title="Actors">
</head>
@@ -13,18 +13,19 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="basics.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="actors.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="basics.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="actors.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="phoenix.organization"></a>Organization</h2></div></div></div>
+<a name="phoenix.organization"></a><a class="link" href="organization.html" title="Organization">Organization</a>
+</h2></div></div></div>
<p>
Care and attention to detail was given, painstakingly, to the design and implementation
of Phoenix.
@@ -46,25 +47,25 @@
The library has grown from the original Phoenix but still comprises only header
files. There are no object files to link against.
</p>
-<a name="phoenix.organization.core"></a><h2>
-<a name="id461546"></a>
- Core
- </h2>
+<a name="phoenix.organization.core"></a><h3>
+<a name="id765034"></a>
+ <a class="link" href="organization.html#phoenix.organization.core">Core</a>
+ </h3>
<p>
The lowest two layers comprise the core.
</p>
<p>
- The <tt class="computeroutput"><span class="identifier">Actor</span></tt> is the main concept
+ 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:
</p>
-<div class="orderedlist"><ol type="1">
-<li>
- Primitives
- </li>
-<li>
- Composites
- </li>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+ Primitives
+ </li>
+<li class="listitem">
+ Composites
+ </li>
</ol></div>
<p>
Primitives provide the basic building blocks of functionality within Phoenix.
@@ -76,272 +77,275 @@
again be another composite.
</p>
<div class="table">
-<a name="id461610"></a><p class="title"><b>Table 1.2. Modules</b></p>
-<table class="table" summary="Modules">
+<a name="id765093"></a><p class="title"><b>Table 1.2. Modules</b></p>
+<div class="table-contents"><table class="table" summary="Modules">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
- <p>
- Module
- </p>
- </th>
+ <p>
+ Module
+ </p>
+ </th>
<th>
- <p>
- Description
- </p>
- </th>
+ <p>
+ Description
+ </p>
+ </th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- Function
- </p>
- </td>
+ <p>
+ Function
+ </p>
+ </td>
<td>
- <p>
- Lazy functions support (e.g. <tt class="computeroutput"><span class="identifier">add</span></tt>)
- </p>
- </td>
+ <p>
+ Lazy functions support (e.g. <code class="computeroutput"><span class="identifier">add</span></code>)
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- Operator
- </p>
- </td>
+ <p>
+ Operator
+ </p>
+ </td>
<td>
- <p>
- Lazy operators support (e.g. <tt class="computeroutput"><span class="special">+</span></tt>)
- </p>
- </td>
+ <p>
+ Lazy operators support (e.g. <code class="computeroutput"><span class="special">+</span></code>)
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- Statement
- </p>
- </td>
+ <p>
+ Statement
+ </p>
+ </td>
<td>
- <p>
- Lazy statments (e.g. <tt class="computeroutput"><span class="identifier">if_</span></tt>,
- <tt class="computeroutput"><span class="identifier">while_</span></tt>)
- </p>
- </td>
+ <p>
+ Lazy statments (e.g. <code class="computeroutput"><span class="identifier">if_</span></code>,
+ <code class="computeroutput"><span class="identifier">while_</span></code>)
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- Object
- </p>
- </td>
+ <p>
+ Object
+ </p>
+ </td>
<td>
- <p>
- Lazy casts (e.g. <tt class="computeroutput"><span class="identifier">static_cast_</span></tt>),
- object creation destruction (e.g. <tt class="computeroutput"><span class="identifier">new_</span></tt>,
- <tt class="computeroutput"><span class="identifier">delete_</span></tt>)
- </p>
- </td>
+ <p>
+ Lazy casts (e.g. <code class="computeroutput"><span class="identifier">static_cast_</span></code>),
+ object creation destruction (e.g. <code class="computeroutput"><span class="identifier">new_</span></code>,
+ <code class="computeroutput"><span class="identifier">delete_</span></code>)
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- Scope
- </p>
- </td>
+ <p>
+ Scope
+ </p>
+ </td>
<td>
- <p>
- Support for scopes, local variables and lambda-lambda
- </p>
- </td>
+ <p>
+ Support for scopes, local variables and lambda-lambda
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- Bind
- </p>
- </td>
+ <p>
+ Bind
+ </p>
+ </td>
<td>
- <p>
- Lazy functions from free functions, member functions or member variables.
- </p>
- </td>
+ <p>
+ Lazy functions from free functions, member functions or member variables.
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- Container
- </p>
- </td>
+ <p>
+ Container
+ </p>
+ </td>
<td>
- <p>
- Set of predefined "lazy" functions that work on STL containers
- and sequences (e.g. <tt class="computeroutput"><span class="identifier">push_back</span></tt>).
- </p>
- </td>
+ <p>
+ Set of predefined "lazy" functions that work on STL containers
+ and sequences (e.g. <code class="computeroutput"><span class="identifier">push_back</span></code>).
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- Algorithm
- </p>
- </td>
+ <p>
+ Algorithm
+ </p>
+ </td>
<td>
- <p>
- Set of predefined "lazy" versions of the STL algorithms (e.g.
- <tt class="computeroutput"><span class="identifier">find_if</span></tt>).
- </p>
- </td>
+ <p>
+ Set of predefined "lazy" versions of the STL algorithms
+ (e.g. <code class="computeroutput"><span class="identifier">find_if</span></code>).
+ </p>
+ </td>
</tr>
</tbody>
-</table>
+</table></div>
</div>
-<p>
+<br class="table-break"><p>
Each module is defined in a header file with the same name. For example, the
- core module is defined in <tt class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</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></tt>.
+ core module is defined in <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</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="id461986"></a><p class="title"><b>Table 1.3. Includes</b></p>
-<table class="table" summary="Includes">
+<a name="id765410"></a><p class="title"><b>Table 1.3. Includes</b></p>
+<div class="table-contents"><table class="table" summary="Includes">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
- <p>
- Module
- </p>
- </th>
+ <p>
+ Module
+ </p>
+ </th>
<th>
- <p>
- File
- </p>
- </th>
+ <p>
+ File
+ </p>
+ </th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- Core
- </p>
- </td>
+ <p>
+ Core
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</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></tt>
- </p>
- </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">spirit</span><span class="special">/</span><span class="identifier">home</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>
+ </td>
</tr>
<tr>
<td>
- <p>
- Function
- </p>
- </td>
+ <p>
+ Function
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
- </p>
- </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">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">function</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- Operator
- </p>
- </td>
+ <p>
+ Operator
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="keyword">operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
- </p>
- </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">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="keyword">operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- Statement
- </p>
- </td>
+ <p>
+ Statement
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">statement</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
- </p>
- </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">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">statement</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- Object
- </p>
- </td>
+ <p>
+ Object
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
- </p>
- </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">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">object</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- Scope
- </p>
- </td>
+ <p>
+ Scope
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">scope</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
- </p>
- </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">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">scope</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- Bind
- </p>
- </td>
+ <p>
+ Bind
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">bind</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></tt>
- </p>
- </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">spirit</span><span class="special">/</span><span class="identifier">home</span><span class="special">/</span><span class="identifier">phoenix</span><span class="special">/</span><span class="identifier">bind</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- Container
- </p>
- </td>
+ <p>
+ Container
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</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></tt>
- </p>
- </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">spirit</span><span class="special">/</span><span class="identifier">home</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>
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- Algorithm
- </p>
- </td>
+ <p>
+ Algorithm
+ </p>
+ </td>
<td>
- <p>
- <tt class="computeroutput"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</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></tt>
- </p>
- </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">spirit</span><span class="special">/</span><span class="identifier">home</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>
+ </p>
+ </td>
</tr>
</tbody>
-</table>
+</table></div>
</div>
-<div class="sidebar"><p>
+<br class="table-break"><div class="sidebar">
+<p class="title"><b></b></p>
+<p>
<span class="inlinemediaobject"><img src="../images/tip.png" alt="tip"></span> Finer grained include files are available per feature;
see the succeeding sections.
- </p></div>
+ </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 Joel
+<td align="right"><div class="copyright-footer">Copyright © 2002-2005 Joel
de Guzman, Dan Marsden<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)
@@ -350,7 +354,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="basics.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="actors.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="basics.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="actors.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/phoenix/doc/html/phoenix/primitives.html
==============================================================================
--- trunk/libs/spirit/phoenix/doc/html/phoenix/primitives.html (original)
+++ trunk/libs/spirit/phoenix/doc/html/phoenix/primitives.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -1,11 +1,11 @@
<html>
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<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.66.1">
-<link rel="start" href="../index.html" title="Chapter 1. Phoenix 2.0">
-<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
+<link rel="stylesheet" href="../../../../../../doc/src/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 2.0">
+<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
<link rel="prev" href="actors.html" title="Actors">
<link rel="next" href="composite.html" title="Composite">
</head>
@@ -13,18 +13,19 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="actors.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="composite.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="actors.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="composite.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="phoenix.primitives"></a>Primitives</h2></div></div></div>
+<a name="phoenix.primitives"></a><a class="link" href="primitives.html" title="Primitives">Primitives</a>
+</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section">Arguments</span></dt>
<dt><span class="section">Values</span></dt>
@@ -38,92 +39,86 @@
is extensible. New primitives can be added anytime. Right out of the box, there
are only a few primitives. This section shall deal with these preset primitives.
</p>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.primitives.arguments"></a>Arguments</h3></div></div></div>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</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">argument</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<a name="phoenix.primitives.arguments"></a><a class="link" href="primitives.html#phoenix.primitives.arguments" title="Arguments">Arguments</a>
+</h3></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</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">argument</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
We use an instance of:
</p>
-<pre class="programlisting">
-<span class="identifier">actor</span><span class="special"><</span><span class="identifier">argument</span><span class="special"><</span><span class="identifier">N</span><span class="special">></span> <span class="special">></span>
+<pre class="programlisting"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">argument</span><span class="special"><</span><span class="identifier">N</span><span class="special">></span> <span class="special">></span>
</pre>
<p>
to represent the Nth function argument. The argument placeholder acts as
an imaginary data-bin where a function argument will be placed.
</p>
-<a name="phoenix.primitives.arguments.predefined_arguments"></a><h2>
-<a name="id463599"></a>
- <a href="primitives.html#phoenix.primitives.arguments.predefined_arguments">Predefined
+<a name="phoenix.primitives.arguments.predefined_arguments"></a><h3>
+<a name="id766693"></a>
+ <a class="link" href="primitives.html#phoenix.primitives.arguments.predefined_arguments">Predefined
Arguments</a>
- </h2>
+ </h3>
<p>
- There are a few predefined instances of <tt class="computeroutput"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">argument</span><span class="special"><</span><span class="identifier">N</span><span class="special">></span>
- <span class="special">></span></tt> named <tt class="computeroutput"><span class="identifier">arg1</span></tt>..<tt class="computeroutput"><span class="identifier">argN</span></tt>, and its BLL
- counterpart <tt class="computeroutput"><span class="identifier">_1</span></tt>..<tt class="computeroutput"><span class="identifier">_N</span></tt>. (where N is a predefined maximum).
+ There are a few predefined instances of <code class="computeroutput"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">argument</span><span class="special"><</span><span class="identifier">N</span><span class="special">></span>
+ <span class="special">></span></code> named <code class="computeroutput"><span class="identifier">arg1</span></code>..<code class="computeroutput"><span class="identifier">argN</span></code>, and its BLL
+ counterpart <code class="computeroutput"><span class="identifier">_1</span></code>..<code class="computeroutput"><span class="identifier">_N</span></code>. (where N is a predefined maximum).
</p>
<p>
- Here are some sample preset definitions of <tt class="computeroutput"><span class="identifier">arg1</span></tt>..<tt class="computeroutput"><span class="identifier">argN</span></tt>
+ Here are some sample preset definitions of <code class="computeroutput"><span class="identifier">arg1</span></code>..<code class="computeroutput"><span class="identifier">argN</span></code>
</p>
-<pre class="programlisting">
-<span class="identifier">actor</span><span class="special"><</span><span class="identifier">argument</span><span class="special"><</span><span class="number">0</span><span class="special">></span> <span class="special">></span> <span class="keyword">const</span> <span class="identifier">arg1</span> <span class="special">=</span> <span class="identifier">argument</span><span class="special"><</span><span class="number">0</span><span class="special">>();</span>
+<pre class="programlisting"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">argument</span><span class="special"><</span><span class="number">0</span><span class="special">></span> <span class="special">></span> <span class="keyword">const</span> <span class="identifier">arg1</span> <span class="special">=</span> <span class="identifier">argument</span><span class="special"><</span><span class="number">0</span><span class="special">>();</span>
<span class="identifier">actor</span><span class="special"><</span><span class="identifier">argument</span><span class="special"><</span><span class="number">1</span><span class="special">></span> <span class="special">></span> <span class="keyword">const</span> <span class="identifier">arg2</span> <span class="special">=</span> <span class="identifier">argument</span><span class="special"><</span><span class="number">1</span><span class="special">>();</span>
<span class="identifier">actor</span><span class="special"><</span><span class="identifier">argument</span><span class="special"><</span><span class="number">2</span><span class="special">></span> <span class="special">></span> <span class="keyword">const</span> <span class="identifier">arg3</span> <span class="special">=</span> <span class="identifier">argument</span><span class="special"><</span><span class="number">2</span><span class="special">>();</span>
</pre>
<p>
and its BLL
- <tt class="computeroutput"><span class="identifier">_1</span></tt>..<tt class="computeroutput"><span class="identifier">_N</span></tt>
+ <code class="computeroutput"><span class="identifier">_1</span></code>..<code class="computeroutput"><span class="identifier">_N</span></code>
style counterparts:
</p>
-<pre class="programlisting">
-<span class="identifier">actor</span><span class="special"><</span><span class="identifier">argument</span><span class="special"><</span><span class="number">0</span><span class="special">></span> <span class="special">></span> <span class="keyword">const</span> <span class="identifier">_1</span> <span class="special">=</span> <span class="identifier">argument</span><span class="special"><</span><span class="number">0</span><span class="special">>();</span>
+<pre class="programlisting"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">argument</span><span class="special"><</span><span class="number">0</span><span class="special">></span> <span class="special">></span> <span class="keyword">const</span> <span class="identifier">_1</span> <span class="special">=</span> <span class="identifier">argument</span><span class="special"><</span><span class="number">0</span><span class="special">>();</span>
<span class="identifier">actor</span><span class="special"><</span><span class="identifier">argument</span><span class="special"><</span><span class="number">1</span><span class="special">></span> <span class="special">></span> <span class="keyword">const</span> <span class="identifier">_2</span> <span class="special">=</span> <span class="identifier">argument</span><span class="special"><</span><span class="number">1</span><span class="special">>();</span>
<span class="identifier">actor</span><span class="special"><</span><span class="identifier">argument</span><span class="special"><</span><span class="number">2</span><span class="special">></span> <span class="special">></span> <span class="keyword">const</span> <span class="identifier">_3</span> <span class="special">=</span> <span class="identifier">argument</span><span class="special"><</span><span class="number">2</span><span class="special">>();</span>
</pre>
<div class="note"><table border="0" summary="Note">
<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
-<tr><td colspan="2" align="left" valign="top"><p>
- You can set <tt class="computeroutput"><span class="identifier">PHOENIX_ARG_LIMIT</span></tt>,
- the predefined maximum placeholder index. By default, <tt class="computeroutput"><span class="identifier">PHOENIX_ARG_LIMIT</span></tt>
- is set to <tt class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></tt>
- (See Actors).
+<tr><td align="left" valign="top"><p>
+ You can set <code class="computeroutput"><span class="identifier">PHOENIX_ARG_LIMIT</span></code>,
+ the predefined maximum placeholder index. By default, <code class="computeroutput"><span class="identifier">PHOENIX_ARG_LIMIT</span></code>
+ is set to <code class="computeroutput"><span class="identifier">PHOENIX_LIMIT</span></code>
+ (See <a class="link" href="actors.html" title="Actors">Actors</a>).
</p></td></tr>
</table></div>
-<a name="phoenix.primitives.arguments.user_defined_arguments"></a><h2>
-<a name="id464325"></a>
- <a href="primitives.html#phoenix.primitives.arguments.user_defined_arguments">User
+<a name="phoenix.primitives.arguments.user_defined_arguments"></a><h3>
+<a name="id767253"></a>
+ <a class="link" href="primitives.html#phoenix.primitives.arguments.user_defined_arguments">User
Defined Arguments</a>
- </h2>
+ </h3>
<p>
- When appropriate, you can define your own <tt class="computeroutput"><span class="identifier">argument</span><span class="special"><</span><span class="identifier">N</span><span class="special">></span></tt>
+ When appropriate, you can define your own <code class="computeroutput"><span class="identifier">argument</span><span class="special"><</span><span class="identifier">N</span><span class="special">></span></code>
names. For example:
</p>
-<pre class="programlisting">
-<span class="identifier">actor</span><span class="special"><</span><span class="identifier">argument</span><span class="special"><</span><span class="number">0</span><span class="special">></span> <span class="special">></span> <span class="identifier">x</span><span class="special">;</span> <span class="comment">// note zero based index
+<pre class="programlisting"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">argument</span><span class="special"><</span><span class="number">0</span><span class="special">></span> <span class="special">></span> <span class="identifier">x</span><span class="special">;</span> <span class="comment">// note zero based index
</span></pre>
<p>
- <tt class="computeroutput"><span class="identifier">x</span></tt> may now be used as a parameter
+ <code class="computeroutput"><span class="identifier">x</span></code> may now be used as a parameter
to a lazy function:
</p>
-<pre class="programlisting">
-<span class="identifier">add</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span> <span class="number">6</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">add</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span> <span class="number">6</span><span class="special">)</span>
</pre>
<p>
which is equivalent to:
</p>
-<pre class="programlisting">
-<span class="identifier">add</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">,</span> <span class="number">6</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">add</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">,</span> <span class="number">6</span><span class="special">)</span>
</pre>
-<a name="phoenix.primitives.arguments.evaluating_an_argument"></a><h2>
-<a name="id464544"></a>
- <a href="primitives.html#phoenix.primitives.arguments.evaluating_an_argument">Evaluating
+<a name="phoenix.primitives.arguments.evaluating_an_argument"></a><h3>
+<a name="id767420"></a>
+ <a class="link" href="primitives.html#phoenix.primitives.arguments.evaluating_an_argument">Evaluating
an Argument</a>
- </h2>
+ </h3>
<p>
An argument, when evaluated, selects the Nth argument from the those passed
in by the client.
@@ -131,8 +126,7 @@
<p>
For example:
</p>
-<pre class="programlisting">
-<span class="keyword">char</span> <span class="identifier">c</span> <span class="special">=</span> <span class="char">'A'</span><span class="special">;</span>
+<pre class="programlisting"><span class="keyword">char</span> <span class="identifier">c</span> <span class="special">=</span> <span class="char">'A'</span><span class="special">;</span>
<span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">123</span><span class="special">;</span>
<span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="identifier">s</span> <span class="special">=</span> <span class="string">"Hello World"</span><span class="special">;</span>
@@ -143,53 +137,49 @@
<p>
will print out:
</p>
-<pre class="programlisting">
-<span class="identifier">A</span>
+<pre class="programlisting"><span class="identifier">A</span>
<span class="number">123</span>
<span class="identifier">Hello</span> <span class="identifier">World</span>
</pre>
-<a name="phoenix.primitives.arguments.extra_arguments"></a><h2>
-<a name="id464915"></a>
- Extra Arguments
- </h2>
+<a name="phoenix.primitives.arguments.extra_arguments"></a><h3>
+<a name="id767715"></a>
+ <a class="link" href="primitives.html#phoenix.primitives.arguments.extra_arguments">Extra Arguments</a>
+ </h3>
<p>
In C and C++, a function can have extra arguments that are not at all used
by the function body itself. These extra arguments are simply ignored.
</p>
<p>
Phoenix also allows extra arguments to be passed. For example, recall our
- original <tt class="computeroutput"><span class="identifier">add</span></tt> function:
+ original <code class="computeroutput"><span class="identifier">add</span></code> function:
</p>
-<pre class="programlisting">
-<span class="identifier">add</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">,</span> <span class="identifier">arg2</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">add</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">,</span> <span class="identifier">arg2</span><span class="special">)</span>
</pre>
<p>
We know now that partially applying this function results to a function that
expects 2 arguments. However, the library is a bit more lenient and allows
- the caller to supply more arguments than is actually required. Thus, <tt class="computeroutput"><span class="identifier">add</span></tt> actually allows 2 <span class="emphasis"><em>or more</em></span>
+ the caller to supply more arguments than is actually required. Thus, <code class="computeroutput"><span class="identifier">add</span></code> actually allows 2 <span class="emphasis"><em>or more</em></span>
arguments. For instance, with:
</p>
-<pre class="programlisting">
-<span class="identifier">add</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="identifier">x</span><span class="special">,</span> <span class="identifier">y</span><span class="special">,</span> <span class="identifier">z</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">add</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="identifier">x</span><span class="special">,</span> <span class="identifier">y</span><span class="special">,</span> <span class="identifier">z</span><span class="special">)</span>
</pre>
<p>
- the third argument <tt class="computeroutput"><span class="identifier">z</span></tt> is ignored.
+ the third argument <code class="computeroutput"><span class="identifier">z</span></code> is ignored.
Taking this further, in-between arguments are also ignored. Example:
</p>
-<pre class="programlisting">
-<span class="identifier">add</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">,</span> <span class="identifier">arg5</span><span class="special">)(</span><span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">,</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">d</span><span class="special">,</span> <span class="identifier">e</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">add</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">,</span> <span class="identifier">arg5</span><span class="special">)(</span><span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">,</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">d</span><span class="special">,</span> <span class="identifier">e</span><span class="special">)</span>
</pre>
<p>
- Here, arguments b, c, and d are ignored. The function <tt class="computeroutput"><span class="identifier">add</span></tt>
- takes in the first argument (<tt class="computeroutput"><span class="identifier">arg1</span></tt>)
- and the fifth argument (<tt class="computeroutput"><span class="identifier">arg5</span></tt>).
+ Here, arguments b, c, and d are ignored. The function <code class="computeroutput"><span class="identifier">add</span></code>
+ takes in the first argument (<code class="computeroutput"><span class="identifier">arg1</span></code>)
+ and the fifth argument (<code class="computeroutput"><span class="identifier">arg5</span></code>).
</p>
<div class="note"><table border="0" summary="Note">
<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
-<tr><td colspan="2" align="left" valign="top"><p>
+<tr><td align="left" valign="top"><p>
There are a few reasons why enforcing strict arity is not desireable. A
case in point is the callback function. Typical callback functions provide
more information than is actually needed. Lambda functions are often used
@@ -197,112 +187,103 @@
</p></td></tr>
</table></div>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.primitives.values"></a>Values</h3></div></div></div>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</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">value</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<a name="phoenix.primitives.values"></a><a class="link" href="primitives.html#phoenix.primitives.values" title="Values">Values</a>
+</h3></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</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">value</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
Whenever we see a constant in a partially applied function, an
</p>
-<pre class="programlisting">
-<span class="identifier">actor</span><span class="special"><</span><span class="identifier">value</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">></span>
+<pre class="programlisting"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">value</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">></span>
</pre>
<p>
(where T is the type of the constant) is automatically created for us. For
instance:
</p>
-<pre class="programlisting">
-<span class="identifier">add</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">,</span> <span class="number">6</span><span class="special">)</span>
+<pre class="programlisting"><span class="identifier">add</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">,</span> <span class="number">6</span><span class="special">)</span>
</pre>
<p>
- Passing a second argument, <tt class="computeroutput"><span class="number">6</span></tt>,
- an <tt class="computeroutput"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">value</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">></span></tt>
+ Passing a second argument, <code class="computeroutput"><span class="number">6</span></code>,
+ an <code class="computeroutput"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">value</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">></span></code>
is implicitly created behind the scenes. This is also equivalent to:
</p>
-<pre class="programlisting">
-<span class="identifier">add</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">,</span> <span class="identifier">val</span><span class="special">(</span><span class="number">6</span><span class="special">))</span>
+<pre class="programlisting"><span class="identifier">add</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">,</span> <span class="identifier">val</span><span class="special">(</span><span class="number">6</span><span class="special">))</span>
</pre>
<p>
- <tt class="computeroutput"><span class="identifier">val</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></tt> generates
- an <tt class="computeroutput"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">value</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">></span></tt> where <tt class="computeroutput"><span class="identifier">T</span></tt>
- is the type of <tt class="computeroutput"><span class="identifier">x</span></tt>. In most
- cases, there's no need to explicitly use <tt class="computeroutput"><span class="identifier">val</span></tt>,
+ <code class="computeroutput"><span class="identifier">val</span><span class="special">(</span><span class="identifier">x</span><span class="special">)</span></code> generates
+ an <code class="computeroutput"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">value</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">></span></code> where <code class="computeroutput"><span class="identifier">T</span></code>
+ is the type of <code class="computeroutput"><span class="identifier">x</span></code>. In most
+ cases, there's no need to explicitly use <code class="computeroutput"><span class="identifier">val</span></code>,
but, as we'll see later on, there are situations where this is unavoidable.
</p>
-<a name="phoenix.primitives.values.evaluating_a_value"></a><h2>
-<a name="id465687"></a>
- <a href="primitives.html#phoenix.primitives.values.evaluating_a_value">Evaluating a
+<a name="phoenix.primitives.values.evaluating_a_value"></a><h3>
+<a name="id768309"></a>
+ <a class="link" href="primitives.html#phoenix.primitives.values.evaluating_a_value">Evaluating a
Value</a>
- </h2>
+ </h3>
<p>
Like arguments, values are also actors. As such, values can be evaluated.
Invoking a value gives the value's identity. 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">val</span><span class="special">(</span><span class="string">"Hello World"</span><span class="special">)();</span>
+<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">val</span><span class="special">(</span><span class="string">"Hello World"</span><span class="special">)();</span>
</pre>
<p>
prints out "3 Hello World".
</p>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.primitives.references"></a>References</h3></div></div></div>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</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">reference</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<a name="phoenix.primitives.references"></a><a class="link" href="primitives.html#phoenix.primitives.references" title="References">References</a>
+</h3></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</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">reference</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
Values are immutable constants. Attempting to modify a value will result
in a compile time error. When we want the function to modify the parameter,
- we use a reference instead. For instance, imagine a lazy function <tt class="computeroutput"><span class="identifier">add_assign</span></tt>:
+ we use a reference instead. For instance, imagine a lazy function <code class="computeroutput"><span class="identifier">add_assign</span></code>:
</p>
-<pre class="programlisting">
-<span class="keyword">void</span> <span class="identifier">add_assign</span><span class="special">(</span><span class="identifier">T</span><span class="special">&</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">y</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">x</span> <span class="special">+=</span> <span class="identifier">y</span><span class="special">;</span> <span class="special">}</span> <span class="comment">// pseudo code
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">add_assign</span><span class="special">(</span><span class="identifier">T</span><span class="special">&</span> <span class="identifier">x</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">y</span><span class="special">)</span> <span class="special">{</span> <span class="identifier">x</span> <span class="special">+=</span> <span class="identifier">y</span><span class="special">;</span> <span class="special">}</span> <span class="comment">// pseudo code
</span></pre>
<p>
Here, we want the first function argument, x, to be mutable. Obviously, we
cannot write:
</p>
-<pre class="programlisting">
-<span class="identifier">add_assign</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">)</span> <span class="comment">// error first argument is immutable
+<pre class="programlisting"><span class="identifier">add_assign</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">)</span> <span class="comment">// error first argument is immutable
</span></pre>
<p>
In C++, we can pass in a reference to a variable as the first argument in
our example above. Yet, by default, the library forces arguments passed to
- partially applied functions functions to be immutable values (see Values).
+ partially applied functions functions to be immutable values (see <a class="link" href="primitives.html#phoenix.primitives.values" title="Values">Values</a>).
To achieve our intent, we use:
</p>
-<pre class="programlisting">
-<span class="identifier">actor</span><span class="special"><</span><span class="identifier">reference</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">></span>
+<pre class="programlisting"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">reference</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="special">></span>
</pre>
<p>
- This is similar to <tt class="computeroutput"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">value</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span>
- <span class="special">></span></tt> above but instead holds a reference
+ This is similar to <code class="computeroutput"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">value</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span>
+ <span class="special">></span></code> above but instead holds a reference
to a variable.
</p>
<p>
- We normally don't instantiate <tt class="computeroutput"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">reference</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span>
- <span class="special">></span></tt> objects directly. Instead we
- use <tt class="computeroutput"><span class="identifier">ref</span></tt>. For example (where
- <tt class="computeroutput"><span class="identifier">i</span></tt> is an <tt class="computeroutput"><span class="keyword">int</span></tt>
+ We normally don't instantiate <code class="computeroutput"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">reference</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span>
+ <span class="special">></span></code> objects directly. Instead we
+ use <code class="computeroutput"><span class="identifier">ref</span></code>. For example (where
+ <code class="computeroutput"><span class="identifier">i</span></code> is an <code class="computeroutput"><span class="keyword">int</span></code>
variable):
</p>
-<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 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.primitives.references.evaluating_a_reference"></a><h2>
-<a name="id466317"></a>
- <a href="primitives.html#phoenix.primitives.references.evaluating_a_reference">Evaluating
+<a name="phoenix.primitives.references.evaluating_a_reference"></a><h3>
+<a name="id769065"></a>
+ <a class="link" href="primitives.html#phoenix.primitives.references.evaluating_a_reference">Evaluating
a Reference</a>
- </h2>
+ </h3>
<p>
References are actors. Hence, references can be evaluated. Such invocation
gives the references's identity. Example:
</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>
+<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">ref</span><span class="special">(</span><span class="identifier">i</span><span class="special">)()</span> <span class="special"><<</span> <span class="identifier">ref</span><span class="special">(</span><span class="identifier">s</span><span class="special">)();</span>
</pre>
@@ -310,39 +291,39 @@
prints out "3 Hello World"
</p>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.primitives.constant_references"></a>Constant References</h3></div></div></div>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</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">reference</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<a name="phoenix.primitives.constant_references"></a><a class="link" href="primitives.html#phoenix.primitives.constant_references" title="Constant References">Constant References</a>
+</h3></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</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">reference</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
- Another free function <tt class="computeroutput"><span class="identifier">cref</span><span class="special">(</span><span class="identifier">cv</span><span class="special">)</span></tt>
- may also be used. <tt class="computeroutput"><span class="identifier">cref</span><span class="special">(</span><span class="identifier">cv</span><span class="special">)</span></tt> creates
- an <tt class="computeroutput"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">reference</span><span class="special"><</span><span class="identifier">T</span> <span class="keyword">const</span><span class="special">&></span> <span class="special">></span></tt>
- object. This is similar to <tt class="computeroutput"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">value</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span>
- <span class="special">></span></tt> but when the data to be passed
- as argument to a function is heavy and expensive to copy by value, the <tt class="computeroutput"><span class="identifier">cref</span><span class="special">(</span><span class="identifier">cv</span><span class="special">)</span></tt> offers a lighter alternative.
+ Another free function <code class="computeroutput"><span class="identifier">cref</span><span class="special">(</span><span class="identifier">cv</span><span class="special">)</span></code>
+ may also be used. <code class="computeroutput"><span class="identifier">cref</span><span class="special">(</span><span class="identifier">cv</span><span class="special">)</span></code> creates
+ an <code class="computeroutput"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">reference</span><span class="special"><</span><span class="identifier">T</span> <span class="keyword">const</span><span class="special">&></span> <span class="special">></span></code>
+ object. This is similar to <code class="computeroutput"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">value</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span>
+ <span class="special">></span></code> but when the data to be passed
+ as argument to a function is heavy and expensive to copy by value, the <code class="computeroutput"><span class="identifier">cref</span><span class="special">(</span><span class="identifier">cv</span><span class="special">)</span></code> offers a lighter alternative.
</p>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.primitives.nothing"></a>Nothing</h3></div></div></div>
-<pre class="programlisting">
-<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</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">nothing</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<a name="phoenix.primitives.nothing"></a><a class="link" href="primitives.html#phoenix.primitives.nothing" title="Nothing">Nothing</a>
+</h3></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</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">nothing</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
- Finally, the <tt class="computeroutput"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">null_actor</span><span class="special">></span></tt>
- does nothing; (a "bum", if you will :-). There's a sole <tt class="computeroutput"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">null_actor</span><span class="special">></span></tt>
+ Finally, the <code class="computeroutput"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">null_actor</span><span class="special">></span></code>
+ does nothing; (a "bum", if you will :-). There's a sole <code class="computeroutput"><span class="identifier">actor</span><span class="special"><</span><span class="identifier">null_actor</span><span class="special">></span></code>
instance named "nothing". This actor is actually useful in situations
- where we don't want to do anything. (See <a href="composite.html#phoenix.composite.statement.for__statement" title="for_ Statement">for_
+ where we don't want to do anything. (See <a class="link" href="composite.html#phoenix.composite.statement.for__statement" title="for_ Statement">for_
Statement</a> for example).
</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 Joel
+<td align="right"><div class="copyright-footer">Copyright © 2002-2005 Joel
de Guzman, Dan Marsden<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)
@@ -351,7 +332,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="actors.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="composite.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="actors.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="composite.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/phoenix/doc/html/phoenix/references.html
==============================================================================
--- trunk/libs/spirit/phoenix/doc/html/phoenix/references.html (original)
+++ trunk/libs/spirit/phoenix/doc/html/phoenix/references.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -1,81 +1,82 @@
<html>
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<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.66.1">
-<link rel="start" href="../index.html" title="Chapter 1. Phoenix 2.0">
-<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
+<link rel="stylesheet" href="../../../../../../doc/src/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 2.0">
+<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
<link rel="prev" href="acknowledgement.html" title="Acknowledgement">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="acknowledgement.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a>
+<a accesskey="p" href="acknowledgement.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="phoenix.references"></a>References</h2></div></div></div>
-<div class="orderedlist"><ol type="1">
-<li>
- Why Functional Programming Matters, John Hughes, 1989. Available online at
- http://www.math.chalmers.se/~rjmh/Papers/whyfp.html.
- </li>
-<li>
- Boost.Lambda library, Jaakko Jarvi, 1999-2004 Jaakko Jarvi, Gary Powell.
- Available online at http://www.boost.org/libs/lambda/.
- </li>
-<li>
- Functional Programming in C++ using the FC++ Library: a short article introducing
- FC++, Brian McNamara and Yannis Smaragdakis, August 2003. Available online
- at http://www.cc.gatech.edu/~yannis/fc++/.
- </li>
-<li>
- Side-effects and partial function application in C++, Jaakko Jarvi and Gary
- Powell, 2001. Available online at http://osl.iu.edu/~jajarvi/publications/papers/mpool01.pdf.
- </li>
-<li>
- Spirit Version 1.8.1, Joel de Guzman, Nov 2004. Available online at http://www.boost.org/libs/spirit/.
- </li>
-<li>
- The Boost MPL Library, Aleksey Gurtovoy and David Abrahams, 2002-2004. Available
- online at http://www.boost.org/libs/mpl/.
- </li>
-<li>
- Generic Programming Redesign of Patterns, Proceedings of the 5th European
- Conference on Pattern Languages of Programs, (EuroPLoP'2000) Irsee, Germany,
- July 2000. Available online at http://www.coldewey.com/europlop2000/papers/geraud%2Bduret.zip.
- </li>
-<li>
- A Gentle Introduction to Haskell, Paul Hudak, John Peterson and Joseph Fasel,
- 1999. Available online at http://www.haskell.org/tutorial/.
- </li>
-<li>
- Large scale software design, John Lackos, ISBN 0201633620, Addison-Wesley,
- July 1996.
- </li>
-<li>
- Design Patterns, Elements of Reusable Object-Oriented Software, Erich Gamma,
- Richard Helm, Ralph Jhonson, and John Vlissides, Addison-Wesley, 1995.
- </li>
-<li>
- The Forwarding Problem: Arguments Peter Dimov, Howard E. Hinnant, Dave Abrahams,
- September 09, 2002. Available online: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1385.htm" target="_top">Forwarding
- Function Problem</a>.
- </li>
+<a name="phoenix.references"></a><a class="link" href="references.html" title="References">References</a>
+</h2></div></div></div>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem">
+ Why Functional Programming Matters, John Hughes, 1989. Available online
+ at http://www.math.chalmers.se/~rjmh/Papers/whyfp.html.
+ </li>
+<li class="listitem">
+ Boost.Lambda library, Jaakko Jarvi, 1999-2004 Jaakko Jarvi, Gary Powell.
+ Available online at http://www.boost.org/libs/lambda/.
+ </li>
+<li class="listitem">
+ Functional Programming in C++ using the FC++ Library: a short article introducing
+ FC++, Brian McNamara and Yannis Smaragdakis, August 2003. Available online
+ at http://www.cc.gatech.edu/~yannis/fc++/.
+ </li>
+<li class="listitem">
+ Side-effects and partial function application in C++, Jaakko Jarvi and
+ Gary Powell, 2001. Available online at http://osl.iu.edu/~jajarvi/publications/papers/mpool01.pdf.
+ </li>
+<li class="listitem">
+ Spirit Version 1.8.1, Joel de Guzman, Nov 2004. Available online at http://www.boost.org/libs/spirit/.
+ </li>
+<li class="listitem">
+ The Boost MPL Library, Aleksey Gurtovoy and David Abrahams, 2002-2004.
+ Available online at http://www.boost.org/libs/mpl/.
+ </li>
+<li class="listitem">
+ Generic Programming Redesign of Patterns, Proceedings of the 5th European
+ Conference on Pattern Languages of Programs, (EuroPLoP'2000) Irsee, Germany,
+ July 2000. Available online at http://www.coldewey.com/europlop2000/papers/geraud%2Bduret.zip.
+ </li>
+<li class="listitem">
+ A Gentle Introduction to Haskell, Paul Hudak, John Peterson and Joseph
+ Fasel, 1999. Available online at http://www.haskell.org/tutorial/.
+ </li>
+<li class="listitem">
+ Large scale software design, John Lackos, ISBN 0201633620, Addison-Wesley,
+ July 1996.
+ </li>
+<li class="listitem">
+ Design Patterns, Elements of Reusable Object-Oriented Software, Erich Gamma,
+ Richard Helm, Ralph Jhonson, and John Vlissides, Addison-Wesley, 1995.
+ </li>
+<li class="listitem">
+ The Forwarding Problem: Arguments Peter Dimov, Howard E. Hinnant, Dave
+ Abrahams, September 09, 2002. Available online: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1385.htm" target="_top">Forwarding
+ Function Problem</a>.
+ </li>
</ol></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 Joel
+<td align="right"><div class="copyright-footer">Copyright © 2002-2005 Joel
de Guzman, Dan Marsden<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)
@@ -84,7 +85,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="acknowledgement.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a>
+<a accesskey="p" href="acknowledgement.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/phoenix/doc/html/phoenix/starter_kit.html
==============================================================================
--- trunk/libs/spirit/phoenix/doc/html/phoenix/starter_kit.html (original)
+++ trunk/libs/spirit/phoenix/doc/html/phoenix/starter_kit.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -1,11 +1,11 @@
<html>
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Starter Kit</title>
-<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
-<link rel="start" href="../index.html" title="Chapter 1. Phoenix 2.0">
-<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
+<link rel="stylesheet" href="../../../../../../doc/src/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 2.0">
+<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
<link rel="prev" href="introduction.html" title="Introduction">
<link rel="next" href="basics.html" title="Basics">
</head>
@@ -13,18 +13,19 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="introduction.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="basics.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="introduction.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="basics.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="phoenix.starter_kit"></a>Starter Kit</h2></div></div></div>
+<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>
@@ -58,10 +59,10 @@
to provide you with annotated exemplars instead. Hopefully, this will get you
into high gear quickly.
</p>
-<a name="phoenix.starter_kit.functors_everywhere"></a><h2>
-<a name="id387510"></a>
- Functors everywhere
- </h2>
+<a name="phoenix.starter_kit.functors_everywhere"></a><h3>
+<a name="id760240"></a>
+ <a class="link" href="starter_kit.html#phoenix.starter_kit.functors_everywhere">Functors everywhere</a>
+ </h3>
<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
@@ -69,72 +70,73 @@
</p>
<div class="note"><table border="0" summary="Note">
<tr>
-<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
-<tr><td colspan="2" align="left" valign="top"><p>
+<tr><td align="left" valign="top"><p>
Functors are so ubiquitous in Phoenix that, in the manual, the words <span class="emphasis"><em>"functor"</em></span>
and <span class="emphasis"><em>"function"</em></span> are used interchangeably.
</p></td></tr>
</table></div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.starter_kit.values"></a>Values</h3></div></div></div>
+<a name="phoenix.starter_kit.values"></a><a class="link" href="starter_kit.html#phoenix.starter_kit.values" title="Values">Values</a>
+</h3></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>
+<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 <tt class="computeroutput"><span class="keyword">int</span></tt>, <tt class="computeroutput"><span class="number">3</span></tt>. The second evaluates to a nullary function
- that returns a <tt 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></tt>, <tt class="computeroutput"><span class="string">"Hello,
- World"</span></tt>.
- </p>
-<a name="phoenix.starter_kit.values.lazy_evaluation"></a><h2>
-<a name="id385403"></a>
- Lazy Evaluation
- </h2>
+ 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.values.lazy_evaluation"></a><h3>
+<a name="id760388"></a>
+ <a class="link" href="starter_kit.html#phoenix.starter_kit.values.lazy_evaluation">Lazy Evaluation</a>
+ </h3>
<p>
- Confused? <tt class="computeroutput"><span class="identifier">val</span><span class="special">(</span><span class="number">3</span><span class="special">)</span></tt> is a unary
+ 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>. <tt class="computeroutput"><span class="identifier">val</span><span class="special">(</span><span class="number">3</span><span class="special">)</span></tt>
- evaluates to (returns) a nullary function. Aha! <tt class="computeroutput"><span class="identifier">val</span><span class="special">(</span><span class="number">3</span><span class="special">)</span></tt>
- returns a function! So, since <tt class="computeroutput"><span class="identifier">val</span><span class="special">(</span><span class="number">3</span><span class="special">)</span></tt>
+ 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">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">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>
<p>
(See values.cpp)
</p>
-<div class="sidebar"><p>
- <span class="inlinemediaobject"><img src="../images/tip.png" alt="tip"></span> Learn more about values here.
- </p></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 values <a class="link" href="primitives.html#phoenix.primitives.values" title="Values">here.</a>
+ </p>
+</div>
<p>
The second function call (the one with no arguments) calls the nullary function
- which then returns <tt class="computeroutput"><span class="number">3</span></tt>. The need
+ 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"><b><span class="emphasis"><em>Lazily Evaluated</em></span></b></span>. The
+ <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.values.callbacks"></a><h2>
-<a name="id456050"></a>
- Callbacks
- </h2>
+<a name="phoenix.starter_kit.values.callbacks"></a><h3>
+<a name="id760603"></a>
+ <a class="link" href="starter_kit.html#phoenix.starter_kit.values.callbacks">Callbacks</a>
+ </h3>
<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 <tt class="computeroutput"><span class="identifier">val</span><span class="special">(</span><span class="number">3</span><span class="special">)</span></tt> as a callback function (and in most cases
+ 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>
+<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>
@@ -152,42 +154,45 @@
(See callback.cpp)
</p>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.starter_kit.references"></a>References</h3></div></div></div>
+<a name="phoenix.starter_kit.references"></a><a class="link" href="starter_kit.html#phoenix.starter_kit.references" title="References">References</a>
+</h3></div></div></div>
<p>
References are functions. They hold a reference to a value stored somehere.
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>
+<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 <tt class="computeroutput"><span class="identifier">references</span></tt> to
- <tt class="computeroutput"><span class="identifier">i</span></tt> and <tt class="computeroutput"><span class="identifier">s</span></tt>
+ 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>
+<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 <tt class="computeroutput"><span class="identifier">val</span></tt>, the expressions
- above evaluates to a nullary function; the first one returning an <tt class="computeroutput"><span class="keyword">int</span><span class="special">&</span></tt>,
- and the second one returning a <tt class="computeroutput"><span class="keyword">char</span>
- <span class="keyword">const</span><span class="special">*&</span></tt>.
+ 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>
- <span class="inlinemediaobject"><img src="../images/tip.png" alt="tip"></span> Learn more about references here.
- </p></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 references <a class="link" href="primitives.html#phoenix.primitives.references" title="References">here.</a>
+ </p>
+</div>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.starter_kit.arguments"></a>Arguments</h3></div></div></div>
+<a name="phoenix.starter_kit.arguments"></a><a class="link" href="starter_kit.html#phoenix.starter_kit.arguments" title="Arguments">Arguments</a>
+</h3></div></div></div>
<p>
Arguments are also functions? You bet!
</p>
@@ -198,17 +203,15 @@
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
+<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>
- <tt class="computeroutput"><span class="identifier">argN</span></tt> returns the Nth argument.
+ <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>
+<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"
@@ -216,61 +219,65 @@
<p>
(See arguments.cpp)
</p>
-<div class="sidebar"><p>
- <span class="inlinemediaobject"><img src="../images/tip.png" alt="tip"></span> Learn more about arguments here.
- </p></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 arguments <a class="link" href="primitives.html#phoenix.primitives.arguments" title="Arguments">here.</a>
+ </p>
+</div>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.starter_kit.composites"></a>Composites</h3></div></div></div>
+<a name="phoenix.starter_kit.composites"></a><a class="link" href="starter_kit.html#phoenix.starter_kit.composites" title="Composites">Composites</a>
+</h3></div></div></div>
<p>
- What we have seen so far, are what are called <span class="bold"><b>primitives</b></span>.
+ 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>
<p>
Things start to get interesting when we start <span class="emphasis"><em>composing</em></span>
- primitives to form <span class="bold"><b>composites</b></span>. The composites
+ primitives to form <span class="bold"><strong>composites</strong></span>. The composites
can, in turn, be composed to form even more complex composites.
</p>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.starter_kit.lazy_operators"></a>Lazy Operators</h3></div></div></div>
+<a name="phoenix.starter_kit.lazy_operators"></a><a class="link" href="starter_kit.html#phoenix.starter_kit.lazy_operators" title="Lazy Operators">Lazy Operators</a>
+</h3></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>
+<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: <tt class="computeroutput"><span class="number">3</span> <span class="special">*</span>
- <span class="identifier">arg3</span></tt>. This expression is actually
- a short-hand equivalent to: <tt 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></tt>.
+ 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 <tt class="computeroutput"><span class="identifier">val</span></tt>.
+ 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 type="disc">
-<li>
- In a binary expression (e.g. <tt class="computeroutput"><span class="number">3</span> <span class="special">*</span> <span class="identifier">arg3</span></tt>),
- at least one of the operands must be a phoenix primitive or composite.
- </li>
-<li>
- In a unary expression (e.g. <tt class="computeroutput"><span class="identifier">arg1</span><span class="special">++</span></tt>), the single operand must be a phoenix
- primitive or composite.
- </li>
+<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 in 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
+<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
@@ -281,78 +288,80 @@
</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>
- <span class="inlinemediaobject"><img src="../images/tip.png" alt="tip"></span> Learn more about operators here.
- </p></div>
-<a name="phoenix.starter_kit.lazy_operators.first_practical_example"></a><h2>
-<a name="id457702"></a>
- <a href="starter_kit.html#phoenix.starter_kit.lazy_operators.first_practical_example">First
+<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="composite.html#phoenix.composite.operator" title="Operator">here.</a>
+ </p>
+</div>
+<a name="phoenix.starter_kit.lazy_operators.first_practical_example"></a><h3>
+<a name="id761945"></a>
+ <a class="link" href="starter_kit.html#phoenix.starter_kit.lazy_operators.first_practical_example">First
Practical Example</a>
- </h2>
+ </h3>
<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 <tt class="computeroutput"><span class="identifier">find_if</span></tt>
+ 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>
+<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 <tt class="computeroutput"><span class="identifier">find_if</span></tt>
+ 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">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 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="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">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">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 <tt 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></tt> automagically creates a functor with the
+ 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 <tt 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></tt> expression.
+ 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>
- <span class="inlinemediaobject"><img src="../images/tip.png" alt="tip"></span> ...<span class="bold"><b>That's it, we're done</b></span>.
+<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>
+ </p>
+</div>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.starter_kit.lazy_statements"></a>Lazy Statements</h3></div></div></div>
+<a name="phoenix.starter_kit.lazy_statements"></a><a class="link" href="starter_kit.html#phoenix.starter_kit.lazy_statements" title="Lazy Statements">Lazy Statements</a>
+</h3></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>
+<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="identifier">cout</span> <span class="special"><<</span> <span class="identifier">arg1</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">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>
+<pre class="programlisting"><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">cout</span> <span class="special"><<</span> <span class="identifier">arg1</span> <span class="special"><<</span> <span class="string">", "</span>
@@ -362,43 +371,49 @@
<p>
(See if.cpp)
</p>
-<div class="sidebar"><p>
- <span class="inlinemediaobject"><img src="../images/tip.png" alt="tip"></span> Learn more about statements here.
- </p></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 statements <a class="link" href="composite.html#phoenix.composite.statement" title="Statement">here.</a>
+ </p>
+</div>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.starter_kit.construct__new__delete__casts"></a><a href="starter_kit.html#phoenix.starter_kit.construct__new__delete__casts" title="Construct,
- New, Delete, Casts">Construct,
- New, Delete, Casts</a></h3></div></div></div>
+<a name="phoenix.starter_kit.construct__new__delete__casts"></a><a class="link" href="starter_kit.html#phoenix.starter_kit.construct__new__delete__casts" title="Construct, New, Delete, Casts">Construct,
+ New, Delete, Casts</a>
+</h3></div></div></div>
<p>
You'll probably want to work with objects. There are lazy versions of constructor
- calls, <tt class="computeroutput"><span class="keyword">new</span></tt>, <tt class="computeroutput"><span class="keyword">delete</span></tt>
+ 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
+<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="../../../../../../doc/html/images/note.png"></td>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
-<tr><td colspan="2" align="left" valign="top"><p>
+<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 <tt class="computeroutput"><span class="char">'_'</span></tt>
+ are appended with a single trailing underscore <code class="computeroutput"><span class="char">'_'</span></code>
</p></td></tr>
</table></div>
-<div class="sidebar"><p>
- <span class="inlinemediaobject"><img src="../images/tip.png" alt="tip"></span> Learn more about this here.
- </p></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="composite.html#phoenix.composite.object" title="Object">here.</a>
+ </p>
+</div>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.starter_kit.lazy_functions"></a>Lazy Functions</h3></div></div></div>
+<a name="phoenix.starter_kit.lazy_functions"></a><a class="link" href="starter_kit.html#phoenix.starter_kit.lazy_functions" title="Lazy Functions">Lazy Functions</a>
+</h3></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
@@ -408,11 +423,10 @@
</p>
<p>
Lazy functions are your friends. The library provides a facility to make
- lazy functions. The code below is a rewrite of the <tt class="computeroutput"><span class="identifier">is_odd</span></tt>
+ 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>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">is_odd_impl</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">struct</span> <span class="identifier">result</span>
@@ -429,73 +443,76 @@
<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><h2>
-<a name="id459051"></a>
- <a href="starter_kit.html#phoenix.starter_kit.lazy_functions.things_to_note_">Things
+<a name="phoenix.starter_kit.lazy_functions.things_to_note_"></a><h3>
+<a name="id763023"></a>
+ <a class="link" href="starter_kit.html#phoenix.starter_kit.lazy_functions.things_to_note_">Things
to note:</a>
- </h2>
-<div class="itemizedlist"><ul type="disc">
-<li>
-<tt class="computeroutput"><span class="identifier">result</span></tt> is a nested metafunction
- that reflects the return type of the function (in this case, bool). This
- makes the function fully polymorphic: It can work with arbitrary <tt class="computeroutput"><span class="identifier">Arg</span></tt> types.
- </li>
-<li>
- There are as many Args in the <tt class="computeroutput"><span class="identifier">result</span></tt>
- metafunction as in the actual <tt class="computeroutput"><span class="keyword">operator</span><span class="special">()</span></tt>.
- </li>
-<li>
-<tt class="computeroutput"><span class="identifier">is_odd_impl</span></tt> implements
- the function.
- </li>
-<li>
-<tt class="computeroutput"><span class="identifier">is_odd</span></tt>, an instance of
- <tt class="computeroutput"><span class="identifier">function</span><span class="special"><</span><span class="identifier">is_odd_impl</span><span class="special">></span></tt>,
- is the lazy function.
- </li>
+ </h3>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">result</span></code> is a nested metafunction
+ that reflects the return type of the function (in this case, bool). This
+ makes the function fully polymorphic: It can work with arbitrary <code class="computeroutput"><span class="identifier">Arg</span></code> types.
+ </li>
+<li class="listitem">
+ There are as many Args in the <code class="computeroutput"><span class="identifier">result</span></code>
+ metafunction as in the actual <code class="computeroutput"><span class="keyword">operator</span><span class="special">()</span></code>.
+ </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, <tt class="computeroutput"><span class="identifier">is_odd</span></tt> is a truly lazy
+ 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">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 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">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.lazy_functions.predefined_lazy_functions"></a><h2>
-<a name="id459305"></a>
- <a href="starter_kit.html#phoenix.starter_kit.lazy_functions.predefined_lazy_functions">Predefined
+<a name="phoenix.starter_kit.lazy_functions.predefined_lazy_functions"></a><h3>
+<a name="id763234"></a>
+ <a class="link" href="starter_kit.html#phoenix.starter_kit.lazy_functions.predefined_lazy_functions">Predefined
Lazy Functions</a>
- </h2>
+ </h3>
<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 Container).
+ begin, pop_back, pop_front, push_back, push_front, etc. (See <a class="link" href="container.html" title="Container">Container</a>).
</p>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
-<a name="phoenix.starter_kit.more"></a>More</h3></div></div></div>
+<a name="phoenix.starter_kit.more"></a><a class="link" href="starter_kit.html#phoenix.starter_kit.more" title="More">More</a>
+</h3></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. Scopes);
+ as possible. Some advanced stuff is not discussed here (e.g. <a class="link" href="composite.html#phoenix.composite.scope" title="Scope">Scopes</a>);
nor are features that provide alternative (short-hand) ways to do the same
- things (e.g. Bind vs. Lazy
+ things (e.g. <a class="link" href="composite.html#phoenix.composite.bind" title="Bind">Bind</a> vs. Lazy
Functions).
</p>
-<div class="sidebar"><p>
- <span class="inlinemediaobject"><img src="../images/tip.png" alt="tip"></span> ...<span class="bold"><b>If you still wish to learn
- more, the read on...</b></span>
- </p></div>
+<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>
</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 Joel
+<td align="right"><div class="copyright-footer">Copyright © 2002-2005 Joel
de Guzman, Dan Marsden<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)
@@ -504,7 +521,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="introduction.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="basics.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="introduction.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="basics.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/phoenix/doc/html/phoenix/wrap_up.html
==============================================================================
--- trunk/libs/spirit/phoenix/doc/html/phoenix/wrap_up.html (original)
+++ trunk/libs/spirit/phoenix/doc/html/phoenix/wrap_up.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -1,11 +1,11 @@
<html>
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Wrap Up</title>
-<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.66.1">
-<link rel="start" href="../index.html" title="Chapter 1. Phoenix 2.0">
-<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
+<link rel="stylesheet" href="../../../../../../doc/src/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 2.0">
+<link rel="up" href="../index.html" title="Chapter 1. Phoenix 2.0">
<link rel="prev" href="inside_phoenix.html" title="Inside Phoenix">
<link rel="next" href="acknowledgement.html" title="Acknowledgement">
</head>
@@ -13,18 +13,19 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="inside_phoenix.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgement.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="inside_phoenix.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgement.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" lang="en">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="phoenix.wrap_up"></a>Wrap Up</h2></div></div></div>
+<a name="phoenix.wrap_up"></a><a class="link" href="wrap_up.html" title="Wrap Up">Wrap Up</a>
+</h2></div></div></div>
<p>
Sooner or later more FP techniques become standard practice as people find
the true value of this programming discipline outside the academe and into
@@ -37,21 +38,15 @@
<p>
Let me quote Doug Gregor of Boost.org. About functional style programming libraries:
</p>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <span class="emphasis"><em>They're gaining acceptance, but are somewhat stunted by the ubiquitousness
- of broken compilers. The C++ community is moving deeper into the so-called
- "STL- style" programming paradigm, which brings many aspects
- of functional programming into the fold. Look at, for instance, the Spirit
- parser to see how such function objects can be used to build Yacc-like
- grammars with semantic actions that can build abstract syntax trees on
- the fly. This type of functional composition is gaining momentum.</em></span>
- </p>
-<p>
- </p>
-</blockquote></div>
+<div class="blockquote"><blockquote class="blockquote"><p>
+ <span class="emphasis"><em>They're gaining acceptance, but are somewhat stunted by the ubiquitousness
+ of broken compilers. The C++ community is moving deeper into the so-called
+ "STL- style" programming paradigm, which brings many aspects of
+ functional programming into the fold. Look at, for instance, the Spirit parser
+ to see how such function objects can be used to build Yacc-like grammars
+ with semantic actions that can build abstract syntax trees on the fly. This
+ type of functional composition is gaining momentum.</em></span>
+ </p></blockquote></div>
<p>
Indeed. Phoenix is another attempt to introduce more FP techniques into the
mainstream. Not only is it a tool that will make life easier for the programmer.
@@ -67,7 +62,7 @@
</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 Joel
+<td align="right"><div class="copyright-footer">Copyright © 2002-2005 Joel
de Guzman, Dan Marsden<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)
@@ -76,7 +71,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="inside_phoenix.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgement.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="inside_phoenix.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgement.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/repository/doc/html/index.html
==============================================================================
--- trunk/libs/spirit/repository/doc/html/index.html (original)
+++ trunk/libs/spirit/repository/doc/html/index.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Spirit Repository 0.1</title>
-<link rel="stylesheet" href="../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="Spirit Repository 0.1">
<link rel="next" href="spirit_repository/preface.html" title="Preface">
</head>
@@ -11,14 +11,14 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
-<div class="spirit-nav"><a accesskey="n" href="spirit_repository/preface.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a></div>
-<div class="article" title="Spirit Repository 0.1">
+<div class="spirit-nav"><a accesskey="n" href="spirit_repository/preface.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a></div>
+<div class="article">
<div class="titlepage">
<div>
<div><h2 class="title">
@@ -32,8 +32,8 @@
</h3></div>
</div></div>
<div><p class="copyright">Copyright © 2001-2010 Joel de Guzman, Hartmut Kaiser</p></div>
-<div><div class="legalnotice" title="Legal Notice">
-<a name="id619442"></a><p>
+<div><div class="legalnotice">
+<a name="id759740"></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>
@@ -79,10 +79,10 @@
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: December 30, 2009 at 16:13:16 GMT</small></p></td>
+<td align="left"><p><small>Last revised: July 19, 2010 at 19:04:13 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
-<div class="spirit-nav"><a accesskey="n" href="spirit_repository/preface.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a></div>
+<div class="spirit-nav"><a accesskey="n" href="spirit_repository/preface.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a></div>
</body>
</html>
Modified: trunk/libs/spirit/repository/doc/html/spirit_repository/karma_components.html
==============================================================================
--- trunk/libs/spirit/repository/doc/html/spirit_repository/karma_components.html (original)
+++ trunk/libs/spirit/repository/doc/html/spirit_repository/karma_components.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Karma Components</title>
-<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../index.html" title="Spirit Repository 0.1">
<link rel="up" href="../index.html" title="Spirit Repository 0.1">
<link rel="prev" href="qi_components/nonterminal/subrule.html" title="Qi subrules">
@@ -13,16 +13,16 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="qi_components/nonterminal/subrule.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="karma_components/directives.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="qi_components/nonterminal/subrule.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="karma_components/directives.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Karma Components">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spirit_repository.karma_components"></a><a class="link" href="karma_components.html" title="Karma Components">Karma Components</a>
</h2></div></div></div>
@@ -47,7 +47,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="qi_components/nonterminal/subrule.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="karma_components/directives.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="qi_components/nonterminal/subrule.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="karma_components/directives.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/repository/doc/html/spirit_repository/karma_components/directives.html
==============================================================================
--- trunk/libs/spirit/repository/doc/html/spirit_repository/karma_components/directives.html (original)
+++ trunk/libs/spirit/repository/doc/html/spirit_repository/karma_components/directives.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Karma Generator Directives</title>
-<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Spirit Repository 0.1">
<link rel="up" href="../karma_components.html" title="Karma Components">
<link rel="prev" href="../karma_components.html" title="Karma Components">
@@ -13,16 +13,16 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="../karma_components.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../karma_components.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="directives/karma_confix_generator.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../karma_components.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../karma_components.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="directives/karma_confix_generator.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Karma Generator Directives">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="spirit_repository.karma_components.directives"></a><a class="link" href="directives.html" title="Karma Generator Directives"> Karma
Generator Directives</a>
@@ -40,7 +40,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="../karma_components.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../karma_components.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="directives/karma_confix_generator.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../karma_components.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../karma_components.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="directives/karma_confix_generator.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/repository/doc/html/spirit_repository/karma_components/directives/karma_confix_generator.html
==============================================================================
--- trunk/libs/spirit/repository/doc/html/spirit_repository/karma_components/directives/karma_confix_generator.html (original)
+++ trunk/libs/spirit/repository/doc/html/spirit_repository/karma_components/directives/karma_confix_generator.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Karma Confix Generator</title>
-<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../index.html" title="Spirit Repository 0.1">
<link rel="up" href="../directives.html" title="Karma Generator Directives">
<link rel="prev" href="../directives.html" title="Karma Generator Directives">
@@ -13,22 +13,22 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="../directives.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directives.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../nonterminal.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../directives.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directives.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Karma Confix Generator">
+<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="spirit_repository.karma_components.directives.karma_confix_generator"></a><a class="link" href="karma_confix_generator.html" title="Karma Confix Generator">Karma
Confix Generator</a>
</h4></div></div></div>
<a name="spirit_repository.karma_components.directives.karma_confix_generator.description"></a><h6>
-<a name="id635192"></a>
+<a name="id771856"></a>
<a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.description">Description</a>
</h6>
<p>
@@ -93,20 +93,20 @@
tag using a simple: <code class="computeroutput"><span class="identifier">ol</span><span class="special">[</span><span class="string">"Some text"</span><span class="special">]</span></code> (which results in <code class="computeroutput"><span class="special"><</span><span class="identifier">ol</span><span class="special">></span><span class="identifier">Some</span> <span class="identifier">text</span><span class="special"></</span><span class="identifier">ol</span><span class="special">></span></code>).
</p>
<a name="spirit_repository.karma_components.directives.karma_confix_generator.header"></a><h6>
-<a name="id636089"></a>
+<a name="id772961"></a>
<a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.header">Header</a>
</h6>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/repository/home/karma/directive/confix.hpp>
</span><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">karma_confix</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<a name="spirit_repository.karma_components.directives.karma_confix_generator.synopsis"></a><h6>
-<a name="id636162"></a>
+<a name="id773061"></a>
<a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.synopsis">Synopsis</a>
</h6>
<pre class="programlisting"><span class="identifier">confix</span><span class="special">(</span><span class="identifier">prefix</span><span class="special">,</span> <span class="identifier">suffix</span><span class="special">)[</span><span class="identifier">subject</span><span class="special">]</span>
</pre>
<a name="spirit_repository.karma_components.directives.karma_confix_generator.parameters"></a><h6>
-<a name="id636210"></a>
+<a name="id773128"></a>
<a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.parameters">Parameters</a>
</h6>
<div class="informaltable"><table class="table">
@@ -116,57 +116,57 @@
</colgroup>
<thead><tr>
<th>
- <p>
- Parameter
- </p>
+ <p>
+ Parameter
+ </p>
</th>
<th>
- <p>
- Description
- </p>
+ <p>
+ Description
+ </p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">prefix</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">prefix</span></code>
+ </p>
</td>
<td>
- <p>
- The generator construct to use to format the opening (the prefix).
- The prefix is the part generated <span class="emphasis"><em>before</em></span> any
- output as generated by the <code class="computeroutput"><span class="identifier">subject</span></code>.
- </p>
+ <p>
+ The generator construct to use to format the opening (the prefix).
+ The prefix is the part generated <span class="emphasis"><em>before</em></span>
+ any output as generated by the <code class="computeroutput"><span class="identifier">subject</span></code>.
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">suffix</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">suffix</span></code>
+ </p>
</td>
<td>
- <p>
- The generator construct to use to format the ending (the suffix).
- The suffix is the part generated <span class="emphasis"><em>after</em></span> any
- output as generated by the <code class="computeroutput"><span class="identifier">subject</span></code>.
- </p>
+ <p>
+ The generator construct to use to format the ending (the suffix).
+ The suffix is the part generated <span class="emphasis"><em>after</em></span> any
+ output as generated by the <code class="computeroutput"><span class="identifier">subject</span></code>.
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">subject</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">subject</span></code>
+ </p>
</td>
<td>
- <p>
- The generator construct to use to format the actual output in between
- the <code class="computeroutput"><span class="identifier">prefix</span></code> and
- <code class="computeroutput"><span class="identifier">suffix</span></code> parts.
- </p>
+ <p>
+ The generator construct to use to format the actual output in
+ between the <code class="computeroutput"><span class="identifier">prefix</span></code>
+ and <code class="computeroutput"><span class="identifier">suffix</span></code> parts.
+ </p>
</td>
</tr>
</tbody>
@@ -175,7 +175,7 @@
All three parameters can be arbitrary complex generators themselves.
</p>
<a name="spirit_repository.karma_components.directives.karma_confix_generator.attribute"></a><h6>
-<a name="id636368"></a>
+<a name="id773327"></a>
<a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.attribute">Attribute</a>
</h6>
<p>
@@ -187,7 +187,7 @@
</p>
<pre class="programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span> <span class="special">--></span> <span class="identifier">confix</span><span class="special">(</span><span class="identifier">p</span><span class="special">,</span> <span class="identifier">s</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
</pre>
-<div class="note" title="Note"><table border="0" summary="Note">
+<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>
@@ -202,7 +202,7 @@
</p></td></tr>
</table></div>
<a name="spirit_repository.karma_components.directives.karma_confix_generator.example"></a><h6>
-<a name="id636544"></a>
+<a name="id773559"></a>
<a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.example">Example</a>
</h6>
<p>
@@ -211,7 +211,7 @@
styles and a function prototype (for the full example code see here: confix.cpp)
</p>
<a name="spirit_repository.karma_components.directives.karma_confix_generator.prerequisites"></a><h6>
-<a name="id636574"></a>
+<a name="id773606"></a>
<a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.prerequisites">Prerequisites</a>
</h6>
<p>
@@ -221,35 +221,27 @@
generator.
</p>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">karma</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">karma_confix</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
- </p>
-<p>
</p>
<p>
To make all the code below more readable we introduce the following namespaces.
</p>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">;</span>
<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">ascii</span><span class="special">;</span>
<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">repository</span><span class="special">::</span><span class="identifier">confix</span><span class="special">;</span>
</pre>
<p>
- </p>
-<p>
</p>
<a name="spirit_repository.karma_components.directives.karma_confix_generator.generating_different_comment_styles"></a><h6>
-<a name="id636817"></a>
+<a name="id773903"></a>
<a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.generating_different_comment_styles">Generating
Different Comment Styles</a>
</h6>
@@ -258,9 +250,7 @@
a C++ comment:
</p>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="comment">// C++ comment
</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span>
@@ -271,8 +261,6 @@
</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>
- </p>
-<p>
</p>
<p>
This code snippet will obviouly generate <code class="computeroutput"><span class="comment">//
@@ -280,9 +268,7 @@
comment proves to be straightforward:
</p>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="comment">// C comment
</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span>
@@ -293,15 +279,13 @@
</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>
- </p>
-<p>
</p>
<p>
which again will generate <code class="computeroutput"><span class="comment">/* This is a comment
*/</span> </code>.
</p>
<a name="spirit_repository.karma_components.directives.karma_confix_generator.generating_a_function_prototype"></a><h6>
-<a name="id638757"></a>
+<a name="id774271"></a>
<a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.generating_a_function_prototype">Generating
a Function Prototype</a>
</h6>
@@ -310,9 +294,7 @@
names is simple as well:
</p>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="comment">// Generate a function call with an arbitrary parameter list
</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</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">parameters</span><span class="special">;</span>
@@ -328,8 +310,6 @@
</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>
- </p>
-<p>
</p>
<p>
which generates the expected output: <code class="computeroutput"><span class="identifier">func</span><span class="special">(</span><span class="identifier">par1</span><span class="special">,</span><span class="identifier">par2</span><span class="special">,</span><span class="identifier">par3</span><span class="special">)</span></code>.
@@ -345,7 +325,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="../directives.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directives.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../nonterminal.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../directives.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directives.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/repository/doc/html/spirit_repository/karma_components/nonterminal.html
==============================================================================
--- trunk/libs/spirit/repository/doc/html/spirit_repository/karma_components/nonterminal.html (original)
+++ trunk/libs/spirit/repository/doc/html/spirit_repository/karma_components/nonterminal.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Karma Generator Non-terminals</title>
-<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Spirit Repository 0.1">
<link rel="up" href="../karma_components.html" title="Karma Components">
<link rel="prev" href="directives/karma_confix_generator.html" title="Karma Confix Generator">
@@ -13,16 +13,16 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="directives/karma_confix_generator.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../karma_components.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="nonterminal/subrule.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="directives/karma_confix_generator.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../karma_components.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="nonterminal/subrule.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Karma Generator Non-terminals">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="spirit_repository.karma_components.nonterminal"></a><a class="link" href="nonterminal.html" title="Karma Generator Non-terminals"> Karma
Generator Non-terminals</a>
@@ -40,7 +40,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="directives/karma_confix_generator.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../karma_components.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="nonterminal/subrule.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="directives/karma_confix_generator.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../karma_components.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="nonterminal/subrule.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/repository/doc/html/spirit_repository/karma_components/nonterminal/subrule.html
==============================================================================
--- trunk/libs/spirit/repository/doc/html/spirit_repository/karma_components/nonterminal/subrule.html (original)
+++ trunk/libs/spirit/repository/doc/html/spirit_repository/karma_components/nonterminal/subrule.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Karma subrules</title>
-<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../index.html" title="Spirit Repository 0.1">
<link rel="up" href="../nonterminal.html" title="Karma Generator Non-terminals">
<link rel="prev" href="../nonterminal.html" title="Karma Generator Non-terminals">
@@ -12,22 +12,22 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="../nonterminal.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../nonterminal.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a>
+<a accesskey="p" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a>
</div>
-<div class="section" title="Karma subrules">
+<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="spirit_repository.karma_components.nonterminal.subrule"></a><a class="link" href="subrule.html" title="Karma subrules">
Karma subrules</a>
</h4></div></div></div>
<a name="spirit_repository.karma_components.nonterminal.subrule.description"></a><h6>
-<a name="id639090"></a>
+<a name="id774685"></a>
<a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.description">Description</a>
</h6>
<p>
@@ -49,20 +49,18 @@
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
- subrules can only be defined and used within the same generator expression.
- A subrule cannot be defined at one location, and then used in another
- location.
- </li>
+ subrules can only be defined and used within the same generator expression.
+ A subrule cannot be defined at one location, and then used in another
+ location.
+ </li>
<li class="listitem">
- subrules put a massive strain on the C++ compiler. They increase compile
- times and memory usage during compilation, and also increase the risk
- of hitting compiler limits and/or bugs.
- </li>
+ subrules put a massive strain on the C++ compiler. They increase compile
+ times and memory usage during compilation, and also increase the risk
+ of hitting compiler limits and/or bugs.
+ </li>
</ul></div>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="identifier">entry</span> <span class="special">%=</span> <span class="special">(</span>
<span class="identifier">ast_node</span> <span class="special">%=</span> <span class="identifier">int_</span> <span class="special">|</span> <span class="identifier">binary_node</span> <span class="special">|</span> <span class="identifier">unary_node</span>
@@ -73,8 +71,6 @@
<span class="special">);</span>
</pre>
<p>
- </p>
-<p>
</p>
<p>
The example above can be found here: ../../example/karma/calc2_ast_dump_sr.cpp
@@ -89,21 +85,21 @@
parts), whereas the rest can use rules and grammars.
</p>
<a name="spirit_repository.karma_components.nonterminal.subrule.header"></a><h6>
-<a name="id639352"></a>
+<a name="id775027"></a>
<a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.header">Header</a>
</h6>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/repository/home/karma/nonterminal/subrule.hpp>
</span><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">karma_subrule</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<a name="spirit_repository.karma_components.nonterminal.subrule.synopsis__declaration_"></a><h6>
-<a name="id639428"></a>
+<a name="id775127"></a>
<a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.synopsis__declaration_">Synopsis
(declaration)</a>
</h6>
<pre class="programlisting"><span class="identifier">subrule</span><span class="special"><</span><span class="identifier">ID</span><span class="special">,</span> <span class="identifier">A1</span><span class="special">,</span> <span class="identifier">A2</span><span class="special">></span> <span class="identifier">sr</span><span class="special">(</span><span class="identifier">name</span><span class="special">);</span>
</pre>
<a name="spirit_repository.karma_components.nonterminal.subrule.parameters__declaration_"></a><h6>
-<a name="id639493"></a>
+<a name="id775212"></a>
<a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.parameters__declaration_">Parameters
(declaration)</a>
</h6>
@@ -114,66 +110,66 @@
</colgroup>
<thead><tr>
<th>
- <p>
- Parameter
- </p>
+ <p>
+ Parameter
+ </p>
</th>
<th>
- <p>
- Description
- </p>
+ <p>
+ Description
+ </p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">ID</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">ID</span></code>
+ </p>
</td>
<td>
- <p>
- Required numeric argument. Gives the subrule a unique 'identification
- tag'.
- </p>
+ <p>
+ Required numeric argument. Gives the subrule a unique 'identification
+ tag'.
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">A1</span></code>, <code class="computeroutput"><span class="identifier">A2</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">A1</span></code>, <code class="computeroutput"><span class="identifier">A2</span></code>
+ </p>
</td>
<td>
- <p>
- Optional types, can be specified in any order. Can be one of 1.
- signature, 2. locals (see rules reference for more information
- on those parameters).
- </p>
- <p>
- Note that the delimiter type need not be specified in the parameters,
- unlike with grammars and rules. Subrules will automatically use
- the delimiter type which is in effect when they are invoked.
- </p>
+ <p>
+ Optional types, can be specified in any order. Can be one of
+ 1. signature, 2. locals (see rules reference for more information
+ on those parameters).
+ </p>
+ <p>
+ Note that the delimiter type need not be specified in the parameters,
+ unlike with grammars and rules. Subrules will automatically use
+ the delimiter type which is in effect when they are invoked.
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">name</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">name</span></code>
+ </p>
</td>
<td>
- <p>
- Optional string. Gives the subrule a name, useful for debugging
- and error handling.
- </p>
+ <p>
+ Optional string. Gives the subrule a name, useful for debugging
+ and error handling.
+ </p>
</td>
</tr>
</tbody>
</table></div>
<a name="spirit_repository.karma_components.nonterminal.subrule.synopsis__usage_"></a><h6>
-<a name="id639622"></a>
+<a name="id775374"></a>
<a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.synopsis__usage_">Synopsis
(usage)</a>
</h6>
@@ -202,7 +198,7 @@
<span class="special">)(</span><span class="identifier">a1</span><span class="special">,</span> <span class="identifier">a2</span><span class="special">,</span> <span class="special">...)</span> <span class="comment">// Arguments to group, i.e. to start subrule srA
</span></pre>
<a name="spirit_repository.karma_components.nonterminal.subrule.parameters__usage_"></a><h6>
-<a name="id639858"></a>
+<a name="id775661"></a>
<a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.parameters__usage_">Parameters
(usage)</a>
</h6>
@@ -213,120 +209,120 @@
</colgroup>
<thead><tr>
<th>
- <p>
- Parameter
- </p>
+ <p>
+ Parameter
+ </p>
</th>
<th>
- <p>
- Description
- </p>
+ <p>
+ Description
+ </p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">sr1</span></code>, <code class="computeroutput"><span class="identifier">sr2</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">sr1</span></code>, <code class="computeroutput"><span class="identifier">sr2</span></code>
+ </p>
</td>
<td>
- <p>
- Subrules with different IDs.
- </p>
+ <p>
+ Subrules with different IDs.
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">expr1</span></code>, <code class="computeroutput"><span class="identifier">expr2</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">expr1</span></code>, <code class="computeroutput"><span class="identifier">expr2</span></code>
+ </p>
</td>
<td>
- <p>
- Generator expressions. Can include <code class="computeroutput"><span class="identifier">sr1</span></code>
- and <code class="computeroutput"><span class="identifier">sr2</span></code>, as well
- as any other valid generator expressions.
- </p>
+ <p>
+ Generator expressions. Can include <code class="computeroutput"><span class="identifier">sr1</span></code>
+ and <code class="computeroutput"><span class="identifier">sr2</span></code>, as well
+ as any other valid generator expressions.
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">srA</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">srA</span></code>
+ </p>
</td>
<td>
- <p>
- Subrule with a synthesized attribute and inherited attributes.
- </p>
+ <p>
+ Subrule with a synthesized attribute and inherited attributes.
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">srB</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">srB</span></code>
+ </p>
</td>
<td>
- <p>
- Subrule with a synthesized attribute.
- </p>
+ <p>
+ Subrule with a synthesized attribute.
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">srC</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">srC</span></code>
+ </p>
</td>
<td>
- <p>
- Subrule with inherited attributes.
- </p>
+ <p>
+ Subrule with inherited attributes.
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">exprA</span></code>, <code class="computeroutput"><span class="identifier">exprB</span></code>, <code class="computeroutput"><span class="identifier">exprC</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">exprA</span></code>, <code class="computeroutput"><span class="identifier">exprB</span></code>, <code class="computeroutput"><span class="identifier">exprC</span></code>
+ </p>
</td>
<td>
- <p>
- Generator expressions.
- </p>
+ <p>
+ Generator expressions.
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">a1</span></code>, <code class="computeroutput"><span class="identifier">a2</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">a1</span></code>, <code class="computeroutput"><span class="identifier">a2</span></code>
+ </p>
</td>
<td>
- <p>
- Arguments passed to the subrule group. They are passed as inherited
- attributes to the group's start subrule, <code class="computeroutput"><span class="identifier">srA</span></code>.
- </p>
+ <p>
+ Arguments passed to the subrule group. They are passed as inherited
+ attributes to the group's start subrule, <code class="computeroutput"><span class="identifier">srA</span></code>.
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">c1</span></code>, <code class="computeroutput"><span class="identifier">c2</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">c1</span></code>, <code class="computeroutput"><span class="identifier">c2</span></code>
+ </p>
</td>
<td>
- <p>
- Arguments passed as inherited attributes to subrule <code class="computeroutput"><span class="identifier">srC</span></code>.
- </p>
+ <p>
+ Arguments passed as inherited attributes to subrule <code class="computeroutput"><span class="identifier">srC</span></code>.
+ </p>
</td>
</tr>
</tbody>
</table></div>
<a name="spirit_repository.karma_components.nonterminal.subrule.groups"></a><h6>
-<a name="id640172"></a>
+<a name="id776039"></a>
<a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.groups">Groups</a>
</h6>
<p>
@@ -371,7 +367,7 @@
</span><span class="special">;</span>
</pre>
<a name="spirit_repository.karma_components.nonterminal.subrule.attributes"></a><h6>
-<a name="id640566"></a>
+<a name="id776523"></a>
<a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.attributes">Attributes</a>
</h6>
<p>
@@ -380,27 +376,27 @@
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
- the type of its synthesized attribute is the one specified in the subrule's
- signature, if any. Otherwise it is <code class="computeroutput"><span class="identifier">unused_type</span></code>.
- </li>
+ the type of its synthesized attribute is the one specified in the subrule's
+ signature, if any. Otherwise it is <code class="computeroutput"><span class="identifier">unused_type</span></code>.
+ </li>
<li class="listitem">
- the types of its inherited attributes are the ones specified in the subrule's
- signature, if any. Otherwise the subrule has no inherited attributes.
- </li>
+ the types of its inherited attributes are the ones specified in the
+ subrule's signature, if any. Otherwise the subrule has no inherited
+ attributes.
+ </li>
<li class="listitem">
- an auto-subrule can be defined by assigning it with the <code class="computeroutput"><span class="special">%=</span></code> syntax. In this case, the subrule's
- synthesized attribute is automatically propagated to the RHS generator's
- attribute.
- </li>
+ an auto-subrule can be defined by assigning it with the <code class="computeroutput"><span class="special">%=</span></code> syntax. In this case, the subrule's
+ synthesized attribute is automatically propagated to the RHS generator's
+ attribute.
+ </li>
<li class="listitem">
- the Phoenix placeholders <code class="computeroutput"><span class="identifier">_val</span></code>,
- <code class="computeroutput"><span class="identifier">_r1</span></code>, <code class="computeroutput"><span class="identifier">_r2</span></code>,
- ... are available to refer to the subrule's synthesized and inherited
- attributes, if present.
- </li>
+ the Phoenix placeholders <code class="computeroutput"><span class="identifier">_val</span></code>,
+ <code class="computeroutput"><span class="identifier">_r1</span></code>, <code class="computeroutput"><span class="identifier">_r2</span></code>, ... are available to refer to
+ the subrule's synthesized and inherited attributes, if present.
+ </li>
</ul></div>
<a name="spirit_repository.karma_components.nonterminal.subrule.locals"></a><h6>
-<a name="id640639"></a>
+<a name="id776641"></a>
<a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.locals">Locals</a>
</h6>
<p>
@@ -410,16 +406,14 @@
refer to the subrule's locals, if present.
</p>
<a name="spirit_repository.karma_components.nonterminal.subrule.example"></a><h6>
-<a name="id640675"></a>
+<a name="id776689"></a>
<a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.example">Example</a>
</h6>
<p>
Some includes:
</p>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">karma</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">karma_subrule</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
@@ -428,32 +422,24 @@
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">phoenix_fusion</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
- </p>
-<p>
</p>
<p>
Some using declarations:
</p>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">;</span>
<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">ascii</span><span class="special">;</span>
<span class="keyword">namespace</span> <span class="identifier">repo</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">repository</span><span class="special">;</span>
</pre>
<p>
- </p>
-<p>
</p>
<p>
A grammar containing only one rule, defined with a group of 2 subrules:
</p>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">OutputIterator</span><span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">mini_xml_generator</span>
@@ -478,8 +464,6 @@
<span class="special">};</span>
</pre>
<p>
- </p>
-<p>
</p>
<p>
The definitions of the <code class="computeroutput"><span class="identifier">mini_xml</span></code>
@@ -488,7 +472,7 @@
<a href="../../../../../example/karma/mini_xml_karma_sr.cpp" target="_top">../../example/karma/mini_xml_karma_sr.cpp</a>
</p>
<a name="spirit_repository.karma_components.nonterminal.subrule.performance"></a><h6>
-<a name="id642253"></a>
+<a name="id777754"></a>
<a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.performance">Performance</a>
</h6>
<p>
@@ -499,7 +483,7 @@
subrules is very similar, so performance is very similar too).
</p>
<a name="spirit_repository.karma_components.nonterminal.subrule.notes"></a><h6>
-<a name="id642290"></a>
+<a name="id777801"></a>
<a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.notes">Notes</a>
</h6>
<p>
@@ -523,7 +507,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="../nonterminal.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../nonterminal.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a>
+<a accesskey="p" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/repository/doc/html/spirit_repository/preface.html
==============================================================================
--- trunk/libs/spirit/repository/doc/html/spirit_repository/preface.html (original)
+++ trunk/libs/spirit/repository/doc/html/spirit_repository/preface.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Preface</title>
-<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../index.html" title="Spirit Repository 0.1">
<link rel="up" href="../index.html" title="Spirit Repository 0.1">
<link rel="prev" href="../index.html" title="Spirit Repository 0.1">
@@ -13,21 +13,21 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="../index.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="qi_components.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../index.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="qi_components.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Preface">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spirit_repository.preface"></a><a class="link" href="preface.html" title="Preface">Preface</a>
</h2></div></div></div>
<a name="spirit_repository.preface.the_spirit_repository"></a><h4>
-<a name="id619472"></a>
+<a name="id759774"></a>
<a class="link" href="preface.html#spirit_repository.preface.the_spirit_repository">The Spirit
Repository</a>
</h4>
@@ -77,7 +77,7 @@
core library.
</p>
<a name="spirit_repository.preface.how_to_use_this_manual"></a><h4>
-<a name="id619560"></a>
+<a name="id759903"></a>
<a class="link" href="preface.html#spirit_repository.preface.how_to_use_this_manual">How to use
this manual</a>
</h4>
@@ -86,7 +86,7 @@
icons precede some text to indicate:
</p>
<div class="table">
-<a name="id619574"></a><p class="title"><b>Table 1. Icons</b></p>
+<a name="id759921"></a><p class="title"><b>Table 1. Icons</b></p>
<div class="table-contents"><table class="table" summary="Icons">
<colgroup>
<col>
@@ -95,108 +95,109 @@
</colgroup>
<thead><tr>
<th>
- <p>
- Icon
- </p>
- </th>
+ <p>
+ Icon
+ </p>
+ </th>
<th>
- <p>
- Name
- </p>
- </th>
+ <p>
+ Name
+ </p>
+ </th>
<th>
- <p>
- Meaning
- </p>
- </th>
+ <p>
+ Meaning
+ </p>
+ </th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- <span class="inlinemediaobject"><img src="../images/note.png" alt="note"></span>
- </p>
- </td>
-<td>
- <p>
- Note
- </p>
- </td>
-<td>
- <p>
- Generally useful information (an aside that doesn't fit in the flow of
- the text)
- </p>
- </td>
+ <p>
+ <span class="inlinemediaobject"><img src="../images/note.png" alt="note"></span>
+ </p>
+ </td>
+<td>
+ <p>
+ Note
+ </p>
+ </td>
+<td>
+ <p>
+ Generally useful information (an aside that doesn't fit in the flow
+ of the text)
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <span class="inlinemediaobject"><img src="../images/tip.png" alt="tip"></span>
- </p>
- </td>
-<td>
- <p>
- Tip
- </p>
- </td>
-<td>
- <p>
- Suggestion on how to do something (especially something that not be obvious)
- </p>
- </td>
+ <p>
+ <span class="inlinemediaobject"><img src="../images/tip.png" alt="tip"></span>
+ </p>
+ </td>
+<td>
+ <p>
+ Tip
+ </p>
+ </td>
+<td>
+ <p>
+ Suggestion on how to do something (especially something that not
+ be obvious)
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <span class="inlinemediaobject"><img src="../images/important.png" alt="important"></span>
- </p>
- </td>
-<td>
- <p>
- Important
- </p>
- </td>
-<td>
- <p>
- Important note on something to take particular notice of
- </p>
- </td>
+ <p>
+ <span class="inlinemediaobject"><img src="../images/important.png" alt="important"></span>
+ </p>
+ </td>
+<td>
+ <p>
+ Important
+ </p>
+ </td>
+<td>
+ <p>
+ Important note on something to take particular notice of
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <span class="inlinemediaobject"><img src="../images/caution.png" alt="caution"></span>
- </p>
- </td>
-<td>
- <p>
- Caution
- </p>
- </td>
-<td>
- <p>
- Take special care with this - it may not be what you expect and may cause
- bad results
- </p>
- </td>
+ <p>
+ <span class="inlinemediaobject"><img src="../images/caution.png" alt="caution"></span>
+ </p>
+ </td>
+<td>
+ <p>
+ Caution
+ </p>
+ </td>
+<td>
+ <p>
+ Take special care with this - it may not be what you expect and may
+ cause bad results
+ </p>
+ </td>
</tr>
<tr>
<td>
- <p>
- <span class="inlinemediaobject"><img src="../images/alert.png" alt="alert"></span>
- </p>
- </td>
-<td>
- <p>
- Danger
- </p>
- </td>
-<td>
- <p>
- This is likely to cause serious trouble if ignored
- </p>
- </td>
+ <p>
+ <span class="inlinemediaobject"><img src="../images/alert.png" alt="alert"></span>
+ </p>
+ </td>
+<td>
+ <p>
+ Danger
+ </p>
+ </td>
+<td>
+ <p>
+ This is likely to cause serious trouble if ignored
+ </p>
+ </td>
</tr>
</tbody>
</table></div>
@@ -207,7 +208,7 @@
Tools</a>.
</p>
<a name="spirit_repository.preface.support"></a><h4>
-<a name="id619815"></a>
+<a name="id760179"></a>
<a class="link" href="preface.html#spirit_repository.preface.support">Support</a>
</h4>
<p>
@@ -231,7 +232,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="../index.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="qi_components.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../index.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="qi_components.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components.html
==============================================================================
--- trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components.html (original)
+++ trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Qi Components</title>
-<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../index.html" title="Spirit Repository 0.1">
<link rel="up" href="../index.html" title="Spirit Repository 0.1">
<link rel="prev" href="preface.html" title="Preface">
@@ -13,16 +13,16 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="preface.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="qi_components/primitive.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="preface.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="qi_components/primitive.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Qi Components">
+<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="spirit_repository.qi_components"></a><a class="link" href="qi_components.html" title="Qi Components">Qi Components</a>
</h2></div></div></div>
@@ -55,7 +55,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="preface.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="qi_components/primitive.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="preface.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="qi_components/primitive.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives.html
==============================================================================
--- trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives.html (original)
+++ trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Qi Parser Directives</title>
-<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Spirit Repository 0.1">
<link rel="up" href="../qi_components.html" title="Qi Components">
<link rel="prev" href="primitive/flush_multi_pass.html" title="Qi flush_multi_pass parser">
@@ -13,16 +13,16 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="primitive/flush_multi_pass.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_components.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="directives/confix.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="primitive/flush_multi_pass.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_components.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="directives/confix.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Qi Parser Directives">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="spirit_repository.qi_components.directives"></a><a class="link" href="directives.html" title="Qi Parser Directives"> Qi Parser
Directives</a>
@@ -44,7 +44,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="primitive/flush_multi_pass.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_components.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="directives/confix.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="primitive/flush_multi_pass.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_components.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="directives/confix.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/confix.html
==============================================================================
--- trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/confix.html (original)
+++ trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/confix.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Qi Confix Parser Directive</title>
-<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../index.html" title="Spirit Repository 0.1">
<link rel="up" href="../directives.html" title="Qi Parser Directives">
<link rel="prev" href="../directives.html" title="Qi Parser Directives">
@@ -13,22 +13,22 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="../directives.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directives.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="distinct.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../directives.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directives.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="distinct.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Qi Confix Parser Directive">
+<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="spirit_repository.qi_components.directives.confix"></a><a class="link" href="confix.html" title="Qi Confix Parser Directive">
Qi Confix Parser Directive</a>
</h4></div></div></div>
<a name="spirit_repository.qi_components.directives.confix.description"></a><h6>
-<a name="id623313"></a>
+<a name="id761680"></a>
<a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.description">Description</a>
</h6>
<p>
@@ -78,7 +78,7 @@
<pre class="programlisting"><span class="identifier">c_comment</span><span class="special">[*(</span><span class="identifier">char_</span> <span class="special">-</span> <span class="string">"*/"</span><span class="special">)]</span> <span class="comment">// C style comment
</span><span class="identifier">cpp_comment</span><span class="special">[*(</span><span class="identifier">char_</span> <span class="special">-</span> <span class="identifier">eol</span><span class="special">)]</span> <span class="comment">// C++ style comment
</span></pre>
-<div class="note" title="Note"><table border="0" summary="Note">
+<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>
@@ -88,27 +88,27 @@
<span class="identifier">suffix</span><span class="special">)</span></code>
parser in <span class="emphasis"><em>Spirit.Classic</em></span> was equivalent to the sequence
<code class="computeroutput"><span class="identifier">prefix</span> <span class="special">>></span>
- <span class="special">(</span><span class="identifier">subject</span>
+ <span class="special">*(</span><span class="identifier">subject</span>
<span class="special">-</span> <span class="identifier">suffix</span><span class="special">)</span> <span class="special">>></span> <span class="identifier">suffix</span><span class="special">,</span> <span class="identifier">the</span> <span class="emphasis"><em>Spirit.Qi</em></span> </code>confix`
directive will not perform this refactoring any more. This simplifies
the code and makes things more explicit.
</p></td></tr>
</table></div>
<a name="spirit_repository.qi_components.directives.confix.header"></a><h6>
-<a name="id624081"></a>
+<a name="id762520"></a>
<a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.header">Header</a>
</h6>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/repository/home/qi/directive/confix.hpp>
</span><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi_confix</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<a name="spirit_repository.qi_components.directives.confix.synopsis"></a><h6>
-<a name="id624159"></a>
+<a name="id762608"></a>
<a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.synopsis">Synopsis</a>
</h6>
<pre class="programlisting"><span class="identifier">confix</span><span class="special">(</span><span class="identifier">prefix</span><span class="special">,</span> <span class="identifier">suffix</span><span class="special">)[</span><span class="identifier">subject</span><span class="special">]</span>
</pre>
<a name="spirit_repository.qi_components.directives.confix.parameters"></a><h6>
-<a name="id624212"></a>
+<a name="id762664"></a>
<a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.parameters">Parameters</a>
</h6>
<div class="informaltable"><table class="table">
@@ -118,52 +118,52 @@
</colgroup>
<thead><tr>
<th>
- <p>
- Parameter
- </p>
+ <p>
+ Parameter
+ </p>
</th>
<th>
- <p>
- Description
- </p>
+ <p>
+ Description
+ </p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">prefix</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">prefix</span></code>
+ </p>
</td>
<td>
- <p>
- The parser for the opening (the prefix).
- </p>
+ <p>
+ The parser for the opening (the prefix).
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">suffix</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">suffix</span></code>
+ </p>
</td>
<td>
- <p>
- The parser for the ending (the suffix).
- </p>
+ <p>
+ The parser for the ending (the suffix).
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">subject</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">subject</span></code>
+ </p>
</td>
<td>
- <p>
- The parser for the input sequence between the <code class="computeroutput"><span class="identifier">prefix</span></code>
- and <code class="computeroutput"><span class="identifier">suffix</span></code> parts.
- </p>
+ <p>
+ The parser for the input sequence between the <code class="computeroutput"><span class="identifier">prefix</span></code>
+ and <code class="computeroutput"><span class="identifier">suffix</span></code> parts.
+ </p>
</td>
</tr>
</tbody>
@@ -172,7 +172,7 @@
All three parameters can be arbitrarily complex parsers themselves.
</p>
<a name="spirit_repository.qi_components.directives.confix.attribute"></a><h6>
-<a name="id624354"></a>
+<a name="id762814"></a>
<a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.attribute">Attribute</a>
</h6>
<p>
@@ -184,7 +184,7 @@
</p>
<pre class="programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span><span class="special">,</span> <span class="identifier">p</span><span class="special">:</span> <span class="identifier">P</span><span class="special">,</span> <span class="identifier">s</span><span class="special">:</span> <span class="identifier">S</span><span class="special">:</span> <span class="special">--></span> <span class="identifier">confix</span><span class="special">(</span><span class="identifier">p</span><span class="special">,</span> <span class="identifier">s</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
</pre>
-<div class="note" title="Note"><table border="0" summary="Note">
+<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>
@@ -198,7 +198,7 @@
</p></td></tr>
</table></div>
<a name="spirit_repository.qi_components.directives.confix.example"></a><h6>
-<a name="id624591"></a>
+<a name="id763077"></a>
<a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.example">Example</a>
</h6>
<p>
@@ -208,7 +208,7 @@
see confix.cpp)
</p>
<a name="spirit_repository.qi_components.directives.confix.prerequisites"></a><h6>
-<a name="id624626"></a>
+<a name="id763116"></a>
<a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.prerequisites">Prerequisites</a>
</h6>
<p>
@@ -217,25 +217,19 @@
for the new <code class="computeroutput"><span class="identifier">confix</span></code> directive.
</p>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi_confix</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
- </p>
-<p>
</p>
<p>
In order to make the examples below more readable we import a number of
elements into the current namespace:
</p>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">eol</span><span class="special">;</span>
<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">lexeme</span><span class="special">;</span>
@@ -247,11 +241,9 @@
<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">repository</span><span class="special">::</span><span class="identifier">confix</span><span class="special">;</span>
</pre>
<p>
- </p>
-<p>
</p>
<a name="spirit_repository.qi_components.directives.confix.parsing_different_comment_styles"></a><h6>
-<a name="id625044"></a>
+<a name="id763572"></a>
<a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.parsing_different_comment_styles">Parsing
Different Comment Styles</a>
</h6>
@@ -260,9 +252,7 @@
a C++ comment:
</p>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Iterator</span><span class="special">></span>
<span class="keyword">bool</span> <span class="identifier">parse_cpp_comment</span><span class="special">(</span><span class="identifier">Iterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">Iterator</span> <span class="identifier">last</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">attr</span><span class="special">)</span>
@@ -277,8 +267,6 @@
<span class="special">}</span>
</pre>
<p>
- </p>
-<p>
</p>
<p>
This function will obviously parse input such as "<code class="computeroutput"><span class="comment">//
@@ -286,9 +274,7 @@
comment proves to be straightforward:
</p>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Iterator</span><span class="special">></span>
<span class="keyword">bool</span> <span class="identifier">parse_c_comment</span><span class="special">(</span><span class="identifier">Iterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">Iterator</span> <span class="identifier">last</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">attr</span><span class="special">)</span>
@@ -303,15 +289,13 @@
<span class="special">}</span>
</pre>
<p>
- </p>
-<p>
</p>
<p>
which again will be able to parse e.g. "<code class="computeroutput"><span class="comment">/*
This is a comment */</span> </code>".
</p>
<a name="spirit_repository.qi_components.directives.confix.parsing_tagged_data"></a><h6>
-<a name="id626988"></a>
+<a name="id764198"></a>
<a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.parsing_tagged_data">Parsing
Tagged Data</a>
</h6>
@@ -320,9 +304,7 @@
is not very hard, either:
</p>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Iterator</span><span class="special">></span>
<span class="keyword">bool</span> <span class="identifier">parse_tagged</span><span class="special">(</span><span class="identifier">Iterator</span> <span class="identifier">first</span><span class="special">,</span> <span class="identifier">Iterator</span> <span class="identifier">last</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">attr</span><span class="special">)</span>
@@ -338,8 +320,6 @@
<span class="special">}</span>
</pre>
<p>
- </p>
-<p>
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
@@ -352,7 +332,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="../directives.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directives.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="distinct.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../directives.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directives.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="distinct.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/distinct.html
==============================================================================
--- trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/distinct.html (original)
+++ trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/distinct.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Qi Distinct Parser Directive</title>
-<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../index.html" title="Spirit Repository 0.1">
<link rel="up" href="../directives.html" title="Qi Parser Directives">
<link rel="prev" href="confix.html" title="Qi Confix Parser Directive">
@@ -13,22 +13,22 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="confix.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directives.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../nonterminal.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="confix.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directives.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Qi Distinct Parser Directive">
+<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="spirit_repository.qi_components.directives.distinct"></a><a class="link" href="distinct.html" title="Qi Distinct Parser Directive">
Qi Distinct Parser Directive</a>
</h4></div></div></div>
<a name="spirit_repository.qi_components.directives.distinct.description"></a><h6>
-<a name="id627341"></a>
+<a name="id764582"></a>
<a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.description">Description</a>
</h6>
<p>
@@ -73,9 +73,7 @@
see distinct.cpp):
</p>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">spirit</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">;</span>
<span class="keyword">namespace</span> <span class="identifier">ascii</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">ascii</span><span class="special">;</span>
@@ -128,8 +126,6 @@
<span class="identifier">keyword_tag_type</span> <span class="keyword">const</span> <span class="identifier">keyword</span> <span class="special">=</span> <span class="identifier">distinct_spec</span><span class="special">(</span><span class="identifier">char_spec</span><span class="special">(</span><span class="identifier">keyword_spec</span><span class="special">));</span>
</pre>
<p>
- </p>
-<p>
</p>
<p>
These definitions define a new Qi parser recognizing keywords! This allows
@@ -144,20 +140,20 @@
above.
</p>
<a name="spirit_repository.qi_components.directives.distinct.header"></a><h6>
-<a name="id628578"></a>
+<a name="id765952"></a>
<a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.header">Header</a>
</h6>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/repository/home/qi/directive/distinct.hpp>
</span><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi_distinct</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<a name="spirit_repository.qi_components.directives.distinct.synopsis"></a><h6>
-<a name="id628656"></a>
+<a name="id766039"></a>
<a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.synopsis">Synopsis</a>
</h6>
<pre class="programlisting"><span class="identifier">distinct</span><span class="special">(</span><span class="identifier">tail</span><span class="special">)[</span><span class="identifier">subject</span><span class="special">]</span>
</pre>
<a name="spirit_repository.qi_components.directives.distinct.parameters"></a><h6>
-<a name="id628700"></a>
+<a name="id766087"></a>
<a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.parameters">Parameters</a>
</h6>
<div class="informaltable"><table class="table">
@@ -167,41 +163,41 @@
</colgroup>
<thead><tr>
<th>
- <p>
- Parameter
- </p>
+ <p>
+ Parameter
+ </p>
</th>
<th>
- <p>
- Description
- </p>
+ <p>
+ Description
+ </p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">tail</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">tail</span></code>
+ </p>
</td>
<td>
- <p>
- The parser construct specifying what whould not follow the subject
- in order to match the overall expression.
- </p>
+ <p>
+ The parser construct specifying what whould not follow the subject
+ in order to match the overall expression.
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">subject</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">subject</span></code>
+ </p>
</td>
<td>
- <p>
- The parser construct to use to match the current input. The distinct
- directive makes sure that no unexpected partial matches occur.
- </p>
+ <p>
+ The parser construct to use to match the current input. The distinct
+ directive makes sure that no unexpected partial matches occur.
+ </p>
</td>
</tr>
</tbody>
@@ -210,7 +206,7 @@
All two parameters can be arbitrary complex parsers themselves.
</p>
<a name="spirit_repository.qi_components.directives.distinct.attribute"></a><h6>
-<a name="id628804"></a>
+<a name="id766199"></a>
<a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.attribute">Attribute</a>
</h6>
<p>
@@ -224,7 +220,7 @@
<pre class="programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span><span class="special">,</span> <span class="identifier">b</span><span class="special">:</span> <span class="identifier">B</span> <span class="special">--></span> <span class="identifier">distinct</span><span class="special">(</span><span class="identifier">b</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
</pre>
<a name="spirit_repository.qi_components.directives.distinct.example"></a><h6>
-<a name="id629198"></a>
+<a name="id766328"></a>
<a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.example">Example</a>
</h6>
<p>
@@ -232,7 +228,7 @@
parser. distinct.cpp)
</p>
<a name="spirit_repository.qi_components.directives.distinct.prerequisites"></a><h6>
-<a name="id629230"></a>
+<a name="id766365"></a>
<a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.prerequisites">Prerequisites</a>
</h6>
<p>
@@ -241,35 +237,27 @@
for the new <code class="computeroutput"><span class="identifier">distinct</span></code> generator.
</p>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi_distinct</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
- </p>
-<p>
</p>
<p>
To make all the code below more readable we introduce the following namespaces.
</p>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">;</span>
<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">ascii</span><span class="special">;</span>
<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">repository</span><span class="special">::</span><span class="identifier">distinct</span><span class="special">;</span>
</pre>
<p>
- </p>
-<p>
</p>
<a name="spirit_repository.qi_components.directives.distinct.using_the_distinct_directive_to_match_keywords"></a><h6>
-<a name="id629474"></a>
+<a name="id766632"></a>
<a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.using_the_distinct_directive_to_match_keywords">Using
The Distinct Directive to Match keywords</a>
</h6>
@@ -281,9 +269,7 @@
followed by an optional <code class="computeroutput"><span class="string">"--"</span></code>):
</p>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="special">{</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">str</span><span class="special">(</span><span class="string">"description ident"</span><span class="special">);</span>
@@ -295,11 +281,9 @@
<span class="special">}</span>
</pre>
<p>
- </p>
-<p>
- </p>
+ </p>
<p>
-
+
</p>
<pre class="programlisting"><span class="special">{</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">str</span><span class="special">(</span><span class="string">"description--ident"</span><span class="special">);</span>
@@ -311,17 +295,13 @@
<span class="special">}</span>
</pre>
<p>
- </p>
-<p>
</p>
<p>
The last example shows that the <code class="computeroutput"><span class="identifier">distinct</span><span class="special">[]</span></code> parser component correctly refuses to
match "description-ident":
</p>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="special">{</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">str</span><span class="special">(</span><span class="string">"description-ident"</span><span class="special">);</span>
@@ -333,8 +313,6 @@
<span class="special">}</span>
</pre>
<p>
- </p>
-<p>
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
@@ -347,7 +325,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="confix.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directives.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../nonterminal.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="confix.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directives.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal.html
==============================================================================
--- trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal.html (original)
+++ trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Qi Parser Non-terminals</title>
-<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Spirit Repository 0.1">
<link rel="up" href="../qi_components.html" title="Qi Components">
<link rel="prev" href="directives/distinct.html" title="Qi Distinct Parser Directive">
@@ -13,16 +13,16 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="directives/distinct.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_components.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="nonterminal/subrule.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="directives/distinct.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_components.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="nonterminal/subrule.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Qi Parser Non-terminals">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="spirit_repository.qi_components.nonterminal"></a><a class="link" href="nonterminal.html" title="Qi Parser Non-terminals"> Qi Parser
Non-terminals</a>
@@ -40,7 +40,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="directives/distinct.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_components.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="nonterminal/subrule.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="directives/distinct.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_components.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="nonterminal/subrule.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal/subrule.html
==============================================================================
--- trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal/subrule.html (original)
+++ trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal/subrule.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Qi subrules</title>
-<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../index.html" title="Spirit Repository 0.1">
<link rel="up" href="../nonterminal.html" title="Qi Parser Non-terminals">
<link rel="prev" href="../nonterminal.html" title="Qi Parser Non-terminals">
@@ -13,22 +13,22 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="../nonterminal.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../nonterminal.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../../karma_components.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../karma_components.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Qi subrules">
+<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="spirit_repository.qi_components.nonterminal.subrule"></a><a class="link" href="subrule.html" title="Qi subrules">
Qi subrules</a>
</h4></div></div></div>
<a name="spirit_repository.qi_components.nonterminal.subrule.description"></a><h6>
-<a name="id630408"></a>
+<a name="id767651"></a>
<a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.description">Description</a>
</h6>
<p>
@@ -50,20 +50,18 @@
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
- subrules can only be defined and used within the same parser expression.
- A subrule cannot be defined at one location, and then used in another
- location.
- </li>
+ subrules can only be defined and used within the same parser expression.
+ A subrule cannot be defined at one location, and then used in another
+ location.
+ </li>
<li class="listitem">
- subrules put a massive strain on the C++ compiler. They increase compile
- times and memory usage during compilation, and also increase the risk
- of hitting compiler limits and/or bugs.
- </li>
+ subrules put a massive strain on the C++ compiler. They increase compile
+ times and memory usage during compilation, and also increase the risk
+ of hitting compiler limits and/or bugs.
+ </li>
</ul></div>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="identifier">entry</span> <span class="special">=</span> <span class="special">(</span>
<span class="identifier">expression</span> <span class="special">=</span>
@@ -86,8 +84,6 @@
<span class="special">);</span>
</pre>
<p>
- </p>
-<p>
</p>
<p>
The example above can be found here: ../../example/qi/calc1_sr.cpp
@@ -101,21 +97,21 @@
most performance-critical parts), whereas the rest can use rules and grammars.
</p>
<a name="spirit_repository.qi_components.nonterminal.subrule.header"></a><h6>
-<a name="id630796"></a>
+<a name="id768089"></a>
<a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.header">Header</a>
</h6>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/repository/home/qi/nonterminal/subrule.hpp>
</span><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi_subrule</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<a name="spirit_repository.qi_components.nonterminal.subrule.synopsis__declaration_"></a><h6>
-<a name="id630872"></a>
+<a name="id768178"></a>
<a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.synopsis__declaration_">Synopsis
(declaration)</a>
</h6>
<pre class="programlisting"><span class="identifier">subrule</span><span class="special"><</span><span class="identifier">ID</span><span class="special">,</span> <span class="identifier">A1</span><span class="special">,</span> <span class="identifier">A2</span><span class="special">></span> <span class="identifier">sr</span><span class="special">(</span><span class="identifier">name</span><span class="special">);</span>
</pre>
<a name="spirit_repository.qi_components.nonterminal.subrule.parameters__declaration_"></a><h6>
-<a name="id630936"></a>
+<a name="id768255"></a>
<a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.parameters__declaration_">Parameters
(declaration)</a>
</h6>
@@ -126,66 +122,66 @@
</colgroup>
<thead><tr>
<th>
- <p>
- Parameter
- </p>
+ <p>
+ Parameter
+ </p>
</th>
<th>
- <p>
- Description
- </p>
+ <p>
+ Description
+ </p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">ID</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">ID</span></code>
+ </p>
</td>
<td>
- <p>
- Required numeric argument. Gives the subrule a unique 'identification
- tag'.
- </p>
+ <p>
+ Required numeric argument. Gives the subrule a unique 'identification
+ tag'.
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">A1</span></code>, <code class="computeroutput"><span class="identifier">A2</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">A1</span></code>, <code class="computeroutput"><span class="identifier">A2</span></code>
+ </p>
</td>
<td>
- <p>
- Optional types, can be specified in any order. Can be one of 1.
- signature, 2. locals (see rules reference for more information
- on those parameters).
- </p>
- <p>
- Note that the skipper type need not be specified in the parameters,
- unlike with grammars and rules. Subrules will automatically use
- the skipper type which is in effect when they are invoked.
- </p>
+ <p>
+ Optional types, can be specified in any order. Can be one of
+ 1. signature, 2. locals (see rules reference for more information
+ on those parameters).
+ </p>
+ <p>
+ Note that the skipper type need not be specified in the parameters,
+ unlike with grammars and rules. Subrules will automatically use
+ the skipper type which is in effect when they are invoked.
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">name</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">name</span></code>
+ </p>
</td>
<td>
- <p>
- Optional string. Gives the subrule a name, useful for debugging
- and error handling.
- </p>
+ <p>
+ Optional string. Gives the subrule a name, useful for debugging
+ and error handling.
+ </p>
</td>
</tr>
</tbody>
</table></div>
<a name="spirit_repository.qi_components.nonterminal.subrule.synopsis__usage_"></a><h6>
-<a name="id631066"></a>
+<a name="id768407"></a>
<a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.synopsis__usage_">Synopsis
(usage)</a>
</h6>
@@ -214,7 +210,7 @@
<span class="special">)(</span><span class="identifier">a1</span><span class="special">,</span> <span class="identifier">a2</span><span class="special">,</span> <span class="special">...)</span> <span class="comment">// Arguments to group, i.e. to start subrule srA
</span></pre>
<a name="spirit_repository.qi_components.nonterminal.subrule.parameters__usage_"></a><h6>
-<a name="id631301"></a>
+<a name="id768670"></a>
<a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.parameters__usage_">Parameters
(usage)</a>
</h6>
@@ -225,120 +221,120 @@
</colgroup>
<thead><tr>
<th>
- <p>
- Parameter
- </p>
+ <p>
+ Parameter
+ </p>
</th>
<th>
- <p>
- Description
- </p>
+ <p>
+ Description
+ </p>
</th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">sr1</span></code>, <code class="computeroutput"><span class="identifier">sr2</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">sr1</span></code>, <code class="computeroutput"><span class="identifier">sr2</span></code>
+ </p>
</td>
<td>
- <p>
- Subrules with different IDs.
- </p>
+ <p>
+ Subrules with different IDs.
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">expr1</span></code>, <code class="computeroutput"><span class="identifier">expr2</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">expr1</span></code>, <code class="computeroutput"><span class="identifier">expr2</span></code>
+ </p>
</td>
<td>
- <p>
- Parser expressions. Can include <code class="computeroutput"><span class="identifier">sr1</span></code>
- and <code class="computeroutput"><span class="identifier">sr2</span></code>, as well
- as any other valid parser expressions.
- </p>
+ <p>
+ Parser expressions. Can include <code class="computeroutput"><span class="identifier">sr1</span></code>
+ and <code class="computeroutput"><span class="identifier">sr2</span></code>, as well
+ as any other valid parser expressions.
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">srA</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">srA</span></code>
+ </p>
</td>
<td>
- <p>
- Subrule with a synthesized attribute and inherited attributes.
- </p>
+ <p>
+ Subrule with a synthesized attribute and inherited attributes.
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">srB</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">srB</span></code>
+ </p>
</td>
<td>
- <p>
- Subrule with a synthesized attribute.
- </p>
+ <p>
+ Subrule with a synthesized attribute.
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">srC</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">srC</span></code>
+ </p>
</td>
<td>
- <p>
- Subrule with inherited attributes.
- </p>
+ <p>
+ Subrule with inherited attributes.
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">exprA</span></code>, <code class="computeroutput"><span class="identifier">exprB</span></code>, <code class="computeroutput"><span class="identifier">exprC</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">exprA</span></code>, <code class="computeroutput"><span class="identifier">exprB</span></code>, <code class="computeroutput"><span class="identifier">exprC</span></code>
+ </p>
</td>
<td>
- <p>
- Parser expressions.
- </p>
+ <p>
+ Parser expressions.
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">a1</span></code>, <code class="computeroutput"><span class="identifier">a2</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">a1</span></code>, <code class="computeroutput"><span class="identifier">a2</span></code>
+ </p>
</td>
<td>
- <p>
- Arguments passed to the subrule group. They are passed as inherited
- attributes to the group's start subrule, <code class="computeroutput"><span class="identifier">srA</span></code>.
- </p>
+ <p>
+ Arguments passed to the subrule group. They are passed as inherited
+ attributes to the group's start subrule, <code class="computeroutput"><span class="identifier">srA</span></code>.
+ </p>
</td>
</tr>
<tr>
<td>
- <p>
- <code class="computeroutput"><span class="identifier">c1</span></code>, <code class="computeroutput"><span class="identifier">c2</span></code>
- </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">c1</span></code>, <code class="computeroutput"><span class="identifier">c2</span></code>
+ </p>
</td>
<td>
- <p>
- Arguments passed as inherited attributes to subrule <code class="computeroutput"><span class="identifier">srC</span></code>.
- </p>
+ <p>
+ Arguments passed as inherited attributes to subrule <code class="computeroutput"><span class="identifier">srC</span></code>.
+ </p>
</td>
</tr>
</tbody>
</table></div>
<a name="spirit_repository.qi_components.nonterminal.subrule.groups"></a><h6>
-<a name="id632980"></a>
+<a name="id769280"></a>
<a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.groups">Groups</a>
</h6>
<p>
@@ -383,7 +379,7 @@
</span><span class="special">;</span>
</pre>
<a name="spirit_repository.qi_components.nonterminal.subrule.attributes"></a><h6>
-<a name="id633381"></a>
+<a name="id769725"></a>
<a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.attributes">Attributes</a>
</h6>
<p>
@@ -392,26 +388,27 @@
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
- the type of its synthesized attribute is the one specified in the subrule's
- signature, if any. Otherwise it is <code class="computeroutput"><span class="identifier">unused_type</span></code>.
- </li>
+ the type of its synthesized attribute is the one specified in the subrule's
+ signature, if any. Otherwise it is <code class="computeroutput"><span class="identifier">unused_type</span></code>.
+ </li>
<li class="listitem">
- the types of its inherited attributes are the ones specified in the subrule's
- signature, if any. Otherwise the subrule has no inherited attributes.
- </li>
+ the types of its inherited attributes are the ones specified in the
+ subrule's signature, if any. Otherwise the subrule has no inherited
+ attributes.
+ </li>
<li class="listitem">
- an auto-subrule can be defined by assigning it with the <code class="computeroutput"><span class="special">%=</span></code> syntax. In this case, the RHS parser's
- attribute is automatically propagated to the subrule's synthesized attribute.
- </li>
+ an auto-subrule can be defined by assigning it with the <code class="computeroutput"><span class="special">%=</span></code> syntax. In this case, the RHS parser's
+ attribute is automatically propagated to the subrule's synthesized
+ attribute.
+ </li>
<li class="listitem">
- the Phoenix placeholders <code class="computeroutput"><span class="identifier">_val</span></code>,
- <code class="computeroutput"><span class="identifier">_r1</span></code>, <code class="computeroutput"><span class="identifier">_r2</span></code>,
- ... are available to refer to the subrule's synthesized and inherited
- attributes, if present.
- </li>
+ the Phoenix placeholders <code class="computeroutput"><span class="identifier">_val</span></code>,
+ <code class="computeroutput"><span class="identifier">_r1</span></code>, <code class="computeroutput"><span class="identifier">_r2</span></code>, ... are available to refer to
+ the subrule's synthesized and inherited attributes, if present.
+ </li>
</ul></div>
<a name="spirit_repository.qi_components.nonterminal.subrule.locals"></a><h6>
-<a name="id633457"></a>
+<a name="id769830"></a>
<a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.locals">Locals</a>
</h6>
<p>
@@ -421,16 +418,14 @@
refer to the subrule's locals, if present.
</p>
<a name="spirit_repository.qi_components.nonterminal.subrule.example"></a><h6>
-<a name="id633493"></a>
+<a name="id769872"></a>
<a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.example">Example</a>
</h6>
<p>
Some includes:
</p>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi_subrule</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
@@ -438,32 +433,24 @@
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
- </p>
-<p>
</p>
<p>
Some using declarations:
</p>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">qi</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">qi</span><span class="special">;</span>
<span class="keyword">namespace</span> <span class="identifier">repo</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">repository</span><span class="special">;</span>
<span class="keyword">namespace</span> <span class="identifier">ascii</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">ascii</span><span class="special">;</span>
</pre>
<p>
- </p>
-<p>
</p>
<p>
A grammar containing only one rule, defined with a group of 5 subrules:
</p>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Iterator</span><span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">mini_xml_grammar</span>
@@ -511,8 +498,6 @@
<span class="special">};</span>
</pre>
<p>
- </p>
-<p>
</p>
<p>
The definitions of the <code class="computeroutput"><span class="identifier">mini_xml</span></code>
@@ -521,7 +506,7 @@
<a href="../../../../../example/qi/mini_xml2_sr.cpp" target="_top">../../example/qi/mini_xml2_sr.cpp</a>
</p>
<a name="spirit_repository.qi_components.nonterminal.subrule.performance"></a><h6>
-<a name="id634763"></a>
+<a name="id771325"></a>
<a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.performance">Performance</a>
</h6>
<p>
@@ -529,7 +514,7 @@
examples to subrules, with various compilers.
</p>
<div class="table">
-<a name="id634779"></a><p class="title"><b>Table 2. Subrules performance</b></p>
+<a name="id771345"></a><p class="title"><b>Table 2. Subrules performance</b></p>
<div class="table-contents"><table class="table" summary="Subrules performance">
<colgroup>
<col>
@@ -540,220 +525,220 @@
</colgroup>
<thead><tr>
<th>
- <p>
- Example
- </p>
- </th>
+ <p>
+ Example
+ </p>
+ </th>
<th>
- <p>
- Compiler
- </p>
- </th>
+ <p>
+ Compiler
+ </p>
+ </th>
<th>
- <p>
- Speed (run-time)
- </p>
- </th>
+ <p>
+ Speed (run-time)
+ </p>
+ </th>
<th>
- <p>
- Time (compile-time)
- </p>
- </th>
+ <p>
+ Time (compile-time)
+ </p>
+ </th>
<th>
- <p>
- Memory (compile-time)
- </p>
- </th>
+ <p>
+ Memory (compile-time)
+ </p>
+ </th>
</tr></thead>
<tbody>
<tr>
<td>
- <p>
- calc1_sr
- </p>
- </td>
-<td>
- <p>
- gcc 4.4.1
- </p>
- </td>
-<td>
- <p>
- +6%
- </p>
- </td>
-<td>
- <p>
- n/a
- </p>
- </td>
-<td>
- <p>
- n/a
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- calc1_sr
- </p>
- </td>
-<td>
- <p>
- Visual C++ 2008 (VC9)
- </p>
- </td>
-<td>
- <p>
- +5%
- </p>
- </td>
-<td>
- <p>
- n/a
- </p>
- </td>
-<td>
- <p>
- n/a
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- mini_xml2_sr
- </p>
- </td>
-<td>
- <p>
- gcc 3.4.6
- </p>
- </td>
-<td>
- <p>
- -1%
- </p>
- </td>
-<td>
- <p>
- +54%
- </p>
- </td>
-<td>
- <p>
- +32%
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- mini_xml2_sr
- </p>
- </td>
-<td>
- <p>
- gcc 4.1.2
- </p>
- </td>
-<td>
- <p>
- +5%
- </p>
- </td>
-<td>
- <p>
- +58%
- </p>
- </td>
-<td>
- <p>
- +25%
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- mini_xml2_sr
- </p>
- </td>
-<td>
- <p>
- gcc 4.4.1
- </p>
- </td>
-<td>
- <p>
- +8%
- </p>
- </td>
-<td>
- <p>
- +20%
- </p>
- </td>
-<td>
- <p>
- +14%
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- mini_xml2_sr
- </p>
- </td>
-<td>
- <p>
- Visual C++ 2005 (VC8) SP1
- </p>
- </td>
-<td>
- <p>
- +1%
- </p>
- </td>
-<td>
- <p>
- +33%
- </p>
- </td>
-<td>
- <p>
- +27%
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- mini_xml2_sr
- </p>
- </td>
-<td>
- <p>
- Visual C++ 2008 (VC9)
- </p>
- </td>
-<td>
- <p>
- +9%
- </p>
- </td>
-<td>
- <p>
- +52%
- </p>
- </td>
-<td>
- <p>
- +40%
- </p>
- </td>
+ <p>
+ calc1_sr
+ </p>
+ </td>
+<td>
+ <p>
+ gcc 4.4.1
+ </p>
+ </td>
+<td>
+ <p>
+ +6%
+ </p>
+ </td>
+<td>
+ <p>
+ n/a
+ </p>
+ </td>
+<td>
+ <p>
+ n/a
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ calc1_sr
+ </p>
+ </td>
+<td>
+ <p>
+ Visual C++ 2008 (VC9)
+ </p>
+ </td>
+<td>
+ <p>
+ +5%
+ </p>
+ </td>
+<td>
+ <p>
+ n/a
+ </p>
+ </td>
+<td>
+ <p>
+ n/a
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mini_xml2_sr
+ </p>
+ </td>
+<td>
+ <p>
+ gcc 3.4.6
+ </p>
+ </td>
+<td>
+ <p>
+ -1%
+ </p>
+ </td>
+<td>
+ <p>
+ +54%
+ </p>
+ </td>
+<td>
+ <p>
+ +32%
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mini_xml2_sr
+ </p>
+ </td>
+<td>
+ <p>
+ gcc 4.1.2
+ </p>
+ </td>
+<td>
+ <p>
+ +5%
+ </p>
+ </td>
+<td>
+ <p>
+ +58%
+ </p>
+ </td>
+<td>
+ <p>
+ +25%
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mini_xml2_sr
+ </p>
+ </td>
+<td>
+ <p>
+ gcc 4.4.1
+ </p>
+ </td>
+<td>
+ <p>
+ +8%
+ </p>
+ </td>
+<td>
+ <p>
+ +20%
+ </p>
+ </td>
+<td>
+ <p>
+ +14%
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mini_xml2_sr
+ </p>
+ </td>
+<td>
+ <p>
+ Visual C++ 2005 (VC8) SP1
+ </p>
+ </td>
+<td>
+ <p>
+ +1%
+ </p>
+ </td>
+<td>
+ <p>
+ +33%
+ </p>
+ </td>
+<td>
+ <p>
+ +27%
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ mini_xml2_sr
+ </p>
+ </td>
+<td>
+ <p>
+ Visual C++ 2008 (VC9)
+ </p>
+ </td>
+<td>
+ <p>
+ +9%
+ </p>
+ </td>
+<td>
+ <p>
+ +52%
+ </p>
+ </td>
+<td>
+ <p>
+ +40%
+ </p>
+ </td>
</tr>
</tbody>
</table></div>
@@ -763,20 +748,20 @@
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
-<span class="bold"><strong>Speed (run-time)</strong></span>: speed-up of the parser
- resulting from the use of subrules (higher is better).
- </li>
+ <span class="bold"><strong>Speed (run-time)</strong></span>: speed-up of the
+ parser resulting from the use of subrules (higher is better).
+ </li>
<li class="listitem">
-<span class="bold"><strong>Time (compile-time)</strong></span>: increase in compile
- time (lower is better).
- </li>
+ <span class="bold"><strong>Time (compile-time)</strong></span>: increase in compile
+ time (lower is better).
+ </li>
<li class="listitem">
-<span class="bold"><strong>Memory (compile-time)</strong></span>: increase in compiler
- memory usage (lower is better).
- </li>
+ <span class="bold"><strong>Memory (compile-time)</strong></span>: increase in
+ compiler memory usage (lower is better).
+ </li>
</ul></div>
<a name="spirit_repository.qi_components.nonterminal.subrule.notes"></a><h6>
-<a name="id635118"></a>
+<a name="id771740"></a>
<a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.notes">Notes</a>
</h6>
<p>
@@ -800,7 +785,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="../nonterminal.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../nonterminal.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../../karma_components.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../karma_components.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive.html
==============================================================================
--- trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive.html (original)
+++ trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Qi Parser Primitives</title>
-<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Spirit Repository 0.1">
<link rel="up" href="../qi_components.html" title="Qi Components">
<link rel="prev" href="../qi_components.html" title="Qi Components">
@@ -13,16 +13,16 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="../qi_components.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_components.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="primitive/flush_multi_pass.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../qi_components.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_components.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="primitive/flush_multi_pass.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Qi Parser Primitives">
+<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="spirit_repository.qi_components.primitive"></a><a class="link" href="primitive.html" title="Qi Parser Primitives"> Qi Parser
Primitives</a>
@@ -40,7 +40,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="../qi_components.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_components.html"><img src="../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="primitive/flush_multi_pass.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../qi_components.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_components.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="primitive/flush_multi_pass.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive/flush_multi_pass.html
==============================================================================
--- trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive/flush_multi_pass.html (original)
+++ trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive/flush_multi_pass.html 2010-07-19 16:15:52 EDT (Mon, 19 Jul 2010)
@@ -2,8 +2,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Qi flush_multi_pass parser</title>
-<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../index.html" title="Spirit Repository 0.1">
<link rel="up" href="../primitive.html" title="Qi Parser Primitives">
<link rel="prev" href="../primitive.html" title="Qi Parser Primitives">
@@ -13,22 +13,22 @@
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
<td align="center">Home</td>
-<td align="center">Libraries</td>
+<td align="center">Libraries</td>
<td align="center">People</td>
<td align="center">FAQ</td>
<td align="center">More</td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="../primitive.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitive.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../directives.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../primitive.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitive.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../directives.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
-<div class="section" title="Qi flush_multi_pass parser">
+<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="spirit_repository.qi_components.primitive.flush_multi_pass"></a><a class="link" href="flush_multi_pass.html" title="Qi flush_multi_pass parser">
Qi flush_multi_pass parser</a>
</h4></div></div></div>
<a name="spirit_repository.qi_components.primitive.flush_multi_pass.description"></a><h6>
-<a name="id619892"></a>
+<a name="id760277"></a>
<a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.description">Description</a>
</h6>
<p>
@@ -53,20 +53,20 @@
<code class="computeroutput"><span class="identifier">eps</span></code>).
</p>
<a name="spirit_repository.qi_components.primitive.flush_multi_pass.header"></a><h6>
-<a name="id620000"></a>
+<a name="id760413"></a>
<a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.header">Header</a>
</h6>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/repository/home/qi/primitive/flush_multi_pass.hpp>
</span><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi_flush_multi_pass</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<a name="spirit_repository.qi_components.primitive.flush_multi_pass.synopsis"></a><h6>
-<a name="id620073"></a>
+<a name="id760502"></a>
<a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.synopsis">Synopsis</a>
</h6>
<pre class="programlisting"><span class="identifier">flush_multi_pass</span>
</pre>
<a name="spirit_repository.qi_components.primitive.flush_multi_pass.parameters"></a><h6>
-<a name="id620094"></a>
+<a name="id760531"></a>
<a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.parameters">Parameters</a>
</h6>
<p>
@@ -74,7 +74,7 @@
not require any parameters.
</p>
<a name="spirit_repository.qi_components.primitive.flush_multi_pass.attribute"></a><h6>
-<a name="id620118"></a>
+<a name="id760563"></a>
<a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.attribute">Attribute</a>
</h6>
<p>
@@ -84,7 +84,7 @@
<pre class="programlisting"><span class="identifier">flush_multi_pass</span> <span class="special">--></span> <span class="identifier">unused</span>
</pre>
<a name="spirit_repository.qi_components.primitive.flush_multi_pass.example"></a><h6>
-<a name="id620168"></a>
+<a name="id760623"></a>
<a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.example">Example</a>
</h6>
<p>
@@ -96,7 +96,7 @@
a function prototype (for the full example code see here: flush_multi_pass.cpp)
</p>
<a name="spirit_repository.qi_components.primitive.flush_multi_pass.prerequisites"></a><h6>
-<a name="id620200"></a>
+<a name="id760666"></a>
<a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.prerequisites">Prerequisites</a>
</h6>
<p>
@@ -106,34 +106,26 @@
parser.
</p>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi_flush_multi_pass</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
<p>
- </p>
-<p>
</p>
<p>
To make all the code below more readable we introduce the following namespaces.
</p>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">spirit</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">;</span>
<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">repository</span><span class="special">::</span><span class="identifier">flush_multi_pass</span><span class="special">;</span>
</pre>
<p>
- </p>
-<p>
</p>
<a name="spirit_repository.qi_components.primitive.flush_multi_pass.clearing_the_internal_buffer"></a><h6>
-<a name="id620416"></a>
+<a name="id760902"></a>
<a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.clearing_the_internal_buffer">Clearing
the internal buffer</a>
</h6>
@@ -147,9 +139,7 @@
purpose.
</p>
<p>
- </p>
-<p>
-
+
</p>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Iterator</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Skipper</span><span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">preprocessor</span> <span class="special">:</span> <span class="identifier">spirit</span><span class="special">::</span><span class="identifier">qi</span><span class="special">::</span><span class="identifier">grammar</span><span class="special"><</span><span class="identifier">Iterator</span><span class="special">,</span> <span class="identifier">Skipper</span><span class="special">></span>
@@ -188,10 +178,8 @@
<span class="special">};</span>
</pre>
<p>
- </p>
-<p>
</p>
-<div class="note" title="Note"><table border="0" summary="Note">
+<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>
@@ -213,7 +201,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="../primitive.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitive.html"><img src="../../../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../directives.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../primitive.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitive.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../directives.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
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