File: guidelines.html

package info (click to toggle)
boost 1.33.1-10
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 100,948 kB
  • ctags: 145,103
  • sloc: cpp: 573,492; xml: 49,055; python: 15,626; ansic: 13,588; sh: 2,099; yacc: 858; makefile: 660; perl: 427; lex: 111; csh: 6
file content (45 lines) | stat: -rw-r--r-- 2,851 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?xml version="1.0" encoding="utf-8" ?>
<!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" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.3.9: http://docutils.sourceforge.net/" />
<title>Boost Pointer Container Library</title>
<link rel="stylesheet" href="default.css" type="text/css" />
</head>
<body>
<div class="document" id="boost-pointer-container-library">
<h1 class="title"><img alt="Boost" src="boost.png" /> Pointer Container Library</h1>
<h2 class="subtitle" id="usage-guidelines">Usage Guidelines</h2>
<p>The recommended usage pattern of the container classes are the same as the 
for normal standard containers.</p>
<p><tt class="docutils literal"><span class="pre">ptr_vector</span></tt>, <tt class="docutils literal"><span class="pre">ptr_list</span></tt> and <tt class="docutils literal"><span class="pre">ptr_deque</span></tt> offer the programmer different 
complexity tradeoffs and should be used accordingly.  <tt class="docutils literal"><span class="pre">ptr_vector</span></tt> is the 
type of sequence that should be used by default.  <tt class="docutils literal"><span class="pre">ptr_list</span></tt> should be used 
when there are frequent insertions and deletions from the middle of the 
sequence and if the container is fairly large (eg.  more than 100 
elements).  <tt class="docutils literal"><span class="pre">ptr_deque</span></tt> is the data structure of choice when most insertions 
and deletions take place at the beginning or at the end of the sequence.  
The special container <tt class="docutils literal"><span class="pre">ptr_array</span></tt> may be used when the size of the container is invariant
and known at compile time.</p>
<p>An associative container supports unique keys if it may contain at most 
one element for each key. Otherwise, it supports equivalent keys.  
<tt class="docutils literal"><span class="pre">ptr_set</span></tt> and <tt class="docutils literal"><span class="pre">ptr_map</span></tt> support unique keys.  
<tt class="docutils literal"><span class="pre">ptr_multiset</span></tt> and <tt class="docutils literal"><span class="pre">ptr_multimap</span></tt> 
support equivalent keys.</p>
<p><strong>Navigate:</strong></p>
<ul class="simple">
<li><a class="reference" href="ptr_container.html">home</a></li>
<li><a class="reference" href="reference.html">reference</a></li>
</ul>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">copyright:</th><td class="field-body">Thorsten Ottosen 2004-2005.</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>