Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69230 - in sandbox/local: boost/local boost/local/aux_ libs/local/doc/html libs/local/doc/html/boost/local
From: lorcaminiti_at_[hidden]
Date: 2011-02-23 22:52:41


Author: lcaminiti
Date: 2011-02-23 22:52:40 EST (Wed, 23 Feb 2011)
New Revision: 69230
URL: http://svn.boost.org/trac/boost/changeset/69230

Log:
Added blocks and exits source files.
Added:
   sandbox/local/boost/local/aux_/block.hpp (contents, props changed)
   sandbox/local/boost/local/aux_/exit.hpp (contents, props changed)
   sandbox/local/boost/local/block.hpp (contents, props changed)
   sandbox/local/boost/local/exit.hpp (contents, props changed)
   sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_NAME.html (contents, props changed)
   sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_PARAMS.html (contents, props changed)
   sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_PARAMS_TPL.html (contents, props changed)
   sandbox/local/libs/local/doc/html/boost/local/function.html (contents, props changed)

Added: sandbox/local/boost/local/aux_/block.hpp
==============================================================================
--- (empty file)
+++ sandbox/local/boost/local/aux_/block.hpp 2011-02-23 22:52:40 EST (Wed, 23 Feb 2011)
@@ -0,0 +1,27 @@
+
+// Copyright (C) 2009-2011 Lorenzo Caminiti
+// Use, modification, and distribution is subject to the
+// Boost Software License, Version 1.0
+// (see accompanying file LICENSE_1_0.txt or a copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+
+#ifndef BOOST_LOCAL_AUX_BLOCK_HPP_
+#define BOOST_LOCAL_AUX_BLOCK_HPP_
+
+#include "symbol.hpp"
+
+// Users can exit a local block (and not enclosing function) using `return;`.
+#define BOOST_LOCAL_AUX_BLOCK( \
+ local_function_params_macro, parenthesized_binding) \
+ void local_function_params_macro(parenthesized_binding) \
+ /* user block code `{ ... }` here */
+
+#define BOOST_LOCAL_AUX_BLOCK_END(id) \
+ /* user block code `{ ... }` here */ \
+ /* ends the local function declaration */ \
+ BOOST_LOCAL_FUNCTION_NAME(BOOST_LOCAL_AUX_SYMBOL_BLOCK_FUNCTION_NAME(id)) \
+ /* call local funciton and execute block's code imediately */ \
+ BOOST_LOCAL_AUX_SYMBOL_BLOCK_FUNCTION_NAME(id)(); \
+
+#endif // #include guard
+

Added: sandbox/local/boost/local/aux_/exit.hpp
==============================================================================
--- (empty file)
+++ sandbox/local/boost/local/aux_/exit.hpp 2011-02-23 22:52:40 EST (Wed, 23 Feb 2011)
@@ -0,0 +1,53 @@
+
+// Copyright (C) 2009-2011 Lorenzo Caminiti
+// Use, modification, and distribution is subject to the
+// Boost Software License, Version 1.0
+// (see accompanying file LICENSE_1_0.txt or a copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+
+#ifndef BOOST_LOCAL_AUX_EXIT_HPP_
+#define BOOST_LOCAL_AUX_EXIT_HPP_
+
+#include "symbol.hpp"
+#include "../function.hpp"
+#include <boost/preprocessor/cat.hpp>
+
+// PRIVATE //
+
+#define BOOST_LOCAL_AUX_EXIT_NAME_(name, id) \
+ BOOST_LOCAL_AUX_INTERNAL_SYMBOL(BOOST_PP_CAT(BOOST_PP_CAT( \
+ BOOST_PP_CAT(exit, BOOST_LOCAL_AUX_SYMBOL_INFIX), name), id))
+
+// PUBLIC //
+
+// Users can exit local scope (and not enclosing function) using `return;`
+// (same as with Boost.ScopeExit).
+#define BOOST_LOCAL_AUX_EXIT(local_function_params_macro, \
+ parenthesized_binding) \
+ void local_function_params_macro(parenthesized_binding) \
+ /* user code block `{ ... }` here */
+
+#define BOOST_LOCAL_AUX_EXIT_END(id) \
+ /* user code exit `{ ... }` here */ \
+ /* ends the local function declaration */ \
+ BOOST_LOCAL_FUNCTION_NAME(BOOST_LOCAL_AUX_EXIT_NAME_(function, id)) \
+ /* guard resourse -- function invoked when guard obj goes out of scope */ \
+ ::boost::local::aux::exit_guard BOOST_LOCAL_AUX_EXIT_NAME_(guard, id)( \
+ BOOST_LOCAL_AUX_EXIT_NAME_(function, id));
+
+namespace boost { namespace local { namespace aux {
+
+// Resource destructor exec exit code when obj goes out of local scope.
+struct exit_guard {
+ // Exit local functions are always void with no params (and no defaults).
+ typedef ::boost::local::function<void ()> functor_type;
+ explicit exit_guard(functor_type f): f_(f) {}
+ ~exit_guard() { f_(); } // Invokes function when obj goes out of scope.
+private:
+ functor_type f_;
+};
+
+}}} // namespace
+
+#endif // #include guard
+

