Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > by-pkgid > fa7fad8f194f80107561a85291acd153 > files > 833

lib64boost-devel-doc-1.42.0-3mdv2010.1.x86_64.rpm

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Class function_base</title>
<link rel="stylesheet" href="../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="../function/reference.html#header.boost.function_hpp" title="Header &lt;boost/function.hpp&gt;">
<link rel="prev" href="bad_function_call.html" title="Class bad_function_call">
<link rel="next" href="functionN.html" title="Class template functionN">
</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="bad_function_call.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../function/reference.html#header.boost.function_hpp"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="functionN.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="refentry" title="Class function_base">
<a name="boost.function_base"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class function_base</span></h2>
<p>boost::function_base &#8212; The common base class for all Boost.Function
    objects. Objects of type function_base may not be created
    directly.</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="emphasis"><em>// In header: &lt;<a class="link" href="../function/reference.html#header.boost.function_hpp" title="Header &lt;boost/function.hpp&gt;">boost/function.hpp</a>&gt;

</em></span>
<span class="bold"><strong>class</strong></span> <a class="link" href="function_base.html" title="Class function_base">function_base</a> {
<span class="bold"><strong>public</strong></span>:

  <span class="emphasis"><em>// <a class="link" href="function_base.html#id315976-bb">capacity</a></em></span>
  <span class="type"><span class="bold"><strong>bool</strong></span></span> <a class="link" href="function_base.html#id339378-bb">empty</a>() <span class="bold"><strong>const</strong></span>;

  <span class="emphasis"><em>// <a class="link" href="function_base.html#id333472-bb">target access</a></em></span>
  <span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> Functor&gt; <span class="type">Functor*</span> <a class="link" href="function_base.html#id405990-bb">target</a>();
  <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 class="link" href="function_base.html#id450751-bb">target</a>() <span class="bold"><strong>const</strong></span>;
  <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 class="link" href="function_base.html#id605211-bb">contains</a>(<span class="bold"><strong>const</strong></span> Functor&amp;) <span class="bold"><strong>const</strong></span>;
  <span class="type"><span class="bold"><strong>const</strong></span> std::type_info&amp;</span> <a class="link" href="function_base.html#id605088-bb">target_type</a>() <span class="bold"><strong>const</strong></span>;
};</pre></div>
<div class="refsect1" title="Description">
<a name="id868873"></a><h2>Description</h2>
<div class="refsect2" title="function_base capacity">
<a name="id868877"></a><h3>
<a name="id315976-bb"></a><code class="computeroutput">function_base</code> capacity</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id339378-bb"></a>empty() <span class="bold"><strong>const</strong></span>;</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td>
<code class="computeroutput">false</code> if <code class="computeroutput">this</code> has a target, and <code class="computeroutput">true</code> otherwise.</td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>Will not throw.</td>
</tr>
</tbody>
</table></div>
</li></ol></div>
</div>
<div class="refsect2" title="function_base target access">
<a name="id868957"></a><h3>
<a name="id333472-bb"></a><code class="computeroutput">function_base</code> target access</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="id394033-bb"></a><span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> Functor&gt; <span class="type">Functor*</span> <a name="id405990-bb"></a>target();
<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="id450751-bb"></a>target() <span class="bold"><strong>const</strong></span>;</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td>If <code class="computeroutput">this</code> stores a target of type
        <code class="computeroutput">Functor</code>, returns the address of the
        target. Otherwise, returns the NULL
        pointer.</td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>Will not throw.</td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<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="id605211-bb"></a>contains(<span class="bold"><strong>const</strong></span> Functor&amp; f) <span class="bold"><strong>const</strong></span>;</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td>
<code class="computeroutput">true</code> if <code class="computeroutput">this-&gt;<a class="link" href="function_base.html#id394033-bb">target</a>&lt;Functor&gt;()</code> is non-NULL and <code class="computeroutput"><a class="link" href="function_equal.html" title="Function template function_equal">function_equal</a>(*(this-&gt;target&lt;Functor&gt;()), f)</code>
</td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="type"><span class="bold"><strong>const</strong></span> std::type_info&amp;</span> <a name="id605088-bb"></a>target_type() <span class="bold"><strong>const</strong></span>;</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td>
<code class="computeroutput">typeid</code> of the target function object, or <code class="computeroutput">typeid(void)</code> if <code class="computeroutput">this-&gt;<a class="link" href="function_base.html#id339378-bb">empty</a>()</code>.</td>
</tr>
<tr>
<td><p><span class="term">Throws:</span></p></td>
<td>Will not throw.</td>
</tr>
</tbody>
</table></div>
</li>
</ol></div>
</div>
</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; 2001-2004 Douglas Gregor<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></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="bad_function_call.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../function/reference.html#header.boost.function_hpp"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="functionN.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>