1 | <?xml version="1.0" encoding="utf-8"?> |
---|
2 | <!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" |
---|
3 | "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> |
---|
4 | <library name="Function" dirname="function" id="function" |
---|
5 | last-revision="$Date: 2004/07/25 02:51:51 $" |
---|
6 | xmlns:xi="http://www.w3.org/2001/XInclude"> |
---|
7 | <libraryinfo> |
---|
8 | <author> |
---|
9 | <firstname>Douglas</firstname> |
---|
10 | <surname>Gregor</surname> |
---|
11 | <email>dgregor -at- cs.indiana.edu</email> |
---|
12 | </author> |
---|
13 | |
---|
14 | <copyright> |
---|
15 | <year>2001</year> |
---|
16 | <year>2002</year> |
---|
17 | <year>2003</year> |
---|
18 | <year>2004</year> |
---|
19 | <holder>Douglas Gregor</holder> |
---|
20 | </copyright> |
---|
21 | |
---|
22 | <legalnotice> |
---|
23 | <para>Use, modification and distribution is subject to the Boost |
---|
24 | Software License, Version 1.0. (See accompanying file |
---|
25 | <filename>LICENSE_1_0.txt</filename> or copy at <ulink |
---|
26 | url="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</ulink>)</para> |
---|
27 | </legalnotice> |
---|
28 | |
---|
29 | <librarypurpose>Function object wrappers for deferred calls or callbacks</librarypurpose> |
---|
30 | <librarycategory name="category:higher-order"/> |
---|
31 | </libraryinfo> |
---|
32 | |
---|
33 | <title>Boost.Function</title> |
---|
34 | |
---|
35 | <section id="function.intro"> |
---|
36 | <title>Introduction</title> |
---|
37 | <para>The Boost.Function library contains a family of class templates |
---|
38 | that are function object wrappers. The notion is similar to a |
---|
39 | generalized callback. It shares features with function pointers in |
---|
40 | that both define a call interface (e.g., a function taking two integer |
---|
41 | arguments and returning a floating-point value) through which some |
---|
42 | implementation can be called, and the implementation that is invoked |
---|
43 | may change throughout the course of the program.</para> |
---|
44 | |
---|
45 | <para> Generally, any place in which a function pointer would be used |
---|
46 | to defer a call or make a callback, Boost.Function can be used instead |
---|
47 | to allow the user greater flexibility in the implementation of the |
---|
48 | target. Targets can be any 'compatible' function object (or function |
---|
49 | pointer), meaning that the arguments to the interface designated by |
---|
50 | Boost.Function can be converted to the arguments of the target |
---|
51 | function object.</para> |
---|
52 | </section> |
---|
53 | |
---|
54 | <xi:include href="history.xml"/> |
---|
55 | <xi:include href="tutorial.xml"/> |
---|
56 | <xi:include href="reference.xml"/> |
---|
57 | <xi:include href="faq.xml"/> |
---|
58 | <xi:include href="misc.xml"/> |
---|
59 | <xi:include href="tests.xml"/> |
---|
60 | |
---|
61 | </library> |
---|