Added: sandbox/local/boost/local/block.hpp
==============================================================================
--- (empty file)
+++ sandbox/local/boost/local/block.hpp 2011-02-23 22:52:40 EST (Wed, 23 Feb 2011)
@@ -0,0 +1,102 @@
+
+// Copyright (C) 2009-2011 Lorenzo Caminiti
+// Use, modification, and distribution is subject to the
+// Boost Software License, Version 1.0
+// (see accompanying file LICENSE_1_0.txt or a copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+
+/** @file
+ * @brief Local blocks allow to program code that is executed accessing some of
+ * the variables in scope as constants.
+ */
+
+#ifndef BOOST_LOCAL_BLOCK_HPP_
+#define BOOST_LOCAL_BLOCK_HPP_
+
+#include "function.hpp"
+#include "aux_/block.hpp"
+#include <boost/config.hpp> // For variadic macros.
+
+#if defined(BOOST_NO_VARIADIC_MACROS)
+
+/**
+ * @brief This macro starts the declaration of a local block.
+ *
+ * This macro must be used within a declarative context, it must be followed by
+ * the local block body code <c>{ ... }</c> and then by the
+ * @RefMacro{CONTRACT_DETAIL_LOCAL_BLOCK_END} macro (see the Tutorial section):
+ * @code
+ * { // Some declarative context.
+ * ...
+ *
+ * CONTRACT_DETAIL_LOCAL_BLOCK(
+ * parenthesized_binding
+ * ) exception_specifications_optional {
+ * ... // Block body.
+ * } CONTRACT_DETAIL_LOCAL_BLOCK_END
+ *
+ * ...
+ * }
+ * @endcode
+ *
+ * Within templates, the special macro
+ * @RefMacro{CONTRACT_DETAIL_LOCAL_BLOCK_TPL} must be used instead of
+ * @RefMacro{CONTRACT_DETAIL_LOCAL_BLOCK}.
+ *
+ * @Note A <c>return;</c> instruction from within a local block body jumps to
+ * the end of the local block body and it does not return the enclosing scope.
+ *
+ * @Params
+ * @Param{parenthesized_binding,
+ * A Boost.Preprocessor sequence that uses the parenthesized syntax to specify
+ * the variables in scope to bind (see the Grammar section).
+ * }
+ * @EndParams
+ *
+ * As usual, exception specifications can be optionally programmed before the
+ * body code block (see the Advanced section).
+ *
+ * @See @RefSect{Tutorial} section, @RefSect{Advanced} section,
+ * @RefSect{Grammar} section, @RefMacro{CONTRACT_DETAIL_LOCAL_BLOCK_TPL},
+ * @RefMacro{CONTRACT_DETAIL_LOCAL_BLOCK_END}.
+ */
+#define BOOST_LOCAL_BLOCK(binding_list) \
+ BOOST_LOCAL_AUX_BLOCK(BOOST_LOCAL_FUNCTION_PARAMS, binding_list)
+/**
+ * @brief This macro is the same as @RefMacro{CONTRACT_DETAIL_LOCAL_BLOCK} but
+ * it must be used when declaring local blocks within templates.
+ *
+ * @See @RefMacro{CONTRACT_DETAIL_LOCAL_BLOCK}, @RefSect{Tutorial} section.
+ */
+#define BOOST_LOCAL_BLOCK_TPL(binding_list) \
+ BOOST_LOCAL_AUX_BLOCK(BOOST_LOCAL_FUNCTION_PARAMS_TPL, binding_list)
+
+#else // BOOST_NO_VARIADIC_MACROS
+
+#include "aux_/preprocessor/va.hpp"
+
+#define BOOST_LOCAL_BLOCK(...) \
+ BOOST_LOCAL_AUX_BLOCK(BOOST_LOCAL_FUNCTION_PARAMS, \
+ BOOST_LOCAL_AUX_PP_VA_TO_SEQ( \
+ (void) /* for empty seq */, __VA_ARGS__))
+
+#define BOOST_LOCAL_BLOCK_TPL(...) \
+ BOOST_LOCAL_AUX_BLOCK(BOOST_LOCAL_FUNCTION_PARAMS_TPL, \
+ BOOST_LOCAL_AUX_PP_VA_TO_SEQ( \
+ (void) /* for empty seq */, __VA_ARGS__))
+
+#endif // BOOST_NO_VARIADIC_MACROS
+
+/**
+ * @brief This macro ends the definition of a local block.
+ *
+ * This macro must follow the local block body code <c>{ ... }</c> as
+ * shown in the @RefMacro{CONTRACT_DETAIL_LOCAL_BLOCK} documentation.
+ *
+ * @See @RefMacro{CONTRACT_DETAIL_LOCAL_BLOCK}, @RefSect{Tutorial} section.
+ */
+#define BOOST_LOCAL_BLOCK_END \
+ BOOST_LOCAL_AUX_BLOCK_END(__LINE__)
+
+#endif // #include guard
+

