Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/doc/html/function_base.html @ 12

Last change on this file since 12 was 12, checked in by landauf, 17 years ago

added boost

File size: 6.9 KB
RevLine 
[12]1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4<title>Class function_base</title>
5<link rel="stylesheet" href="boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
7<link rel="start" href="index.html" title="The Boost C++ Libraries">
8<link rel="up" href="function/reference.html#header.boost.function.hpp" title="Header &lt;boost/function.hpp&gt;">
9<link rel="prev" href="bad_function_call.html" title="Class bad_function_call">
10<link rel="next" href="functionN.html" title="Class template functionN">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%">
14<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
15<td align="center"><a href="../../index.htm">Home</a></td>
16<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="../../people/people.htm">People</a></td>
18<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
19<td align="center"><a href="../../more/index.htm">More</a></td>
20</table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="bad_function_call.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="function/reference.html#header.boost.function.hpp"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="functionN.html"><img src="images/next.png" alt="Next"></a>
24</div>
25<div class="refentry" lang="en">
26<a name="function_base"></a><div class="titlepage"></div>
27<div class="refnamediv">
28<h2><span class="refentrytitle">Class function_base</span></h2>
29<p>boost::function_base &#8212; The common base class for all Boost.Function
30    objects. Objects of type function_base may not be created
31    directly.</p>
32</div>
33<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
34<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis">
35<span class="bold"><strong>class</strong></span> function_base {
36<span class="bold"><strong>public</strong></span>:
37
38  <span class="emphasis"><em>// <a href="function_base.html#id2358190-bb">capacity</a></em></span>
39  <span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="function_base.html#id2377133-bb">empty</a>() <span class="bold"><strong>const</strong></span>;
40
41  <span class="emphasis"><em>// <a href="function_base.html#id2346528-bb">target access</a></em></span>
42  <span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> Functor&gt; <span class="type">Functor*</span> <a href="function_base.html#id2347921-bb">target</a>();
43  <span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> Functor&gt; <span class="type"><span class="bold"><strong>const</strong></span> Functor*</span> <a href="function_base.html#id2410578-bb">target</a>() <span class="bold"><strong>const</strong></span>;
44  <span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> Functor&gt; <span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="function_base.html#id2340460-bb">contains</a>(<span class="bold"><strong>const</strong></span> Functor&amp;) <span class="bold"><strong>const</strong></span>;
45};</pre></div>
46<div class="refsect1" lang="en">
47<a name="id2691210"></a><h2>Description</h2>
48<div class="refsect2" lang="en">
49<a name="id2691213"></a><h3>
50<a name="id2358190-bb"></a><code class="computeroutput">function_base</code> capacity</h3>
51<div class="orderedlist"><ol type="1"><li>
52<pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id2377133-bb"></a>empty() <span class="bold"><strong>const</strong></span>;</pre>
53<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Returns</span></b>:
54
55    <code class="computeroutput">false</code> if <code class="computeroutput">this</code> has a target, and <code class="computeroutput">true</code> otherwise.<br><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Throws</span></b>:
56
57    Will not throw.</p>
58</li></ol></div>
59</div>
60<div class="refsect2" lang="en">
61<a name="id2691292"></a><h3>
62<a name="id2346528-bb"></a><code class="computeroutput">function_base</code> target access</h3>
63<div class="orderedlist"><ol type="1">
64<li>
65<p><a name="id2346532-bb"></a></p>
66<pre class="literallayout"><span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> Functor&gt; <span class="type">Functor*</span> <a name="id2347921-bb"></a>target();
67<span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> Functor&gt; <span class="type"><span class="bold"><strong>const</strong></span> Functor*</span> <a name="id2410578-bb"></a>target() <span class="bold"><strong>const</strong></span>;</pre>
68<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Returns</span></b>:
69
70    If <code class="computeroutput">this</code> stores a target of type
71        <code class="computeroutput">Functor</code>, returns the address of the
72        target. Otherwise, returns the NULL
73        pointer.<br><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Throws</span></b>:
74
75    Will not throw.</p>
76</li>
77<li>
78<pre class="literallayout"><span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> Functor&gt; <span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id2340460-bb"></a>contains(<span class="bold"><strong>const</strong></span> Functor&amp; f) <span class="bold"><strong>const</strong></span>;</pre>
79<p><b xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"><span class="term">Returns</span></b>:
80
81    <code class="computeroutput">true</code> if <code class="computeroutput">this-&gt;<a href="function_base.html#id2346532-bb">target</a>&lt;Functor&gt;()</code> is non-NULL and <code class="computeroutput"><a href="function_equal.html" title="Function template function_equal">function_equal</a>(*(this-&gt;target&lt;Functor&gt;()), f)</code></p>
82</li>
83</ol></div>
84</div>
85</div>
86</div>
87<table width="100%"><tr>
88<td align="left"></td>
89<td align="right"><small>Copyright © 2001-2004 Douglas Gregor</small></td>
90</tr></table>
91<hr>
92<div class="spirit-nav">
93<a accesskey="p" href="bad_function_call.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="function/reference.html#header.boost.function.hpp"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="functionN.html"><img src="images/next.png" alt="Next"></a>
94</div>
95</body>
96</html>
Note: See TracBrowser for help on using the repository browser.