| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> |
| <title>Class template any_member_hook</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="../../intrusive/reference.html#header.boost.intrusive.any_hook_hpp" title="Header <boost/intrusive/any_hook.hpp>"> |
| <link rel="prev" href="make_any_member_hook.html" title="Struct template make_any_member_hook"> |
| <link rel="next" href="any_to_slist_hook.html" title="Struct template any_to_slist_hook"> |
| </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="make_any_member_hook.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../intrusive/reference.html#header.boost.intrusive.any_hook_hpp"><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="any_to_slist_hook.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> |
| </div> |
| <div class="refentry"> |
| <a name="boost.intrusive.any_member_hook"></a><div class="titlepage"></div> |
| <div class="refnamediv"> |
| <h2><span class="refentrytitle">Class template any_member_hook</span></h2> |
| <p>boost::intrusive::any_member_hook</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="comment">// In header: <<a class="link" href="../../intrusive/reference.html#header.boost.intrusive.any_hook_hpp" title="Header <boost/intrusive/any_hook.hpp>">boost/intrusive/any_hook.hpp</a>> |
| |
| </span><span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span><span class="special">...</span> Options<span class="special">></span> |
| <span class="keyword">class</span> <a class="link" href="any_member_hook.html" title="Class template any_member_hook">any_member_hook</a> <span class="special">{</span> |
| <span class="keyword">public</span><span class="special">:</span> |
| <span class="comment">// <a class="link" href="any_member_hook.html#boost.intrusive.any_member_hookconstruct-copy-destruct">construct/copy/destruct</a></span> |
| <a class="link" href="any_member_hook.html#id472943-bb"><span class="identifier">any_member_hook</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span> |
| <a class="link" href="any_member_hook.html#id471054-bb"><span class="identifier">any_member_hook</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="any_member_hook.html" title="Class template any_member_hook">any_member_hook</a> <span class="special">&</span><span class="special">)</span><span class="special">;</span> |
| any_member_hook& <a class="link" href="any_member_hook.html#id358350-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="any_member_hook.html" title="Class template any_member_hook">any_member_hook</a> <span class="special">&</span><span class="special">)</span><span class="special">;</span> |
| <a class="link" href="any_member_hook.html#id402708-bb"><span class="special">~</span><span class="identifier">any_member_hook</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span> |
| |
| <span class="comment">// <a class="link" href="any_member_hook.html#id360696-bb">public member functions</a></span> |
| <span class="keyword">bool</span> <a class="link" href="any_member_hook.html#id360699-bb"><span class="identifier">is_linked</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span> |
| <span class="special">}</span><span class="special">;</span></pre></div> |
| <div class="refsect1"> |
| <a name="id1658277"></a><h2>Description</h2> |
| <p>Store this hook in a class to be inserted in an intrusive container.</p> |
| <p>The hook admits the following options: <code class="computeroutput">void_pointer<></code> and <code class="computeroutput">link_mode<></code>.</p> |
| <p><code class="computeroutput">link_mode<></code> will specify the linking mode of the hook (<code class="computeroutput">normal_link</code> or <code class="computeroutput">safe_link</code>).</p> |
| <p><code class="computeroutput">void_pointer<></code> is the pointer type that will be used internally in the hook and the the container configured to use this hook. </p> |
| <div class="refsect2"> |
| <a name="id1658328"></a><h3> |
| <a name="boost.intrusive.any_member_hookconstruct-copy-destruct"></a><code class="computeroutput">any_member_hook</code> |
| public |
| construct/copy/destruct</h3> |
| <div class="orderedlist"><ol class="orderedlist" type="1"> |
| <li class="listitem"> |
| <pre class="literallayout"><a name="id472943-bb"></a><span class="identifier">any_member_hook</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre> |
| <p><span class="bold"><strong>Effects</strong></span>: If link_mode is or <code class="computeroutput">safe_link</code> initializes the node to an unlinked state.</p> |
| <p><span class="bold"><strong>Throws</strong></span>: Nothing. </p> |
| </li> |
| <li class="listitem"> |
| <pre class="literallayout"><a name="id471054-bb"></a><span class="identifier">any_member_hook</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="any_member_hook.html" title="Class template any_member_hook">any_member_hook</a> <span class="special">&</span><span class="special">)</span><span class="special">;</span></pre> |
| <p><span class="bold"><strong>Effects</strong></span>: If link_mode is or <code class="computeroutput">safe_link</code> initializes the node to an unlinked state. The argument is ignored.</p> |
| <p><span class="bold"><strong>Throws</strong></span>: Nothing.</p> |
| <p><span class="bold"><strong>Rationale</strong></span>: Providing a copy-constructor makes classes using the hook STL-compliant without forcing the user to do some additional work. <code class="computeroutput">swap</code> can be used to emulate move-semantics. </p> |
| </li> |
| <li class="listitem"> |
| <pre class="literallayout">any_member_hook& <a name="id358350-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="any_member_hook.html" title="Class template any_member_hook">any_member_hook</a> <span class="special">&</span><span class="special">)</span><span class="special">;</span></pre> |
| <p><span class="bold"><strong>Effects</strong></span>: Empty function. The argument is ignored.</p> |
| <p><span class="bold"><strong>Throws</strong></span>: Nothing.</p> |
| <p><span class="bold"><strong>Rationale</strong></span>: Providing an assignment operator makes classes using the hook STL-compliant without forcing the user to do some additional work. <code class="computeroutput">swap</code> can be used to emulate move-semantics. </p> |
| </li> |
| <li class="listitem"> |
| <pre class="literallayout"><a name="id402708-bb"></a><span class="special">~</span><span class="identifier">any_member_hook</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre> |
| <p><span class="bold"><strong>Effects</strong></span>: If link_mode is <code class="computeroutput">normal_link</code>, the destructor does nothing (ie. no code is generated). If link_mode is <code class="computeroutput">safe_link</code> and the object is stored in a container an assertion is raised.</p> |
| <p><span class="bold"><strong>Throws</strong></span>: Nothing. </p> |
| </li> |
| </ol></div> |
| </div> |
| <div class="refsect2"> |
| <a name="id1658624"></a><h3> |
| <a name="id360696-bb"></a><code class="computeroutput">any_member_hook</code> public member functions</h3> |
| <div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"> |
| <pre class="literallayout"><span class="keyword">bool</span> <a name="id360699-bb"></a><span class="identifier">is_linked</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre> |
| <p><span class="bold"><strong>Precondition</strong></span>: link_mode must be <code class="computeroutput">safe_link</code>.</p> |
| <p><span class="bold"><strong>Returns</strong></span>: true, if the node belongs to a container, false otherwise. This function can be used to test whether <code class="computeroutput">container::iterator_to</code> will return a valid iterator.</p> |
| <p><span class="bold"><strong>Complexity</strong></span>: Constant </p> |
| </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 © 2005 Olaf Krzikalla, 2006-2010 Ion Gaztanaga<p> |
| Distributed under the Boost Software License, Version 1.0. (See accompanying |
| file LICENSE_1_0.txt 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="make_any_member_hook.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../intrusive/reference.html#header.boost.intrusive.any_hook_hpp"><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="any_to_slist_hook.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> |
| </div> |
| </body> |
| </html> |