Added: sandbox/local/boost/local/exit.hpp
==============================================================================
--- (empty file)
+++ sandbox/local/boost/local/exit.hpp 2011-02-23 22:52:40 EST (Wed, 23 Feb 2011)
@@ -0,0 +1,104 @@
+
+// Copyright (C) 2009-2011 Lorenzo Caminiti
+// Use, modification, and distribution is subject to the
+// Boost Software License, Version 1.0
+// (see accompanying file LICENSE_1_0.txt or a copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+
+/** @file
+ * @brief Local exits allow to program code that is executed when the enclosing
+ * scope is exited.
+ */
+
+#ifndef BOOST_LOCAL_EXIT_HPP_
+#define BOOST_LOCAL_EXIT_HPP_
+
+#include "function.hpp"
+#include "aux_/exit.hpp"
+#include <boost/config.hpp> // For variadic macros.
+
+#if defined(BOOST_NO_VARIADIC_MACROS)
+
+/**
+ * @brief This macro starts the declaration of a local exit.
+ *
+ * This macro must be used within a declarative context, it must be followed by
+ * the local exit body code <c>{ ... }</c> and then by the
+ * @RefMacro{CONTRACT_DETAIL_LOCAL_EXIT_END} macro (see the @RefSect{Tutorial}
+ * section):
+ * @code
+ * { // Some declarative context.
+ * ...
+ *
+ * CONTRACT_DETAIL_LOCAL_EXIT(
+ * parenthesized_binding
+ * ) exception_specifications_optional {
+ * ... // Block body.
+ * } CONTRACT_DETAIL_LOCAL_EXIT_END
+ *
+ * ...
+ * }
+ * @endcode
+ *
+ * Within templates, the special macro
+ * @RefMacro{CONTRACT_DETAIL_LOCAL_EXIT_TPL} must be used instead of
+ * @RefMacro{CONTRACT_DETAIL_LOCAL_EXIT}.
+ *
+ * @Note A <c>return;</c> instruction from within a local exit body jumps to
+ * the end of the local exit body and it does not return the enclosing scope.
+ *
+ * @Params
+ * @Param{parenthesized_binding,
+ * A Boost.Preprocessor sequence that uses the parenthesized syntax to specify
+ * the variables in scope to bind (see the @RefSect{Grammar} section).
+ * }
+ * @EndParams
+ *
+ * As usual, exception specifications can be optionally programmed before the
+ * body code block (see the @RefSect{Advanced} section).
+ *
+ * @See @RefSect{Tutorial} section, @RefSect{Advanced} section,
+ * @RefSect{Grammar} section, @RefMacro{CONTRACT_DETAIL_LOCAL_EXIT_TPL},
+ * @RefMacro{CONTRACT_DETAIL_LOCAL_EXIT_END}.
+ */
+#define BOOST_LOCAL_EXIT(binding_list) \
+ BOOST_LOCAL_AUX_EXIT(BOOST_LOCAL_FUNCTION_PARAMS, binding_list)
+
+/**
+ * @brief This macro is the same as @RefMacro{CONTRACT_DETAIL_LOCAL_EXIT} but
+ * it must used when declaring local exits within templates.
+ *
+ * @See @RefMacro{CONTRACT_DETAIL_LOCAL_EXIT}, @RefSect{Tutorial} section.
+ */
+#define BOOST_LOCAL_EXIT_TPL(binding_list) \
+ BOOST_LOCAL_AUX_EXIT(BOOST_LOCAL_FUNCTION_PARAMS_TPL, binding_list)
+
+#else // BOOST_NO_VARIADIC_MACROS
+
+#include "aux_/preprocessor/va.hpp"
+
+#define BOOST_LOCAL_EXIT(...) \
+ BOOST_LOCAL_AUX_EXIT(BOOST_LOCAL_FUNCTION_PARAMS, \
+ BOOST_LOCAL_AUX_PP_VA_TO_SEQ( \
+ (void) /* for empty seq */, __VA_ARGS__))
+
+#define BOOST_LOCAL_EXIT_TPL(binding_list) \
+ BOOST_LOCAL_AUX_EXIT(BOOST_LOCAL_FUNCTION_PARAMS_TPL, \
+ BOOST_LOCAL_AUX_PP_VA_TO_SEQ( \
+ (void) /* for empty seq */, __VA_ARGS__))
+
+#endif // BOOST_NO_VARIADIC_MACROS
+
+/**
+ * @brief This macro ends the definition of a local exit.
+ *
+ * This macro must follow the local exit body code <c>{ ... }</c> as
+ * shown in the @RefMacro{CONTRACT_DETAIL_LOCAL_EXIT} documentation.
+ *
+ * @See @RefMacro{CONTRACT_DETAIL_LOCAL_EXIT}, @RefSect{Tutorial} section.
+ */
+#define BOOST_LOCAL_EXIT_END \
+ BOOST_LOCAL_AUX_EXIT_END(__LINE__)
+
+#endif // #include guard
+

