libdb/docs/api_reference/STL/stldb_vectordb_vector.html
2011-12-19 19:07:10 -05:00

371 lines
13 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>db_vector</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="db_vector.html" title="Chapter 4.  Db_vector" />
<link rel="prev" href="stldb_vectorempty.html" title="empty" />
<link rel="next" href="stldb_vectordstr_db_vector.html" title="~db_vector" />
</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">db_vector</th>
</tr>
<tr>
<td width="20%" align="left"><a accesskey="p" href="stldb_vectorempty.html">Prev</a> </td>
<th width="60%" align="center">Chapter 4. 
Db_vector </th>
<td width="20%" align="right"> <a accesskey="n" href="stldb_vectordstr_db_vector.html">Next</a></td>
</tr>
</table>
<hr />
</div>
<div class="sect1" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a id="stldb_vectordb_vector"></a>db_vector</h2>
</div>
</div>
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="stldb_vectordb_vector_details"></a>Function Details</h3>
</div>
</div>
</div>
<pre class="programlisting">
db_vector(Db *dbp=NULL,
DbEnv *penv=NULL)
</pre>
<p>Constructor. </p>
<p>Note that we do not need an allocator in db-stl containser, but we need backing up Db* and DbEnv*, and we have to verify that the passed in bdb handles are valid for use by the container class. See class detail for handle requirement. </p>
<div class="sect3" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a id="id3599736"></a>Parameters</h4>
</div>
</div>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3599765"></a>dbp</h5>
</div>
</div>
</div>
<p>The same as that of <a class="link" href="stldb_containerdb_container.html" title="db_container">db_container(Db*, DbEnv*)</a>
; </p>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3599737"></a>penv</h5>
</div>
</div>
</div>
<p>The same as that of <a class="link" href="stldb_containerdb_container.html" title="db_container">db_container(Db*, DbEnv*)</a>
; </p>
</div>
</div>
<div class="sect3" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a id="id3599575"></a>See Also</h4>
</div>
</div>
</div>
<p>
</p>
<p><a class="link" href="stldb_containerdb_container.html" title="db_container">db_container(Db*, DbEnv*)</a>
; </p>
<p>
</p>
</div>
<pre class="programlisting">
db_vector(size_type n, const T &amp;val=T(), Db *dbp=NULL,
DbEnv *penv=NULL)
</pre>
<p>Constructor. </p>
<p>This function supports auto-commit. Insert n elements of T type into the database, the value of the elements is the default value or user set value. See class detail for handle requirement. </p>
<div class="sect3" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a id="id3599770"></a>Parameters</h4>
</div>
</div>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3599773"></a>dbp</h5>
</div>
</div>
</div>
<p>The same as that of <a class="link" href="stldb_containerdb_container.html" title="db_container">db_container(Db*, DbEnv*)</a>
; </p>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3599742"></a>penv</h5>
</div>
</div>
</div>
<p>The same as that of <a class="link" href="stldb_containerdb_container.html" title="db_container">db_container(Db*, DbEnv*)</a>
; </p>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3599509"></a>val</h5>
</div>
</div>
</div>
<p>The value of elements to insert. </p>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3599670"></a>n</h5>
</div>
</div>
</div>
<p>The number of elements to insert. </p>
</div>
</div>
<div class="sect3" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a id="id3599832"></a>See Also</h4>
</div>
</div>
</div>
<p>
</p>
<p><a class="link" href="stldb_vectordb_vector.html" title="db_vector">db_vector(Db*, DbEnv*)</a>
; <a class="link" href="stldb_containerdb_container.html" title="db_container">db_container(Db*, DbEnv*)</a>
; </p>
<p>
</p>
</div>
<pre class="programlisting">
db_vector(const self &amp;x)
</pre>
<p>Copy constructor. </p>
<p>This function supports auto-commit. Insert all elements in x into this container. </p>
<div class="sect3" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a id="id3599855"></a>See Also</h4>
</div>
</div>
</div>
<p>
</p>
<p><a class="link" href="stldb_containerdb_container.html" title="db_container">db_container(const db_container&amp;)</a>
</p>
<p>
</p>
</div>
<pre class="programlisting">
db_vector(Db *dbp, DbEnv *penv, InputIterator first,
InputIterator last)
</pre>
<p>Insert a range of elements into this container. </p>
<p>The range is [first, last), which contains elements that can be converted to type T automatically. See class detail for handle requirement. </p>
<div class="sect3" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a id="id3599872"></a>Parameters</h4>
</div>
</div>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3599875"></a>dbp</h5>
</div>
</div>
</div>
<p>The same as that of <a class="link" href="stldb_containerdb_container.html" title="db_container">db_container(Db*, DbEnv*)</a>
; </p>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3599926"></a>first</h5>
</div>
</div>
</div>
<p>Range closed boundary. </p>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3599932"></a>last</h5>
</div>
</div>
</div>
<p>Range open boundary. </p>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3600007"></a>penv</h5>
</div>
</div>
</div>
<p>The same as that of <a class="link" href="stldb_containerdb_container.html" title="db_container">db_container(Db*, DbEnv*)</a>
; </p>
</div>
</div>
<div class="sect3" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a id="id3599891"></a>See Also</h4>
</div>
</div>
</div>
<p>
</p>
<p><a class="link" href="stldb_vectordb_vector.html" title="db_vector">db_vector(Db*, DbEnv*)</a>
; </p>
<p>
</p>
</div>
<pre class="programlisting">
db_vector(const_iterator first, const_iterator last, Db *dbp=NULL,
DbEnv *penv=NULL)
</pre>
<p>Range constructor. </p>
<p>This function supports auto-commit. Insert the range of elements in [first, last) into this container. See class detail for handle requirement. </p>
<div class="sect3" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a id="id3599880"></a>Parameters</h4>
</div>
</div>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3599883"></a>dbp</h5>
</div>
</div>
</div>
<p>The same as that of <a class="link" href="stldb_containerdb_container.html" title="db_container">db_container(Db*, DbEnv*)</a>
; </p>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3600013"></a>first</h5>
</div>
</div>
</div>
<p>Range closed boundary. </p>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3600019"></a>last</h5>
</div>
</div>
</div>
<p>Range open boundary. </p>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3600077"></a>penv</h5>
</div>
</div>
</div>
<p>The same as that of <a class="link" href="stldb_containerdb_container.html" title="db_container">db_container(Db*, DbEnv*)</a>
; </p>
</div>
</div>
<div class="sect3" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a id="id3599889"></a>See Also</h4>
</div>
</div>
</div>
<p>
</p>
<p><a class="link" href="stldb_vectordb_vector.html" title="db_vector">db_vector(Db*, DbEnv*)</a>
; </p>
<p>
</p>
</div>
</div>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a id="id3599359"></a>Class</h3>
</div>
</div>
</div>
<p>
<a class="link" href="db_vector.html" title="Chapter 4.  Db_vector">db_vector</a>
</p>
</div>
</div>
<div class="navfooter">
<hr />
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left"><a accesskey="p" href="stldb_vectorempty.html">Prev</a> </td>
<td width="20%" align="center">
<a accesskey="u" href="db_vector.html">Up</a>
</td>
<td width="40%" align="right"> <a accesskey="n" href="stldb_vectordstr_db_vector.html">Next</a></td>
</tr>
<tr>
<td width="40%" align="left" valign="top">empty </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
<td width="40%" align="right" valign="top"> ~db_vector</td>
</tr>
</table>
</div>
</body>
</html>