libdb/docs/api_reference/STL/stldb_vectordb_vector.html

372 lines
13 KiB
HTML
Raw Normal View History

2011-09-13 17:44:24 +00:00
<?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="id3519608"></a>Parameters</h4>
</div>
</div>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3519638"></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="id3519610"></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="id3519447"></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="id3519643"></a>Parameters</h4>
</div>
</div>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3519646"></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="id3519615"></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="id3519162"></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="id3519542"></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="id3519704"></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="id3519727"></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="id3519744"></a>Parameters</h4>
</div>
</div>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3519747"></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="id3519798"></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="id3519804"></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="id3519879"></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="id3519763"></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="id3519752"></a>Parameters</h4>
</div>
</div>
</div>
<div class="sect4" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h5 class="title"><a id="id3519755"></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="id3519885"></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="id3519891"></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="id3519949"></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="id3519761"></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="id3519434"></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>