1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 5<title>Class template iset_index</title> 6<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css"> 7<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 8<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> 9<link rel="up" href="../../interprocess/indexes_reference.html#header.boost.interprocess.indexes.iset_index_hpp" title="Header <boost/interprocess/indexes/iset_index.hpp>"> 10<link rel="prev" href="flat_map_index.html" title="Class template flat_map_index"> 11<link rel="next" href="iunordered_set_index.html" title="Class template iunordered_set_index"> 12</head> 13<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 14<table cellpadding="2" width="100%"><tr> 15<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td> 16<td align="center"><a href="../../../../index.html">Home</a></td> 17<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td> 18<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 19<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 20<td align="center"><a href="../../../../more/index.htm">More</a></td> 21</tr></table> 22<hr> 23<div class="spirit-nav"> 24<a accesskey="p" href="flat_map_index.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../interprocess/indexes_reference.html#header.boost.interprocess.indexes.iset_index_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="iunordered_set_index.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 25</div> 26<div class="refentry"> 27<a name="boost.interprocess.iset_index"></a><div class="titlepage"></div> 28<div class="refnamediv"> 29<h2><span class="refentrytitle">Class template iset_index</span></h2> 30<p>boost::interprocess::iset_index</p> 31</div> 32<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> 33<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="../../interprocess/indexes_reference.html#header.boost.interprocess.indexes.iset_index_hpp" title="Header <boost/interprocess/indexes/iset_index.hpp>">boost/interprocess/indexes/iset_index.hpp</a>> 34 35</span><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> MapConfig<span class="special">></span> 36<span class="keyword">class</span> <a class="link" href="iset_index.html" title="Class template iset_index">iset_index</a> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">iset_index_aux</span><span class="special">::</span><span class="identifier">index_t</span><span class="special"><</span> <span class="identifier">MapConfig</span> <span class="special">></span> <span class="special">{</span> 37<span class="keyword">public</span><span class="special">:</span> 38 <span class="comment">// types</span> 39 <span class="keyword">typedef</span> <span class="identifier">index_type</span><span class="special">::</span><span class="identifier">iterator</span> <a name="boost.interprocess.iset_index.iterator"></a><span class="identifier">iterator</span><span class="special">;</span> 40 <span class="keyword">typedef</span> <span class="identifier">index_type</span><span class="special">::</span><span class="identifier">const_iterator</span> <a name="boost.interprocess.iset_index.const_iterator"></a><span class="identifier">const_iterator</span><span class="special">;</span> 41 <span class="keyword">typedef</span> <span class="identifier">index_type</span><span class="special">::</span><span class="identifier">insert_commit_data</span> <a name="boost.interprocess.iset_index.insert_commit_data"></a><span class="identifier">insert_commit_data</span><span class="special">;</span> 42 <span class="keyword">typedef</span> <span class="identifier">index_type</span><span class="special">::</span><span class="identifier">value_type</span> <a name="boost.interprocess.iset_index.value_type"></a><span class="identifier">value_type</span><span class="special">;</span> 43 44 <span class="comment">// <a class="link" href="iset_index.html#boost.interprocess.iset_indexconstruct-copy-destruct">construct/copy/destruct</a></span> 45 <a class="link" href="iset_index.html#idm45304011994768-bb"><span class="identifier">iset_index</span></a><span class="special">(</span><span class="keyword">typename</span> <span class="identifier">MapConfig</span><span class="special">::</span><span class="identifier">segment_manager_base</span> <span class="special">*</span><span class="special">)</span><span class="special">;</span> 46 47 <span class="comment">// <a class="link" href="iset_index.html#idm45304012004320-bb">public member functions</a></span> 48 <span class="keyword">void</span> <a class="link" href="iset_index.html#idm45304012003760-bb"><span class="identifier">reserve</span></a><span class="special">(</span><span class="keyword">typename</span> <span class="identifier">MapConfig</span><span class="special">::</span><span class="identifier">segment_manager_base</span><span class="special">::</span><span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span> 49 <span class="keyword">void</span> <a class="link" href="iset_index.html#idm45304012001712-bb"><span class="identifier">shrink_to_fit</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span> 50 <span class="identifier">iterator</span> <a class="link" href="iset_index.html#idm45304012000560-bb"><span class="identifier">find</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">intrusive_compare_key_type</span> <span class="special">&</span><span class="special">)</span><span class="special">;</span> 51 <span class="identifier">const_iterator</span> <a class="link" href="iset_index.html#idm45304011999008-bb"><span class="identifier">find</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">intrusive_compare_key_type</span> <span class="special">&</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span> 52 <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">bool</span> <span class="special">></span> 53 <a class="link" href="iset_index.html#idm45304011997184-bb"><span class="identifier">insert_check</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">intrusive_compare_key_type</span> <span class="special">&</span><span class="special">,</span> <span class="identifier">insert_commit_data</span> <span class="special">&</span><span class="special">)</span><span class="special">;</span> 54<span class="special">}</span><span class="special">;</span></pre></div> 55<div class="refsect1"> 56<a name="id-1.3.19.17.3.28.4.4"></a><h2>Description</h2> 57<p>Index type based in boost::intrusive::set. Just derives from boost::intrusive::set and defines the interface needed by managed memory segments </p> 58<div class="refsect2"> 59<a name="id-1.3.19.17.3.28.4.4.3"></a><h3> 60<a name="boost.interprocess.iset_indexconstruct-copy-destruct"></a><code class="computeroutput">iset_index</code> 61 public 62 construct/copy/destruct</h3> 63<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"> 64<pre class="literallayout"><a name="idm45304011994768-bb"></a><span class="identifier">iset_index</span><span class="special">(</span><span class="keyword">typename</span> <span class="identifier">MapConfig</span><span class="special">::</span><span class="identifier">segment_manager_base</span> <span class="special">*</span><span class="special">)</span><span class="special">;</span></pre> 65<p>Constructor. Takes a pointer to the segment manager. Can throw </p> 66</li></ol></div> 67</div> 68<div class="refsect2"> 69<a name="id-1.3.19.17.3.28.4.4.4"></a><h3> 70<a name="idm45304012004320-bb"></a><code class="computeroutput">iset_index</code> public member functions</h3> 71<div class="orderedlist"><ol class="orderedlist" type="1"> 72<li class="listitem"> 73<pre class="literallayout"><span class="keyword">void</span> <a name="idm45304012003760-bb"></a><span class="identifier">reserve</span><span class="special">(</span><span class="keyword">typename</span> <span class="identifier">MapConfig</span><span class="special">::</span><span class="identifier">segment_manager_base</span><span class="special">::</span><span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span></pre> 74<p>This reserves memory to optimize the insertion of n elements in the index </p> 75</li> 76<li class="listitem"> 77<pre class="literallayout"><span class="keyword">void</span> <a name="idm45304012001712-bb"></a><span class="identifier">shrink_to_fit</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>This frees all unnecessary memory. </li> 78<li class="listitem"><pre class="literallayout"><span class="identifier">iterator</span> <a name="idm45304012000560-bb"></a><span class="identifier">find</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">intrusive_compare_key_type</span> <span class="special">&</span> key<span class="special">)</span><span class="special">;</span></pre></li> 79<li class="listitem"><pre class="literallayout"><span class="identifier">const_iterator</span> <a name="idm45304011999008-bb"></a><span class="identifier">find</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">intrusive_compare_key_type</span> <span class="special">&</span> key<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li> 80<li class="listitem"><pre class="literallayout"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special"><</span> <span class="identifier">iterator</span><span class="special">,</span> <span class="keyword">bool</span> <span class="special">></span> 81<a name="idm45304011997184-bb"></a><span class="identifier">insert_check</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">intrusive_compare_key_type</span> <span class="special">&</span> key<span class="special">,</span> 82 <span class="identifier">insert_commit_data</span> <span class="special">&</span> commit_data<span class="special">)</span><span class="special">;</span></pre></li> 83</ol></div> 84</div> 85</div> 86</div> 87<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 88<td align="left"></td> 89<td align="right"><div class="copyright-footer">Copyright © 2005-2015 Ion Gaztanaga<p> 90 Distributed under the Boost Software License, Version 1.0. (See accompanying 91 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>) 92 </p> 93</div></td> 94</tr></table> 95<hr> 96<div class="spirit-nav"> 97<a accesskey="p" href="flat_map_index.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../interprocess/indexes_reference.html#header.boost.interprocess.indexes.iset_index_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="iunordered_set_index.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 98</div> 99</body> 100</html> 101