Added: sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_NAME.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_NAME.html 2011-02-23 22:52:40 EST (Wed, 23 Feb 2011)
@@ -0,0 +1,49 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro BOOST_LOCAL_FUNCTION_NAME</title>
+<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Boost.Local 0.1.1">
+<link rel="up" href="reference.html#header.boost.local.function_hpp" title="Header &lt;boost/local/function.hpp&gt;">
+<link rel="prev" href="BOOST_LOCAL_FUNCTION_PARAMS_TPL.html" title="Macro BOOST_LOCAL_FUNCTION_PARAMS_TPL">
+<link rel="next" href="BOOST_IDENTITY_TYPE.html" title="Macro BOOST_IDENTITY_TYPE">
+</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">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="BOOST_LOCAL_FUNCTION_PARAMS_TPL.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.function_hpp"><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="BOOST_IDENTITY_TYPE.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="BOOST_LOCAL_FUNCTION_NAME"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro BOOST_LOCAL_FUNCTION_NAME</span></h2>
+<p>BOOST_LOCAL_FUNCTION_NAME</p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.boost.local.function_hpp" title="Header &lt;boost/local/function.hpp&gt;">boost/local/function.hpp</a>&gt;
+
+</span>BOOST_LOCAL_FUNCTION_NAME(name)</pre></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 &#169; 2009 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="BOOST_LOCAL_FUNCTION_PARAMS_TPL.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.function_hpp"><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="BOOST_IDENTITY_TYPE.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_PARAMS.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_PARAMS.html 2011-02-23 22:52:40 EST (Wed, 23 Feb 2011)
@@ -0,0 +1,49 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro BOOST_LOCAL_FUNCTION_PARAMS</title>
+<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Boost.Local 0.1.1">
+<link rel="up" href="reference.html#header.boost.local.function_hpp" title="Header &lt;boost/local/function.hpp&gt;">
+<link rel="prev" href="boost/local/function.html" title="Struct template function">
+<link rel="next" href="BOOST_LOCAL_FUNCTION_PARAMS_TPL.html" title="Macro BOOST_LOCAL_FUNCTION_PARAMS_TPL">
+</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">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="boost/local/function.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.function_hpp"><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="BOOST_LOCAL_FUNCTION_PARAMS_TPL.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="BOOST_LOCAL_FUNCTION_PARAMS"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro BOOST_LOCAL_FUNCTION_PARAMS</span></h2>
+<p>BOOST_LOCAL_FUNCTION_PARAMS</p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.boost.local.function_hpp" title="Header &lt;boost/local/function.hpp&gt;">boost/local/function.hpp</a>&gt;
+
+</span>BOOST_LOCAL_FUNCTION_PARAMS(...)</pre></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 &#169; 2009 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="boost/local/function.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.function_hpp"><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="BOOST_LOCAL_FUNCTION_PARAMS_TPL.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_PARAMS_TPL.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/BOOST_LOCAL_FUNCTION_PARAMS_TPL.html 2011-02-23 22:52:40 EST (Wed, 23 Feb 2011)
@@ -0,0 +1,49 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Macro BOOST_LOCAL_FUNCTION_PARAMS_TPL</title>
+<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="index.html" title="Boost.Local 0.1.1">
+<link rel="up" href="reference.html#header.boost.local.function_hpp" title="Header &lt;boost/local/function.hpp&gt;">
+<link rel="prev" href="BOOST_LOCAL_FUNCTION_PARAMS.html" title="Macro BOOST_LOCAL_FUNCTION_PARAMS">
+<link rel="next" href="BOOST_LOCAL_FUNCTION_NAME.html" title="Macro BOOST_LOCAL_FUNCTION_NAME">
+</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">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="BOOST_LOCAL_FUNCTION_PARAMS.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.function_hpp"><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="BOOST_LOCAL_FUNCTION_NAME.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="BOOST_LOCAL_FUNCTION_PARAMS_TPL"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Macro BOOST_LOCAL_FUNCTION_PARAMS_TPL</span></h2>
+<p>BOOST_LOCAL_FUNCTION_PARAMS_TPL</p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="reference.html#header.boost.local.function_hpp" title="Header &lt;boost/local/function.hpp&gt;">boost/local/function.hpp</a>&gt;
+
+</span>BOOST_LOCAL_FUNCTION_PARAMS_TPL(...)</pre></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 &#169; 2009 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="BOOST_LOCAL_FUNCTION_PARAMS.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="reference.html#header.boost.local.function_hpp"><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="BOOST_LOCAL_FUNCTION_NAME.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/local/libs/local/doc/html/boost/local/function.html
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/doc/html/boost/local/function.html 2011-02-23 22:52:40 EST (Wed, 23 Feb 2011)
@@ -0,0 +1,102 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Struct template function</title>
+<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
+<link rel="home" href="../../index.html" title="Boost.Local 0.1.1">
+<link rel="up" href="../../reference.html#header.boost.local.function_hpp" title="Header &lt;boost/local/function.hpp&gt;">
+<link rel="prev" href="../../BOOST_LOCAL_CONFIG_THIS_PARAM_NAME.html" title="Macro BOOST_LOCAL_CONFIG_THIS_PARAM_NAME">
+<link rel="next" href="../../BOOST_LOCAL_FUNCTION_PARAMS.html" title="Macro BOOST_LOCAL_FUNCTION_PARAMS">
+</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">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../../BOOST_LOCAL_CONFIG_THIS_PARAM_NAME.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../reference.html#header.boost.local.function_hpp"><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="../../BOOST_LOCAL_FUNCTION_PARAMS.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry">
+<a name="boost.local.function"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Struct template function</span></h2>
+<p>boost::local::function &#8212; Template to hold a reference to a local function while supporting eventual default function parameters. </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../reference.html#header.boost.local.function_hpp" title="Header &lt;boost/local/function.hpp&gt;">boost/local/function.hpp</a>&gt;
+
+</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> F<span class="special">,</span> <span class="identifier">size_t</span> defaults <span class="special">=</span> <span class="number">0</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <a class="link" href="function.html" title="Struct template function">function</a> <span class="special">{</span>
+<span class="special">}</span><span class="special">;</span></pre></div>
+<div class="refsect1">
+<a name="id888622"></a><h2>Description</h2>
+<p>This template defines several specializations to handle a generic number <code class="computeroutput">N</code> of function parameters some of which can have default values. The number of supported function parameters goes from <code class="computeroutput">0</code> (for a function with no parameter) to a maximum of <code class="computeroutput"><a class="link" href="../../BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html" title="Macro BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX">BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX</a></code>.</p>
+<p>Each template specialization defines call operators <code class="computeroutput">operator()(...)</code> with a different set of parameters to handle the number of default parameters specified by <code class="computeroutput">defaults</code> (see <a class="link" href="../../boost_local/Advanced.html" title="Advanced">Advanced</a> section): </p>
+<pre class="programlisting"> <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Result</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Arg1</span><span class="special">,</span> <span class="special">...</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">ArgN</span><span class="special">,</span> <span class="identifier">size_t</span> <span class="identifier">defaults</span> <span class="special">=</span> <span class="number">0</span><span class="special">&gt;</span>
+ <span class="keyword">class</span> <span class="identifier">function_ref</span><span class="special">&lt;</span><span class="identifier">Result</span> <span class="special">(</span><span class="identifier">Arg1</span><span class="special">,</span> <span class="special">...</span><span class="special">,</span> <span class="identifier">ArgN</span><span class="special">)</span><span class="special">,</span> <span class="identifier">defaults</span><span class="special">&gt;</span> <span class="special">{</span>
+ <span class="keyword">public</span><span class="special">:</span>
+ <span class="identifier">Result</span> <span class="keyword">operator</span><span class="special">(</span><span class="special">)</span><span class="special">(</span><span class="identifier">Arg1</span><span class="special">,</span> <span class="special">...</span><span class="special">,</span> <span class="identifier">ArgN</span><span class="special">-</span><span class="number">2</span><span class="special">,</span> <span class="identifier">ArgN</span><span class="special">-</span><span class="number">1</span><span class="special">,</span> <span class="identifier">ArgN</span><span class="special">)</span><span class="special">;</span>
+ <span class="comment">// Call operators to handle default parameters:</span>
+ <span class="identifier">Result</span> <span class="keyword">operator</span><span class="special">(</span><span class="special">)</span><span class="special">(</span><span class="identifier">Arg1</span><span class="special">,</span> <span class="special">...</span><span class="special">,</span> <span class="identifier">ArgN</span><span class="special">-</span><span class="number">2</span><span class="special">,</span> <span class="identifier">ArgN</span><span class="special">-</span><span class="number">1</span><span class="special">)</span><span class="special">;</span> <span class="comment">// iff defaults &gt;= 1</span>
+ <span class="identifier">Result</span> <span class="keyword">operator</span><span class="special">(</span><span class="special">)</span><span class="special">(</span><span class="identifier">Arg1</span><span class="special">,</span> <span class="special">...</span><span class="special">,</span> <span class="identifier">ArgN</span><span class="special">-</span><span class="number">2</span><span class="special">)</span><span class="special">;</span> <span class="comment">// iff defaults &gt;= 2</span>
+ <span class="special">...</span> <span class="comment">// etc</span>
+
+ <span class="comment">// Copy constructor and assignment operator for local functions:</span>
+ <span class="identifier">function_ref</span><span class="special">(</span><span class="identifier">local_function</span><span class="special">&lt;</span><span class="identifier">F</span><span class="special">,</span> <span class="identifier">defaults</span><span class="special">&gt;</span><span class="special">&amp;</span> <span class="identifier">ref</span><span class="special">)</span><span class="special">;</span>
+ <span class="identifier">function_ref</span><span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><span class="identifier">local_function</span><span class="special">&lt;</span><span class="identifier">F</span><span class="special">,</span> <span class="identifier">defaults</span><span class="special">&gt;</span><span class="special">&amp;</span> <span class="identifier">ref</span><span class="special">)</span><span class="special">;</span>
+ <span class="special">}</span><span class="special">;</span>
+</pre>
+<p> Where:</p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem"><p><code class="computeroutput">Result</code> is the function result type. It can be <code class="computeroutput">void</code>.</p></li>
+<li class="listitem"><p><code class="computeroutput">ArgN</code> is the last function parameter type, <code class="computeroutput">ArgN-1</code> is the second last function parameter type, etc. These are all optional (none is specified for a function with no parameter, only <code class="computeroutput">Arg1</code> is specified for a function with only one parameter, etc).</p></li>
+<li class="listitem"><p>The operator <code class="computeroutput">Result operator()(Arg1, ..., ArgN-2, ArgN-1)</code> is defined if and only if there are one or more default parameters (<code class="computeroutput">defaults &gt;= 1</code>), the operator <code class="computeroutput">Result operator()(Arg1, ..., ArgN-2)</code> is defined if and only if there are two or more default parameters (<code class="computeroutput">defaults &gt;= 2</code>), etc.</p></li>
+<li class="listitem"><p><code class="computeroutput">local_function&lt;F, defaults&gt;</code> is an internal type for a local function with a signature matching <code class="computeroutput">F</code> and with a number of default parameters equal to <code class="computeroutput">defaults</code>.</p></li>
+<li class="listitem"><p>The copy constructor and assignment operator <code class="computeroutput">operator=</code> allow to assign this template to a reference to a local function with a signature matching <code class="computeroutput">F</code> and with a number of default parameters equal to <code class="computeroutput">defaults</code>.</p></li>
+</ul></div>
+<p>
+</p>
+<p><span class="bold"><strong>Warning:</strong></span> Programmers must make sure that the local function survives the scope of the function reference (otherwise the reference will be invalid and its use will generate a run-time error as usual with C++ references).</p>
+<p><span class="bold"><strong>Parameters:</strong></span> </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<tbody>
+<tr>
+<td><span class="bold"><strong><code class="computeroutput">F</code></strong></span></td>
+<td>The function signature expressed using the Boost.Function's preferred syntax: <code class="computeroutput">F = Result (Arg1, ..., ArgN)</code>. </td>
+</tr>
+<tr>
+<td><span class="bold"><strong><code class="computeroutput">defaults</code></strong></span></td>
+<td>The number of the function default parameters in <code class="computeroutput">[0,</code> <code class="computeroutput"><a class="link" href="../../BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html" title="Macro BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX">BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX</a></code><code class="computeroutput">]</code>. As usual in C++, default parameters are counted starting from the last parameter: <code class="computeroutput">defaults = 0</code> means that no parameter is optional, <code class="computeroutput">defaults = 1</code> means that the last parameter is optional, <code class="computeroutput">defaults = 2</code> means that the last two parameters are optional, etc. </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+</p>
+<p><span class="bold"><strong>Note:</strong></span> This template is similar to <code class="computeroutput">boost::function&lt;&gt;</code> but it also supports eventual default parameters.</p>
+<p><span class="bold"><strong>See:</strong></span> <a class="link" href="../../boost_local/Advanced.html" title="Advanced">Advanced</a> section, <code class="computeroutput"><a class="link" href="../../BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX.html" title="Macro BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX">BOOST_LOCAL_CONFIG_FUNCTION_ARITY_MAX</a></code>, <code class="computeroutput">BOOST_LOCAL_FUNCTION</code>, Boost.Function. </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 &#169; 2009 -2011 Lorenzo Caminiti<p>
+ Use, modification, and distribution is subject to the Boost Software License,
+ Version 1.0 (see accompanying file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../../BOOST_LOCAL_CONFIG_THIS_PARAM_NAME.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../reference.html#header.boost.local.function_hpp"><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="../../BOOST_LOCAL_FUNCTION_PARAMS.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