libdb/docs/api_reference/STL/db_multiset.html
2011-09-13 13:44:24 -04:00

374 lines
14 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Chapter 8.  Db_multiset</title>
<link rel="stylesheet" href="apiReference.css" type="text/css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
<link rel="start" href="index.html" title="Berkeley DB C++ Standard Template Library API Reference" />
<link rel="up" href="index.html" title="Berkeley DB C++ Standard Template Library API Reference" />
<link rel="prev" href="stldb_setoperator_ueq.html" title="operator!=" />
<link rel="next" href="stldb_multisetdstr_db_multiset.html" title="~db_multiset" />
</head>
<body>
<div xmlns="" class="navheader">
<div class="libver">
<p>Library Version 11.2.5.2</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
<th colspan="3" align="center">Chapter 8. 
Db_multiset </th>
</tr>
<tr>
<td width="20%" align="left"><a accesskey="p" href="stldb_setoperator_ueq.html">Prev</a> </td>
<th width="60%" align="center"> </th>
<td width="20%" align="right"> <a accesskey="n" href="stldb_multisetdstr_db_multiset.html">Next</a></td>
</tr>
</table>
<hr />
</div>
<div class="chapter" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title"><a id="db_multiset"></a>Chapter 8. 
Db_multiset </h2>
</div>
</div>
</div>
<p>This class is the combination of std::multiset and hash_multiset. </p>
<p>By setting database handles of DB_BTREE or DB_HASH type respectively, you will be using the equivalent of std::multiset or hash_multiset respectively. This container stores the key in the key element of a key/data pair in the underlying database, but doesn't store anything in the data element. Database and environment handle requirement: The requirement to these handles is the same as that to <a class="link" href="db_multimap.html" title="Chapter 6.  Db_multimap">db_multimap</a>
. </p>
<h4><a id="id3526472"></a>
See Also
</h4>
<p> </p>
<p><a class="link" href="db_multimap.html" title="Chapter 6.  Db_multimap">db_multimap</a>
<a class="link" href="db_map.html" title="Chapter 5.  Db_map">db_map</a>
<a class="link" href="db_container.html" title="Chapter 3.  Db_container">db_container</a>
<a class="link" href="db_set.html" title="Chapter 7.  Db_set">db_set</a>
</p>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="id3526583"></a>
Class Template Parameters</h3>
</div>
</div>
</div>
<div class="sect3" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a id="id3526250"></a>
kdt</h4>
</div>
</div>
</div>
<p>The key data type. </p>
</div>
<div class="sect3" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a id="id3526700"></a>
value_type_sub</h4>
</div>
</div>
</div>
<p>If kdt is a class/struct type, do not specify anything in this parameter; Otherwise specify ElementHolder&lt;kdt&gt;. </p>
</div>
</div>
<h4><a id="id3526545"></a> Public Members </h4>
<div class="informaltable">
<table border="1" width="80%">
<colgroup>
<col />
<col />
</colgroup>
<thead>
<tr>
<th>Member</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a class="xref" href="db_multiset.html#stldb_multisetdb_multiset" title="db_multiset">db_multiset</a>
</td>
<td>
<p>Create a std::multiset/hash_multiset equivalent associative container. </p> </td>
</tr>
<tr>
<td>
<a class="xref" href="stldb_multisetdstr_db_multiset.html" title="~db_multiset">~db_multiset</a>
</td>
<td>
</td>
</tr>
<tr>
<td>
<a class="xref" href="stldb_multisetinsert.html" title="insert">insert</a>
</td>
<td>
<p>Insert a single key if the key is not in the container. </p> </td>
</tr>
<tr>
<td>
<a class="xref" href="stldb_multiseterase.html" title="erase">erase</a>
</td>
<td>
<p>Erase elements by key. </p> </td>
</tr>
<tr>
<td>
<a class="xref" href="stldb_multisetoperator_assign.html" title="operator=">operator=</a>
</td>
<td>
<p>Container content assignment operator. </p> </td>
</tr>
<tr>
<td>
<a class="xref" href="stldb_multisetswap.html" title="swap">swap</a>
</td>
<td>
<p>Swap content with another container. </p> </td>
</tr>
<tr>
<td>
<a class="xref" href="stldb_multisetoperator_eq.html" title="operator==">operator==</a>
</td>
<td>
<p>Container content equality compare operator. </p> </td>
</tr>
<tr>
<td>
<a class="xref" href="stldb_multisetoperator_ueq.html" title="operator!=">operator!=</a>
</td>
<td>
<p>Inequality comparison operator. </p> </td>
</tr>
</tbody>
</table>
</div>
<h4><a id="id3526829"></a>
Group</h4>
<p>
<a class="xref" href="dbstl_containers.html" title="Chapter 2.  Dbstl Container Classes">
Dbstl Container Classes </a>
</p>
<p>
</p>
<div class="sect1" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a id="stldb_multisetdb_multiset"></a>db_multiset</h2>
</div>
</div>
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="stldb_multisetdb_multiset_details"></a>Function Details</h3>
</div>
</div>
</div>
<pre class="programlisting">
db_multiset(Db *dbp=NULL,
DbEnv *envp=NULL)
</pre>
<p>Create a std::multiset/hash_multiset equivalent associative container. </p>
<p>See the handle requirement in class details to pass correct database/environment handles. </p>
<div class="sect3" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a id="id3526482"></a>Parameters</h4>
</div>
</div>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3526991"></a>dbp</h5>
</div>
</div>
</div>
<p>The database handle. </p>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3527022"></a>envp</h5>
</div>
</div>
</div>
<p>The database environment handle. </p>
</div>
</div>
<div class="sect3" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a id="id3526953"></a>See Also</h4>
</div>
</div>
</div>
<p>
</p>
<p><a class="link" href="stldb_multimapdb_multimap.html" title="db_multimap">db_multimap(Db*, DbEnv*)</a>
</p>
<p>
</p>
</div>
<pre class="programlisting">
db_multiset(Db *dbp, DbEnv *envp, InputIterator first,
InputIterator last)
</pre>
<p>Iteration constructor. </p>
<p>Iterates between first and last, copying each of the elements in the range into this container. Create a std::multi/hash_multiset equivalent associative container. Insert a range of elements into the database. The range is [first, last), which contains elements that can be converted to type ddt automatically. This function supports auto-commit. See the handle requirement in class details to pass correct database/environment handles. </p>
<div class="sect3" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a id="id3526640"></a>Parameters</h4>
</div>
</div>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3526644"></a>dbp</h5>
</div>
</div>
</div>
<p>The database handle. </p>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3527077"></a>envp</h5>
</div>
</div>
</div>
<p>The database environment handle. </p>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3527083"></a>last</h5>
</div>
</div>
</div>
<p>The open boundary of the range. </p>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3527088"></a>first</h5>
</div>
</div>
</div>
<p>The closed boundary of the range. </p>
</div>
</div>
<div class="sect3" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a id="id3526645"></a>See Also</h4>
</div>
</div>
</div>
<p>
</p>
<p><a class="link" href="stldb_multimapdb_multimap.html" title="db_multimap">db_multimap(Db*, DbEnv*, InputIterator, InputIterator)</a>
</p>
<p>
</p>
</div>
<pre class="programlisting">
db_multiset(const self &amp;x)
</pre>
<p>Copy constructor. </p>
<p>Create a database and insert all key/data pairs in x into this container. x's data members are not copied. This function supports auto-commit. </p>
<div class="sect3" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a id="id3526994"></a>Parameters</h4>
</div>
</div>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3526998"></a>x</h5>
</div>
</div>
</div>
<p>The source container to initialize this container. </p>
</div>
</div>
<div class="sect3" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a id="id3527012"></a>See Also</h4>
</div>
</div>
</div>
<p>
</p>
<p>db_multimap(const db_multimap&amp;) <a class="link" href="stldb_containerdb_container.html" title="db_container">db_container(const db_container&amp;)</a>
</p>
<p>
</p>
</div>
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="id3526691"></a>Class</h3>
</div>
</div>
</div>
<p>
<a class="link" href="db_multiset.html" title="Chapter 8.  Db_multiset">db_multiset</a>
</p>
</div>
</div>
</div>
<div class="navfooter">
<hr />
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left"><a accesskey="p" href="stldb_setoperator_ueq.html">Prev</a> </td>
<td width="20%" align="center"> </td>
<td width="40%" align="right"> <a accesskey="n" href="stldb_multisetdstr_db_multiset.html">Next</a></td>
</tr>
<tr>
<td width="40%" align="left" valign="top">operator!= </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
<td width="40%" align="right" valign="top"> ~db_multiset</td>
</tr>
</table>
</div>
</body>
</html>