Debian Codegraph @

docs/api_reference/STL/stldb_vectoroperator_sqbrk.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>operator[]</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_vector.html" title="Chapter 4.  Db_vector" />
11 <link rel="prev" href="stldb_vectorcapacity.html" title="capacity" />
12 <link rel="next" href="stldb_vectorat.html" title="at" />
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">operator[]</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="stldb_vectorcapacity.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 4. 
26 Db_vector </th>
27 <td width="20%" align="right"> <a accesskey="n" href="stldb_vectorat.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_vectoroperator_sqbrk"></a>operator[]</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_vectoroperator_sqbrk_details"></a>Function Details</h3>
45 </div>
46 </div>
47 </div>
48 <pre class="programlisting">
49 reference operator[](index_type n)
50 </pre>
51 <p>Index operator, can act as both a left value and a right value. </p>
52 <div class="sect3" lang="en" xml:lang="en">
53 <div class="titlepage">
54 <div>
55 <div>
56 <h4 class="title"><a id="idp50169920"></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="idp50179256"></a>n</h5>
65 </div>
66 </div>
67 </div>
68 <p>The valid index of the vector. </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="idp50176272"></a>Return Value</h4>
76 </div>
77 </div>
78 </div>
79 <p>The reference to the element at specified position. </p>
80 </div>
81 <pre class="programlisting">
82 const_reference operator[](index_type n) const
83 </pre>
84 <p>Read only index operator. </p>
85 <p>Only used as a right value, no need for assignment capability. The return value can't be used to update the element. </p>
86 <div class="sect3" lang="en" xml:lang="en">
87 <div class="titlepage">
88 <div>
89 <div>
90 <h4 class="title"><a id="idp50182088"></a>Parameters</h4>
91 </div>
92 </div>
93 </div>
94 <div class="sect4" lang="en" xml:lang="en">
95 <div class="titlepage">
96 <div>
97 <div>
98 <h5 class="title"><a id="idp50182280"></a>n</h5>
99 </div>
100 </div>
101 </div>
102 <p>The valid index of the vector. </p>
103 </div>
104 </div>
105 <div class="sect3" lang="en" xml:lang="en">
106 <div class="titlepage">
107 <div>
108 <div>
109 <h4 class="title"><a id="idp50176792"></a>Return Value</h4>
110 </div>
111 </div>
112 </div>
113 <p>The const reference to the element at specified position. </p>
114 </div>
115 </div>
116 <div class="sect2" lang="en" xml:lang="en">
117 <div class="titlepage">
118 <div>
119 <div>
120 <h3 class="title"><a id="idp50168832"></a>Group: Element access functions.</h3>
121 </div>
122 </div>
123 </div>
124 <p>The operator[] and <a class="link" href="stldb_vectorat.html" title="at">at()</a>
125 only come from std::vector and std::deque, If you are using <a class="link" href="db_vector.html" title="Chapter 4.  Db_vector">db_vector</a>
126 as std::list, you don't have to set DB_RENUMBER flag to the backing database handle, and you get better performance, but at the same time you can't use these functions.</p>
127 <p>Otherwise if you have set the DB_RENUMBER flag to the backing database handle, you can use this function though it is an std::list equivalent. </p>
128 </div>
129 <div class="sect2" lang="en" xml:lang="en">
130 <div class="titlepage">
131 <div>
132 <div>
133 <h3 class="title"><a id="idp50169192"></a>Class</h3>
134 </div>
135 </div>
136 </div>
137 <p>
138 <a class="link" href="db_vector.html" title="Chapter 4.  Db_vector">db_vector</a>
139 </p>
140 </div>
141 </div>
142 <div class="navfooter">
143 <hr />
144 <table width="100%" summary="Navigation footer">
145 <tr>
146 <td width="40%" align="left"><a accesskey="p" href="stldb_vectorcapacity.html">Prev</a> </td>
147 <td width="20%" align="center">
148 <a accesskey="u" href="db_vector.html">Up</a>
149 </td>
150 <td width="40%" align="right"> <a accesskey="n" href="stldb_vectorat.html">Next</a></td>
151 </tr>
152 <tr>
153 <td width="40%" align="left" valign="top">capacity </td>
154 <td width="20%" align="center">
155 <a accesskey="h" href="index.html">Home</a>
156 </td>
157 <td width="40%" align="right" valign="top"> at</td>
158 </tr>
159 </table>
160 </div>
161 </body>
162 </html>