| 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>Chapter 8. Db_multiset</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="index.html" title="Berkeley DB C++ Standard Template Library API Reference" /> |
| 11 | <link rel="prev" href="stldb_setoperator_ueq.html" title="operator!=" /> |
| 12 | <link rel="next" href="stldb_multisetdstr_db_multiset.html" title="~db_multiset" /> |
| 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">Chapter 8. |
| 22 | Db_multiset </th> |
| 23 | </tr> |
| 24 | <tr> |
| 25 | <td width="20%" align="left"><a accesskey="p" href="stldb_setoperator_ueq.html">Prev</a> </td> |
| 26 | <th width="60%" align="center"> </th> |
| 27 | <td width="20%" align="right"> <a accesskey="n" href="stldb_multisetdstr_db_multiset.html">Next</a></td> |
| 28 | </tr> |
| 29 | </table> |
| 30 | <hr /> |
| 31 | </div> |
| 32 | <div class="chapter" lang="en" xml:lang="en"> |
| 33 | <div class="titlepage"> |
| 34 | <div> |
| 35 | <div> |
| 36 | <h2 class="title"><a id="db_multiset"></a>Chapter 8. |
| 37 | Db_multiset </h2> |
| 38 | </div> |
| 39 | </div> |
| 40 | </div> |
| 41 | <p>This class is the combination of std::multiset and hash_multiset. </p> |
| 42 | <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> |
| 43 | . </p> |
| 44 | <h4><a id="idp50728968"></a> |
| 45 | See Also |
| 46 | </h4> |
| 47 | <p> </p> |
| 48 | <p><a class="link" href="db_multimap.html" title="Chapter 6. Db_multimap">db_multimap</a> |
| 49 | <a class="link" href="db_map.html" title="Chapter 5. Db_map">db_map</a> |
| 50 | <a class="link" href="db_container.html" title="Chapter 3. Db_container">db_container</a> |
| 51 | <a class="link" href="db_set.html" title="Chapter 7. Db_set">db_set</a> |
| 52 | </p> |
| 53 | <div class="sect2" lang="en" xml:lang="en"> |
| 54 | <div class="titlepage"> |
| 55 | <div> |
| 56 | <div> |
| 57 | <h3 class="title"><a id="idp50732528"></a> |
| 58 | Class Template Parameters</h3> |
| 59 | </div> |
| 60 | </div> |
| 61 | </div> |
| 62 | <div class="sect3" lang="en" xml:lang="en"> |
| 63 | <div class="titlepage"> |
| 64 | <div> |
| 65 | <div> |
| 66 | <h4 class="title"><a id="idp50712448"></a> |
| 67 | kdt</h4> |
| 68 | </div> |
| 69 | </div> |
| 70 | </div> |
| 71 | <p>The key data type. </p> |
| 72 | </div> |
| 73 | <div class="sect3" lang="en" xml:lang="en"> |
| 74 | <div class="titlepage"> |
| 75 | <div> |
| 76 | <div> |
| 77 | <h4 class="title"><a id="idp50739720"></a> |
| 78 | value_type_sub</h4> |
| 79 | </div> |
| 80 | </div> |
| 81 | </div> |
| 82 | <p>If kdt is a class/struct type, do not specify anything in this parameter; Otherwise specify ElementHolder<kdt>. </p> |
| 83 | </div> |
| 84 | </div> |
| 85 | <h4><a id="idp50730264"></a> Public Members </h4> |
| 86 | <div class="informaltable"> |
| 87 | <table border="1" width="80%"> |
| 88 | <colgroup> |
| 89 | <col /> |
| 90 | <col /> |
| 91 | </colgroup> |
| 92 | <thead> |
| 93 | <tr> |
| 94 | <th>Member</th> |
| 95 | <th>Description</th> |
| 96 | </tr> |
| 97 | </thead> |
| 98 | <tbody> |
| 99 | <tr> |
| 100 | <td> |
| 101 | <a class="xref" href="db_multiset.html#stldb_multisetdb_multiset" title="db_multiset">db_multiset</a> |
| 102 | </td> |
| 103 | <td> |
| 104 | <p>Create a std::multiset/hash_multiset equivalent associative container. </p> </td> |
| 105 | </tr> |
| 106 | <tr> |
| 107 | <td> |
| 108 | <a class="xref" href="stldb_multisetdstr_db_multiset.html" title="~db_multiset">~db_multiset</a> |
| 109 | </td> |
| 110 | <td> |
| 111 | </td> |
| 112 | </tr> |
| 113 | <tr> |
| 114 | <td> |
| 115 | <a class="xref" href="stldb_multisetinsert.html" title="insert">insert</a> |
| 116 | </td> |
| 117 | <td> |
| 118 | <p>Insert a single key if the key is not in the container. </p> </td> |
| 119 | </tr> |
| 120 | <tr> |
| 121 | <td> |
| 122 | <a class="xref" href="stldb_multiseterase.html" title="erase">erase</a> |
| 123 | </td> |
| 124 | <td> |
| 125 | <p>Erase elements by key. </p> </td> |
| 126 | </tr> |
| 127 | <tr> |
| 128 | <td> |
| 129 | <a class="xref" href="stldb_multisetoperator_assign.html" title="operator=">operator=</a> |
| 130 | </td> |
| 131 | <td> |
| 132 | <p>Container content assignment operator. </p> </td> |
| 133 | </tr> |
| 134 | <tr> |
| 135 | <td> |
| 136 | <a class="xref" href="stldb_multisetswap.html" title="swap">swap</a> |
| 137 | </td> |
| 138 | <td> |
| 139 | <p>Swap content with another container. </p> </td> |
| 140 | </tr> |
| 141 | <tr> |
| 142 | <td> |
| 143 | <a class="xref" href="stldb_multisetoperator_eq.html" title="operator==">operator==</a> |
| 144 | </td> |
| 145 | <td> |
| 146 | <p>Container content equality compare operator. </p> </td> |
| 147 | </tr> |
| 148 | <tr> |
| 149 | <td> |
| 150 | <a class="xref" href="stldb_multisetoperator_ueq.html" title="operator!=">operator!=</a> |
| 151 | </td> |
| 152 | <td> |
| 153 | <p>Inequality comparison operator. </p> </td> |
| 154 | </tr> |
| 155 | </tbody> |
| 156 | </table> |
| 157 | </div> |
| 158 | <h4><a id="idp50746736"></a> |
| 159 | Group</h4> |
| 160 | <p> |
| 161 | <a class="xref" href="dbstl_containers.html" title="Chapter 2. Dbstl Container Classes"> |
| 162 | Dbstl Container Classes </a> |
| 163 | </p> |
| 164 | <p> |
| 165 | </p> |
| 166 | <div class="sect1" lang="en" xml:lang="en"> |
| 167 | <div class="titlepage"> |
| 168 | <div> |
| 169 | <div> |
| 170 | <h2 class="title" style="clear: both"><a id="stldb_multisetdb_multiset"></a>db_multiset</h2> |
| 171 | </div> |
| 172 | </div> |
| 173 | </div> |
| 174 | <div class="sect2" lang="en" xml:lang="en"> |
| 175 | <div class="titlepage"> |
| 176 | <div> |
| 177 | <div> |
| 178 | <h3 class="title"><a id="stldb_multisetdb_multiset_details"></a>Function Details</h3> |
| 179 | </div> |
| 180 | </div> |
| 181 | </div> |
| 182 | <pre class="programlisting"> |
| 183 | db_multiset(Db *dbp=NULL, |
| 184 | DbEnv *envp=NULL) |
| 185 | </pre> |
| 186 | <p>Create a std::multiset/hash_multiset equivalent associative container. </p> |
| 187 | <p>See the handle requirement in class details to pass correct database/environment handles. </p> |
| 188 | <div class="sect3" lang="en" xml:lang="en"> |
| 189 | <div class="titlepage"> |
| 190 | <div> |
| 191 | <div> |
| 192 | <h4 class="title"><a id="idp50729720"></a>Parameters</h4> |
| 193 | </div> |
| 194 | </div> |
| 195 | </div> |
| 196 | <div class="sect4" lang="en" xml:lang="en"> |
| 197 | <div class="titlepage"> |
| 198 | <div> |
| 199 | <div> |
| 200 | <h5 class="title"><a id="idp50757256"></a>dbp</h5> |
| 201 | </div> |
| 202 | </div> |
| 203 | </div> |
| 204 | <p>The database handle. </p> |
| 205 | </div> |
| 206 | <div class="sect4" lang="en" xml:lang="en"> |
| 207 | <div class="titlepage"> |
| 208 | <div> |
| 209 | <div> |
| 210 | <h5 class="title"><a id="idp50759136"></a>envp</h5> |
| 211 | </div> |
| 212 | </div> |
| 213 | </div> |
| 214 | <p>The database environment handle. </p> |
| 215 | </div> |
| 216 | </div> |
| 217 | <div class="sect3" lang="en" xml:lang="en"> |
| 218 | <div class="titlepage"> |
| 219 | <div> |
| 220 | <div> |
| 221 | <h4 class="title"><a id="idp50754864"></a>See Also</h4> |
| 222 | </div> |
| 223 | </div> |
| 224 | </div> |
| 225 | <p> |
| 226 | </p> |
| 227 | <p><a class="link" href="stldb_multimapdb_multimap.html" title="db_multimap">db_multimap(Db*, DbEnv*)</a> |
| 228 | </p> |
| 229 | <p> |
| 230 | </p> |
| 231 | </div> |
| 232 | <pre class="programlisting"> |
| 233 | db_multiset(Db *dbp, DbEnv *envp, InputIterator first, |
| 234 | InputIterator last) |
| 235 | </pre> |
| 236 | <p>Iteration constructor. </p> |
| 237 | <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> |
| 238 | <div class="sect3" lang="en" xml:lang="en"> |
| 239 | <div class="titlepage"> |
| 240 | <div> |
| 241 | <div> |
| 242 | <h4 class="title"><a id="idp50736096"></a>Parameters</h4> |
| 243 | </div> |
| 244 | </div> |
| 245 | </div> |
| 246 | <div class="sect4" lang="en" xml:lang="en"> |
| 247 | <div class="titlepage"> |
| 248 | <div> |
| 249 | <div> |
| 250 | <h5 class="title"><a id="idp50736288"></a>dbp</h5> |
| 251 | </div> |
| 252 | </div> |
| 253 | </div> |
| 254 | <p>The database handle. </p> |
| 255 | </div> |
| 256 | <div class="sect4" lang="en" xml:lang="en"> |
| 257 | <div class="titlepage"> |
| 258 | <div> |
| 259 | <div> |
| 260 | <h5 class="title"><a id="idp50762392"></a>envp</h5> |
| 261 | </div> |
| 262 | </div> |
| 263 | </div> |
| 264 | <p>The database environment handle. </p> |
| 265 | </div> |
| 266 | <div class="sect4" lang="en" xml:lang="en"> |
| 267 | <div class="titlepage"> |
| 268 | <div> |
| 269 | <div> |
| 270 | <h5 class="title"><a id="idp50762712"></a>last</h5> |
| 271 | </div> |
| 272 | </div> |
| 273 | </div> |
| 274 | <p>The open boundary of the range. </p> |
| 275 | </div> |
| 276 | <div class="sect4" lang="en" xml:lang="en"> |
| 277 | <div class="titlepage"> |
| 278 | <div> |
| 279 | <div> |
| 280 | <h5 class="title"><a id="idp50763032"></a>first</h5> |
| 281 | </div> |
| 282 | </div> |
| 283 | </div> |
| 284 | <p>The closed boundary of the range. </p> |
| 285 | </div> |
| 286 | </div> |
| 287 | <div class="sect3" lang="en" xml:lang="en"> |
| 288 | <div class="titlepage"> |
| 289 | <div> |
| 290 | <div> |
| 291 | <h4 class="title"><a id="idp50757088"></a>See Also</h4> |
| 292 | </div> |
| 293 | </div> |
| 294 | </div> |
| 295 | <p> |
| 296 | </p> |
| 297 | <p><a class="link" href="stldb_multimapdb_multimap.html" title="db_multimap">db_multimap(Db*, DbEnv*, InputIterator, InputIterator)</a> |
| 298 | </p> |
| 299 | <p> |
| 300 | </p> |
| 301 | </div> |
| 302 | <pre class="programlisting"> |
| 303 | db_multiset(const self &x) |
| 304 | </pre> |
| 305 | <p>Copy constructor. </p> |
| 306 | <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> |
| 307 | <div class="sect3" lang="en" xml:lang="en"> |
| 308 | <div class="titlepage"> |
| 309 | <div> |
| 310 | <div> |
| 311 | <h4 class="title"><a id="idp50757472"></a>Parameters</h4> |
| 312 | </div> |
| 313 | </div> |
| 314 | </div> |
| 315 | <div class="sect4" lang="en" xml:lang="en"> |
| 316 | <div class="titlepage"> |
| 317 | <div> |
| 318 | <div> |
| 319 | <h5 class="title"><a id="idp50757664"></a>x</h5> |
| 320 | </div> |
| 321 | </div> |
| 322 | </div> |
| 323 | <p>The source container to initialize this container. </p> |
| 324 | </div> |
| 325 | </div> |
| 326 | <div class="sect3" lang="en" xml:lang="en"> |
| 327 | <div class="titlepage"> |
| 328 | <div> |
| 329 | <div> |
| 330 | <h4 class="title"><a id="idp50758504"></a>See Also</h4> |
| 331 | </div> |
| 332 | </div> |
| 333 | </div> |
| 334 | <p> |
| 335 | </p> |
| 336 | <p>db_multimap(const db_multimap&) <a class="link" href="stldb_containerdb_container.html" title="db_container">db_container(const db_container&)</a> |
| 337 | </p> |
| 338 | <p> |
| 339 | </p> |
| 340 | </div> |
| 341 | </div> |
| 342 | <div class="sect2" lang="en" xml:lang="en"> |
| 343 | <div class="titlepage"> |
| 344 | <div> |
| 345 | <div> |
| 346 | <h3 class="title"><a id="idp50739216"></a>Class</h3> |
| 347 | </div> |
| 348 | </div> |
| 349 | </div> |
| 350 | <p> |
| 351 | <a class="link" href="db_multiset.html" title="Chapter 8. Db_multiset">db_multiset</a> |
| 352 | </p> |
| 353 | </div> |
| 354 | </div> |
| 355 | </div> |
| 356 | <div class="navfooter"> |
| 357 | <hr /> |
| 358 | <table width="100%" summary="Navigation footer"> |
| 359 | <tr> |
| 360 | <td width="40%" align="left"><a accesskey="p" href="stldb_setoperator_ueq.html">Prev</a> </td> |
| 361 | <td width="20%" align="center"> </td> |
| 362 | <td width="40%" align="right"> <a accesskey="n" href="stldb_multisetdstr_db_multiset.html">Next</a></td> |
| 363 | </tr> |
| 364 | <tr> |
| 365 | <td width="40%" align="left" valign="top">operator!= </td> |
| 366 | <td width="20%" align="center"> |
| 367 | <a accesskey="h" href="index.html">Home</a> |
| 368 | </td> |
| 369 | <td width="40%" align="right" valign="top"> ~db_multiset</td> |
| 370 | </tr> |
| 371 | </table> |
| 372 | </div> |
| 373 | </body> |
| 374 | </html> |