PageRenderTime 58ms CodeModel.GetById 40ms app.highlight 11ms RepoModel.GetById 1ms app.codeStats 0ms

/Src/Dependencies/Boost/doc/test/array1.xml

http://hadesmem.googlecode.com/
XML | 511 lines | 457 code | 53 blank | 1 comment | 0 complexity | 3033f6215deb431b3492e0525651262a MD5 | raw file
  1<library-reference>
  2   <header name="boost/array.hpp">
  3      <namespace name="boost">
  4         <class name="array">
  5            <template>
  6               <template-type-parameter name="T"/>
  7               <template-nontype-parameter name="N">
  8                  <type>std::size_t</type>
  9               </template-nontype-parameter>
 10            </template>
 11
 12            <purpose>
 13               <para>STL compliant container wrapper for arrays of constant size</para>
 14            </purpose>
 15            <typedef name="value_type">
 16               <type>T</type>
 17            </typedef>
 18            <typedef name="iterator">
 19               <type>T*</type>
 20            </typedef>
 21            <typedef name="const_iterator">
 22               <type>const T*</type>
 23            </typedef>
 24            <typedef name="reverse_iterator">
 25               <type>
 26                  <classname>std::reverse_iterator</classname>&lt;iterator&gt;
 27               </type>
 28            </typedef>
 29            <typedef name="const_reverse_iterator">
 30               <type>
 31                  <classname>std::reverse_iterator</classname>&lt;const_iterator&gt;
 32               </type>
 33            </typedef>
 34            <typedef name="reference">
 35               <type>T&amp;</type>
 36            </typedef>
 37            <typedef name="const_reference">
 38               <type>const T&amp;</type>
 39            </typedef>
 40            <typedef name="size_type">
 41               <type>std::size_t</type>
 42            </typedef>
 43            <typedef name="difference_type">
 44               <type>std::ptrdiff_t</type>
 45            </typedef>
 46
 47            <static-constant name="static_size">
 48               <type>size_type</type>
 49               <default>N</default>
 50            </static-constant>
 51
 52            <copy-assignment>
 53               <template>
 54                  <template-type-parameter name="U"/>
 55               </template>
 56               <parameter name="other">
 57                  <paramtype>const <classname>array</classname>&lt;U, N&gt;&amp;</paramtype>
 58               </parameter>
 59               <effects>
 60                  <simpara>
 61                     <code>
 62                        std::copy(rhs.<methodname>begin</methodname>(),rhs.<methodname>end</methodname>(), <methodname>begin</methodname>())
 63                     </code>
 64                  </simpara>
 65               </effects>
 66            </copy-assignment>
 67
 68            <method-group name="iterator support">
 69               <overloaded-method name="begin">
 70                  <signature>
 71                     <type>iterator</type>
 72                  </signature>
 73                  <signature cv="const">
 74                     <type>const_iterator</type>
 75                  </signature>
 76
 77                  <returns>
 78                     <simpara>iterator for the first element</simpara>
 79                  </returns>
 80                  <throws>
 81                     <simpara>will not throw</simpara>
 82                  </throws>
 83               </overloaded-method>
 84
 85               <overloaded-method name="end">
 86                  <signature>
 87                     <type>iterator</type>
 88                  </signature>
 89                  <signature cv="const">
 90                     <type>const_iterator</type>
 91                  </signature>
 92
 93                  <returns>
 94                     <simpara>iterator for position after the last element</simpara>
 95                  </returns>
 96                  <throws>
 97                     <simpara>will not throw</simpara>
 98                  </throws>
 99               </overloaded-method>
