Debian Codegraph @

docs/api_reference/STL/stldb_mapinsert.html

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <title>insert</title>
7 <link rel="stylesheet" href="apiReference.css" type="text/css" />
8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9 <link rel="start" href="index.html" title="Berkeley DB C++ Standard Template Library API Reference" />
10 <link rel="up" href="db_map.html" title="Chapter 5.  Db_map" />
11 <link rel="prev" href="stldb_mapdstr_db_map.html" title="~db_map" />
12 <link rel="next" href="stldb_mapbegin.html" title="begin" />
13 </head>
14 <body>
15 <div xmlns="" class="navheader">
16 <div class="libver">
17 <p>Library Version 11.2.5.3</p>
18 </div>
19 <table width="100%" summary="Navigation header">
20 <tr>
21 <th colspan="3" align="center">insert</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="stldb_mapdstr_db_map.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 5. 
26 Db_map </th>
27 <td width="20%" align="right"> <a accesskey="n" href="stldb_mapbegin.html">Next</a></td>
28 </tr>
29 </table>
30 <hr />
31 </div>
32 <div class="sect1" lang="en" xml:lang="en">
33 <div class="titlepage">
34 <div>
35 <div>
36 <h2 class="title" style="clear: both"><a id="stldb_mapinsert"></a>insert</h2>
37 </div>
38 </div>
39 </div>
40 <div class="sect2" lang="en" xml:lang="en">
41 <div class="titlepage">
42 <div>
43 <div>
44 <h3 class="title"><a id="stldb_mapinsert_details"></a>Function Details</h3>
45 </div>
46 </div>
47 </div>
48 <pre class="programlisting">
49 insert(const value_type &amp;x)
50 </pre>
51 <p>Insert a single key/data pair if the key is not in the container. </p>
52 <div class="sect3" lang="en" xml:lang="en">
53 <div class="titlepage">
54 <div>
55 <div>
56 <h4 class="title"><a id="idp50406912"></a>Parameters</h4>
57 </div>
58 </div>
59 </div>
60 <div class="sect4" lang="en" xml:lang="en">
61 <div class="titlepage">
62 <div>
63 <div>
64 <h5 class="title"><a id="idp50418360"></a>x</h5>
65 </div>
66 </div>
67 </div>
68 <p>The key/data pair to insert. </p>
69 </div>
70 </div>
71 <div class="sect3" lang="en" xml:lang="en">
72 <div class="titlepage">
73 <div>
74 <div>
75 <h4 class="title"><a id="idp50388056"></a>Return Value</h4>
76 </div>
77 </div>
78 </div>
79 <p>A pair P, if insert OK, i.e. the inserted key wasn't in the container, P.first will be the iterator sitting on the inserted key/data pair, and P.second is true; otherwise P.first is an invalid iterator and P.second is false. </p>
80 </div>
81 <pre class="programlisting">
82 iterator insert(iterator position,
83 const value_type &amp;x)
84 </pre>
85 <p>Insert with hint position. </p>
86 <p>We ignore the hint position because Berkeley DB knows better where to insert. </p>
87 <div class="sect3" lang="en" xml:lang="en">
88 <div class="titlepage">
89 <div>
90 <div>
91 <h4 class="title"><a id="idp50420952"></a>Parameters</h4>
92 </div>
93 </div>
94 </div>
95 <div class="sect4" lang="en" xml:lang="en">
96 <div class="titlepage">
97 <div>
98 <div>
99 <h5 class="title"><a id="idp50421144"></a>position</h5>
100 </div>
101 </div>
102 </div>
103 <p>The hint position. </p>
104 </div>
105 <div class="sect4" lang="en" xml:lang="en">
106 <div class="titlepage">
107 <div>
108 <div>
109 <h5 class="title"><a id="idp50421984"></a>x</h5>
110 </div>
111 </div>
112 </div>
113 <p>The key/data pair to insert. </p>
114 </div>
115 </div>
116 <div class="sect3" lang="en" xml:lang="en">
117 <div class="titlepage">
118 <div>
119 <div>
120 <h4 class="title"><a id="idp50409696"></a>Return Value</h4>
121 </div>
122 </div>
123 </div>
124 <p>The iterator sitting on the inserted key/data pair, or an invalid iterator if the key was already in the container. </p>
125 </div>
126 <pre class="programlisting">
127 void insert(const db_map_base_iterator&lt; kdt, realddt, ddt &gt; &amp;first,
128 const db_map_base_iterator&lt; kdt, realddt,
129 ddt &gt; &amp;last)
130 </pre>
131 <p>Range insertion. </p>
132 <p>Insert a range [first, last) of key/data pairs into this container. </p>
133 <div class="sect3" lang="en" xml:lang="en">
134 <div class="titlepage">
135 <div>
136 <div>
137 <h4 class="title"><a id="idp50422912"></a>Parameters</h4>
138 </div>
139 </div>
140 </div>
141 <div class="sect4" lang="en" xml:lang="en">
142 <div class="titlepage">
143 <div>
144 <div>
145 <h5 class="title"><a id="idp50423104"></a>last</h5>
146 </div>
147 </div>
148 </div>
149 <p>The open boundary of the range. </p>
150 </div>
151 <div class="sect4" lang="en" xml:lang="en">
152 <div class="titlepage">
153 <div>
154 <div>
155 <h5 class="title"><a id="idp50423944"></a>first</h5>
156 </div>
157 </div>
158 </div>
159 <p>The closed boundary of the range. </p>
160 </div>
161 </div>
162 <pre class="programlisting">
163 void insert(InputIterator first,
164 InputIterator last)
165 </pre>
166 <p>Range insertion. </p>
167 <p>Insert a range [first, last) of key/data pairs into this container. </p>
168 <div class="sect3" lang="en" xml:lang="en">
169 <div class="titlepage">
170 <div>
171 <div>
172 <h4 class="title"><a id="idp50424408"></a>Parameters</h4>
173 </div>
174 </div>
175 </div>
176 <div class="sect4" lang="en" xml:lang="en">
177 <div class="titlepage">
178 <div>
179 <div>
180 <h5 class="title"><a id="idp50424600"></a>last</h5>
181 </div>
182 </div>
183 </div>
184 <p>The open boundary of the range. </p>
185 </div>
186 <div class="sect4" lang="en" xml:lang="en">
187 <div class="titlepage">
188 <div>
189 <div>
190 <h5 class="title"><a id="idp50425440"></a>first</h5>
191 </div>
192 </div>
193 </div>
194 <p>The closed boundary of the range. </p>
195 </div>
196 </div>
197 </div>
198 <div class="sect2" lang="en" xml:lang="en">
199 <div class="titlepage">
200 <div>
201 <div>
202 <h3 class="title"><a id="idp50413944"></a>Group: Insert Functions</h3>
203 </div>
204 </div>
205 </div>
206 <p>They have similiar usage as their C++ STL equivalents.</p>
207 <p>Note that when secondary index is enabled, each <a class="link" href="db_container.html" title="Chapter 3.  Db_container">db_container</a>
208 can create a <a class="link" href="db_multimap.html" title="Chapter 6.  Db_multimap">db_multimap</a>
209 secondary container, but the insert function is not functional for secondary containers. </p>
210 <div class="simplesect" lang="en" xml:lang="en">
211 <div class="titlepage"></div>
212 <p><a class="ulink" href="http://www.cplusplus.com/reference/stl/map/insert/" target="_top">http://www.cplusplus.com/reference/stl/map/insert/</a> </p>
213 </div>
214 <p>
215 </p>
216 </div>
217 <div class="sect2" lang="en" xml:lang="en">
218 <div class="titlepage">
219 <div>
220 <div>
221 <h3 class="title"><a id="idp50423232"></a>Class</h3>
222 </div>
223 </div>
224 </div>
225 <p>
226 <a class="link" href="db_map.html" title="Chapter 5.  Db_map">db_map</a>
227 </p>
228 </div>
229 </div>
230 <div class="navfooter">
231 <hr />
232 <table width="100%" summary="Navigation footer">
233 <tr>
234 <td width="40%" align="left"><a accesskey="p" href="stldb_mapdstr_db_map.html">Prev</a> </td>
235 <td width="20%" align="center">
236 <a accesskey="u" href="db_map.html">Up</a>
237 </td>
238 <td width="40%" align="right"> <a accesskey="n" href="stldb_mapbegin.html">Next</a></td>
239 </tr>
240 <tr>
241 <td width="40%" align="left" valign="top">~db_map </td>
242 <td width="20%" align="center">
243 <a accesskey="h" href="index.html">Home</a>
244 </td>
245 <td width="40%" align="right" valign="top"> 
246 begin
247 </td>
248 </tr>
249 </table>
250 </div>
251 </body>
252 </html>