Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/doc/html/boost/function_base.html @ 47

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

updated boost from 1_33_1 to 1_34_1

File size: 7.9 KB
Line 
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.68.1">
7<link rel="start" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
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 C++ Libraries" 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="boost.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#id654537-bb">capacity</a></em></span>
39  <span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="function_base.html#id825926-bb">empty</a>() <span class="bold"><strong>const</strong></span>;
40
41  <span class="emphasis"><em>// <a href="function_base.html#id655542-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#id821633-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#id730744-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#id826865-bb">contains</a>(<span class="bold"><strong>const</strong></span> Functor&amp;) <span class="bold"><strong>const</strong></span>;
45  <span class="type"><span class="bold"><strong>const</strong></span> std::type_info&amp;</span> <a href="function_base.html#id660076-bb">target_type</a>() <span class="bold"><strong>const</strong></span>;
46};</pre></div>
47<div class="refsect1" lang="en">
48<a name="id1207126"></a><h2>Description</h2>
49<div class="refsect2" lang="en">
50<a name="id1207129"></a><h3>
51<a name="id654537-bb"></a><code class="computeroutput">function_base</code> capacity</h3>
52<div class="orderedlist"><ol type="1"><li>
53<pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id825926-bb"></a>empty() <span class="bold"><strong>const</strong></span>;</pre>
54<div class="variablelist"><table border="0">
55<col align="left" valign="top">
56<tbody>
57<tr>
58<td>
59<span class="term">Returns:</span></td>
60<td>
61<code class="computeroutput">false</code> if <code class="computeroutput">this</code> has a target, and <code class="computeroutput">true</code> otherwise.</td>
62</tr>
63<tr>
64<td>
65<span class="term">Throws:</span></td>
66<td>Will not throw.</td>
67</tr>
68</tbody>
69</table></div>
70</li></ol></div>
71</div>
72<div class="refsect2" lang="en">
73<a name="id1207209"></a><h3>
74<a name="id655542-bb"></a><code class="computeroutput">function_base</code> target access</h3>
75<div class="orderedlist"><ol type="1">
76<li>
77<p><a name="id931565-bb"></a></p>
78<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="id821633-bb"></a>target();
79<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="id730744-bb"></a>target() <span class="bold"><strong>const</strong></span>;</pre>
80<div class="variablelist"><table border="0">
81<col align="left" valign="top">
82<tbody>
83<tr>
84<td>
85<span class="term">Returns:</span></td>
86<td>If <code class="computeroutput">this</code> stores a target of type
87        <code class="computeroutput">Functor</code>, returns the address of the
88        target. Otherwise, returns the NULL
89        pointer.</td>
90</tr>
91<tr>
92<td>
93<span class="term">Throws:</span></td>
94<td>Will not throw.</td>
95</tr>
96</tbody>
97</table></div>
98</li>
99<li>
100<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="id826865-bb"></a>contains(<span class="bold"><strong>const</strong></span> Functor&amp; f) <span class="bold"><strong>const</strong></span>;</pre>
101<div class="variablelist"><table border="0">
102<col align="left" valign="top">
103<tbody><tr>
104<td>
105<span class="term">Returns:</span></td>
106<td>
107<code class="computeroutput">true</code> if <code class="computeroutput">this-&gt;<a href="function_base.html#id931565-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>
108</td>
109</tr></tbody>
110</table></div>
111</li>
112<li>
113<pre class="literallayout"><span class="type"><span class="bold"><strong>const</strong></span> std::type_info&amp;</span> <a name="id660076-bb"></a>target_type() <span class="bold"><strong>const</strong></span>;</pre>
114<div class="variablelist"><table border="0">
115<col align="left" valign="top">
116<tbody>
117<tr>
118<td>
119<span class="term">Returns:</span></td>
120<td>
121<code class="computeroutput">typeid</code> of the target function object, or <code class="computeroutput">typeid(void)</code> if <code class="computeroutput">this-&gt;<a href="function_base.html#id825926-bb">empty</a>()</code>.</td>
122</tr>
123<tr>
124<td>
125<span class="term">Throws:</span></td>
126<td>Will not throw.</td>
127</tr>
128</tbody>
129</table></div>
130</li>
131</ol></div>
132</div>
133</div>
134</div>
135<table width="100%"><tr>
136<td align="left"></td>
137<td align="right"><small>Copyright © 2001-2004 Douglas Gregor</small></td>
138</tr></table>
139<hr>
140<div class="spirit-nav">
141<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>
142</div>
143</body>
144</html>
Note: See TracBrowser for help on using the repository browser.