| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> |
| <title>Chapter 7. Boost.Function</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="The Boost C++ Libraries BoostBook Documentation Subset"> |
| <link rel="up" href="libraries.html" title="Part I. The Boost C++ Libraries (BoostBook Subset)"> |
| <link rel="prev" href="foreach/history_and_acknowledgements.html" title="History and Acknowledgements"> |
| <link rel="next" href="function/history.html" title="History & Compatibility Notes"> |
| </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"><a href="../../index.html">Home</a></td> |
| <td align="center"><a href="../../libs/libraries.htm">Libraries</a></td> |
| <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> |
| <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> |
| <td align="center"><a href="../../more/index.htm">More</a></td> |
| </tr></table> |
| <hr> |
| <div class="spirit-nav"> |
| <a accesskey="p" href="foreach/history_and_acknowledgements.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.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="function/history.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="function"></a>Chapter 7. Boost.Function</h2></div> |
| <div><div class="author"> |
| <h3 class="author"> |
| <span class="firstname">Douglas</span> <span class="surname">Gregor</span> |
| </h3> |
| <code class="email"><<a class="email" href="mailto:dgregor%20-at-%20cs.indiana.edu">dgregor -at- cs.indiana.edu</a>></code> |
| </div></div> |
| <div><p class="copyright">Copyright © 2001-2004 Douglas Gregor</p></div> |
| <div><div class="legalnotice"> |
| <a name="id1263515"></a><p>Use, modification and distribution is subject to the Boost |
| Software License, Version 1.0. (See accompanying file |
| <code class="filename">LICENSE_1_0.txt</code> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</p> |
| </div></div> |
| </div></div> |
| <div class="toc"> |
| <p><b>Table of Contents</b></p> |
| <dl> |
| <dt><span class="section"><a href="function.html#function.intro">Introduction</a></span></dt> |
| <dt><span class="section"><a href="function/history.html">History & Compatibility Notes</a></span></dt> |
| <dt><span class="section"><a href="function/tutorial.html">Tutorial</a></span></dt> |
| <dd><dl> |
| <dt><span class="section"><a href="function/tutorial.html#id1264148">Basic Usage</a></span></dt> |
| <dt><span class="section"><a href="function/tutorial.html#id1264511">Free functions</a></span></dt> |
| <dt><span class="section"><a href="function/tutorial.html#id1264547">Member functions</a></span></dt> |
| <dt><span class="section"><a href="function/tutorial.html#id1264765">References to Function Objects</a></span></dt> |
| <dt><span class="section"><a href="function/tutorial.html#id1264931">Comparing Boost.Function function objects</a></span></dt> |
| </dl></dd> |
| <dt><span class="section"><a href="function/reference.html">Reference</a></span></dt> |
| <dd><dl> |
| <dt><span class="section"><a href="function/reference.html#function.definitions">Definitions</a></span></dt> |
| <dt><span class="section"><a href="function/reference.html#header.boost.function_hpp">Header <boost/function.hpp></a></span></dt> |
| <dt><span class="section"><a href="function/reference.html#header.boost.function_equal_hpp">Header <boost/function_equal.hpp></a></span></dt> |
| </dl></dd> |
| <dt><span class="section"><a href="function/faq.html">Frequently Asked Questions</a></span></dt> |
| <dt><span class="section"><a href="function/misc.html">Miscellaneous Notes</a></span></dt> |
| <dd><dl> |
| <dt><span class="section"><a href="function/misc.html#id1284995">Boost.Function vs. Function Pointers</a></span></dt> |
| <dt><span class="section"><a href="function/misc.html#id1285061">Performance</a></span></dt> |
| <dt><span class="section"><a href="function/misc.html#id1285134">Combatting virtual function "bloat"</a></span></dt> |
| <dt><span class="section"><a href="function/misc.html#id1285160">Acknowledgements</a></span></dt> |
| </dl></dd> |
| <dt><span class="section"><a href="function/testsuite.html">Testsuite</a></span></dt> |
| <dd><dl> |
| <dt><span class="section"><a href="function/testsuite.html#function.testsuite.acceptance">Acceptance tests</a></span></dt> |
| <dt><span class="section"><a href="function/testsuite.html#function.testsuite.negative">Negative tests</a></span></dt> |
| </dl></dd> |
| </dl> |
| </div> |
| <div class="section"> |
| <div class="titlepage"><div><div><h2 class="title" style="clear: both"> |
| <a name="function.intro"></a>Introduction</h2></div></div></div> |
| <p>The Boost.Function library contains a family of class templates |
| that are function object wrappers. The notion is similar to a |
| generalized callback. It shares features with function pointers in |
| that both define a call interface (e.g., a function taking two integer |
| arguments and returning a floating-point value) through which some |
| implementation can be called, and the implementation that is invoked |
| may change throughout the course of the program.</p> |
| <p> Generally, any place in which a function pointer would be used |
| to defer a call or make a callback, Boost.Function can be used instead |
| to allow the user greater flexibility in the implementation of the |
| target. Targets can be any 'compatible' function object (or function |
| pointer), meaning that the arguments to the interface designated by |
| Boost.Function can be converted to the arguments of the target |
| function object.</p> |
| </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 25, 2004 at 03:59:30 +0100</small></p></td> |
| <td align="right"><div class="copyright-footer"></div></td> |
| </tr></table> |
| <hr> |
| <div class="spirit-nav"> |
| <a accesskey="p" href="foreach/history_and_acknowledgements.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.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="function/history.html"><img src="../../doc/src/images/next.png" alt="Next"></a> |
| </div> |
| </body> |
| </html> |