100            </method-group>
101
102            <method-group name="reverse iterator support">
103               <overloaded-method name="rbegin">
104                  <signature>
105                     <type>reverse_iterator</type>
106                  </signature>
107                  <signature cv="const">
108                     <type>const_reverse_iterator</type>
109                  </signature>
110
111                  <returns>
112                     <simpara>reverse iterator for the first element of reverse iteration</simpara>
113                  </returns>
114               </overloaded-method>
115
116               <overloaded-method name="rend">
117                  <signature>
118                     <type>reverse_iterator</type>
119                  </signature>
120                  <signature cv="const">
121                     <type>const_reverse_iterator</type>
122                  </signature>
123
124                  <returns>
125                     <simpara>reverse iterator for position after the last element in reverse iteration</simpara>
126                  </returns>
127               </overloaded-method>
128            </method-group>
129
130            <method-group name="capacity">
131               <method name="size">
132                  <type>size_type</type>
133                  <returns>
134                     <simpara>
135                        <code>N</code>
136                     </simpara>
137                  </returns>
138               </method>
139               <method name="empty">
140                  <type>bool</type>
141                  <returns>
142                     <simpara>
143                        <code>N==0</code>
144                     </simpara>
145                  </returns>
146                  <throws>
147                     <simpara>will not throw</simpara>
148                  </throws>
149               </method>
150               <method name="max_size">
151                  <type>size_type</type>
152                  <returns>
153                     <simpara>
154                        <code>N</code>
155                     </simpara>
156                  </returns>
157                  <throws>
158                     <simpara>will not throw</simpara>
159                  </throws>
160               </method>
161            </method-group>
162
163            <method-group name="element access">
164               <overloaded-method name="operator[]">
165                  <signature>
166                     <type>reference</type>
167                     <parameter name="i">
168                        <paramtype>size_type</paramtype>
169                     </parameter>
170                  </signature>
171
172                  <signature cv="const">
173                     <type>const_reference</type>
174                     <parameter name="i">
175                        <paramtype>size_type</paramtype>
176                     </parameter>
177                  </signature>
178
179                  <requires>
180                     <simpara>
181                        <code>i &lt; N</code>
182                     </simpara>
183                  </requires>
184                  <returns>
185                     <simpara>
186                        element with index <code>i</code>
187                     </simpara>
188                  </returns>
189                  <throws>
190                     <simpara>will not throw.</simpara>
191                  </throws>
192               </overloaded-method>
193
194               <overloaded-method name="at">
195                  <signature>
196                     <type>reference</type>
197                     <parameter name="i">
198                        <paramtype>size_type</paramtype>
199                     </parameter>
200                  </signature>
201
202                  <signature cv="const">
203                     <type>const_reference</type>
204                     <parameter name="i">
205                        <paramtype>size_type</paramtype>
206                     </parameter>
207                  </signature>
208
209                  <returns>
210                     <simpara>
211                        element with index <code>i</code>
212                     </simpara>
213                  </returns>
214                  <throws>
215                     <simpara>
216                        <code>
217                           <classname>std::range_error</classname>
218                        </code> if <code>i &gt;= N</code>
219                     </simpara>
220                  </throws>
221               </overloaded-method>
222
223               <overloaded-method name="front">
224                  <signature>
225                     <type>reference</type>
226                  </signature>
227                  <signature cv="const">
228                     <type>const_reference</type>
229                  </signature>
230                  <requires>
231                     <simpara>
232                        <code>N &gt; 0</code>
233                     </simpara>
234                  </requires>
235                  <returns>
236                     <simpara>the first element</simpara>
237                  </returns>
238                  <throws>
239                     <simpara>will not throw</simpara>
240                  </throws>
241               </overloaded-method>
242
243               <overloaded-method name="back">
244                  <signature>
245                     <type>reference</type>
246                  </signature>
247                  <signature cv="const">
248                     <type>const_reference</type>
249                  </signature>
250                  <requires>
251                     <simpara>
252                        <code>N &gt; 0</code>
253                     </simpara>
254                  </requires>
255                  <returns>
256                     <simpara>the last element</simpara>
257                  </returns>
258                  <throws>
259                     <simpara>will not throw</simpara>
260                  </throws>
261               </overloaded-method>
262
263               <method name="data" cv="const">
264                  <type>const T*</type>
265                  <returns>
266                     <simpara>
267                        <code>elems</code>
268                     </simpara>
269                  </returns>
270                  <throws>
271                     <simpara>will not throw</simpara>
272                  </throws>
273               </method>
274
275               <method name="c_array">
276                  <type>T*</type>
277                  <returns>
278                     <simpara>
279                        <code>elems</code>
280                     </simpara>
281                  </returns>
282                  <throws>
283                     <simpara>will not throw</simpara>
284                  </throws>
285               </method>
286            </method-group>
287
288            <method-group name="modifiers">
289               <method name="swap">
290                  <type>void</type>
291                  <parameter name="other">
292                     <paramtype><classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
293                  </parameter>
294                  <effects>
295                     <simpara>
296                        <code>
297                           std::swap_ranges(<methodname>begin</methodname>(), <methodname>end</methodname>(), other.<methodname>begin</methodname>())
298                        </code>
299                     </simpara>
300                  </effects>
301                  <complexity>
302                     <simpara>
303                        linear in <code>N</code>
304                     </simpara>
305                  </complexity>
306               </method>
307               <method name="assign">
308                  <type>void</type>
309                  <parameter name="value">
310                     <paramtype>const T&amp;</paramtype>
311                  </parameter>
312                  <effects>
313                     <simpara>
314                        <code>
315                           std::fill_n(<methodname>begin</methodname>(), N, value)
316                        </code>
317                     </simpara>
318                  </effects>
319               </method>
320            </method-group>
321
322            <data-member name="elems[N]">
323               <!-- HACK -->
324               <type>T</type>
325            </data-member>
326
327            <free-function-group name="specialized algorithms">
328               <function name="swap">
329                  <template>
330                     <template-type-parameter name="T"/>
331                     <template-nontype-parameter name="N">
332                        <type>std::size_t</type>
333                     </template-nontype-parameter>
334                  </template>
335
336                  <type>void</type>
337
338                  <parameter name="x">
339                     <paramtype><classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
340                  </parameter>
341                  <parameter name="y">
342                     <paramtype><classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
343                  </parameter>
344
345                  <effects>
346                     <simpara>
347                        <code>
348                           x.<methodname>swap</methodname>(y)
349                        </code>
350                     </simpara>
351                  </effects>
352                  <throws>
353                     <simpara>will not throw.</simpara>
354                  </throws>
355               </function>
356            </free-function-group>
357
358            <free-function-group name="comparisons">
359               <function name="operator==">
360                  <template>
361                     <template-type-parameter name="T"/>
362                     <template-nontype-parameter name="N">
363                        <type>std::size_t</type>
364                     </template-nontype-parameter>
365                  </template>
366
367                  <type>bool</type>
368
369                  <parameter name="x">
370                     <paramtype>const <classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
371                  </parameter>
372                  <parameter name="y">
373                     <paramtype>const <classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
374                  </parameter>
375
376                  <returns>
377                     <simpara>
378                        <code>
379                           std::equal(x.<methodname>begin</methodname>(), x.<methodname>end</methodname>(), y.<methodname>begin</methodname>())
380                        </code>
381                     </simpara>
382                  </returns>
383               </function>
384
385               <function name="operator!=">
386                  <template>
387                     <template-type-parameter name="T"/>
388                     <template-nontype-parameter name="N">
389                        <type>std::size_t</type>
390                     </template-nontype-parameter>
391                  </template>
392
393                  <type>bool</type>
394
395                  <parameter name="x">
396                     <paramtype>const <classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
397                  </parameter>
398                  <parameter name="y">
399                     <paramtype>const <classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
400                  </parameter>
401
402                  <returns>
403                     <simpara>
404                        <code>!(x == y)</code>
405                     </simpara>
406                  </returns>
407               </function>
408
409               <function name="operator&lt;">
410                  <template>
411                     <template-type-parameter name="T"/>
412                     <template-nontype-parameter name="N">
413                        <type>std::size_t</type>
414                     </template-nontype-parameter>
415                  </template>
416
417                  <type>bool</type>
418
419                  <parameter name="x">
420                     <paramtype>const <classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
421                  </parameter>
422                  <parameter name="y">
423                     <paramtype>const <classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
424                  </parameter>
425
426                  <returns>
427                     <simpara>
428                        <code>
429                           std::lexicographical_compare(x.<methodname>begin</methodname>(), x.<methodname>end</methodname>(), y.<methodname>begin</methodname>(), y.<methodname>end</methodname>())
430                        </code>
431                     </simpara>
432                  </returns>
433               </function>
434
435               <function name="operator&gt;">
436                  <template>
437                     <template-type-parameter name="T"/>
438                     <template-nontype-parameter name="N">
439                        <type>std::size_t</type>
440                     </template-nontype-parameter>
441                  </template>
442
443                  <type>bool</type>
444
445                  <parameter name="x">
446                     <paramtype>const <classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
447                  </parameter>
448                  <parameter name="y">
449                     <paramtype>const <classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
450                  </parameter>
451
452                  <returns>
453                     <simpara>
454                        <code>y &lt; x</code>
455                     </simpara>
456                  </returns>
457               </function>
458
459               <function name="operator&lt;=">
460                  <template>
461                     <template-type-parameter name="T"/>
462                     <template-nontype-parameter name="N">
463                        <type>std::size_t</type>
464                     </template-nontype-parameter>
465                  </template>
466
467                  <type>bool</type>
468
469                  <parameter name="x">
470                     <paramtype>const <classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
471                  </parameter>
472                  <parameter name="y">
473                     <paramtype>const <classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
474                  </parameter>
475
476                  <returns>
477                     <simpara>
478                        <code>!(y &lt; x)</code>
479                     </simpara>
480                  </returns>
481               </function>
482
483               <function name="operator&gt;=">
484                  <template>
485                     <template-type-parameter name="T"/>
486                     <template-nontype-parameter name="N">
487                        <type>std::size_t</type>
488                     </template-nontype-parameter>
489                  </template>
490
491                  <type>bool</type>
492
493                  <parameter name="x">
494                     <paramtype>const <classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
495                  </parameter>
496                  <parameter name="y">
497                     <paramtype>const <classname>array</classname>&lt;T, N&gt;&amp;</paramtype>
498                  </parameter>
499
500                  <returns>
501                     <simpara>
502                        <code>!(x &lt; y)</code>
503                     </simpara>
504                  </returns>
505               </function>
506            </free-function-group>
507         </class>
508      </namespace>
509   </header>
510</library-reference>
511