mirror of
https://github.com/boostorg/ptr_container.git
synced 2026-01-19 04:22:16 +00:00
doc update
[SVN r33300]
This commit is contained in:
@@ -3,15 +3,294 @@
|
||||
<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/" />
|
||||
<meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Pointer Container Library</title>
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:Date: $Date$
|
||||
:Revision: $Revision$
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* "! important" is used here to override other ``margin-top`` and
|
||||
``margin-bottom`` styles that are later in the stylesheet or
|
||||
more specific. See http://www.w3.org/TR/CSS1#the-cascade */
|
||||
.first {
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left {
|
||||
clear: left }
|
||||
|
||||
img.align-right {
|
||||
clear: right }
|
||||
|
||||
img.borderless {
|
||||
border: 0 }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
tt.docutils {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="boost-pointer-container-library">
|
||||
<h1 class="title"><img alt="Boost" src="boost.png" /> Pointer Container Library</h1>
|
||||
<div class="section" id="class-associative-ptr-container">
|
||||
<h1><a name="class-associative-ptr-container">Class <tt class="docutils literal"><span class="pre">associative_ptr_container</span></tt></a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="class-associative-ptr-container" name="class-associative-ptr-container">Class <tt class="docutils literal"><span class="pre">associative_ptr_container</span></tt></a></h1>
|
||||
<p>This section describes all the common operations for all associative
|
||||
pointer containers (in addition to <tt class="docutils literal"><span class="pre">reversible_ptr_container</span></tt>):</p>
|
||||
<ul class="simple">
|
||||
@@ -81,10 +360,10 @@ namespace boost
|
||||
} // namespace 'boost'
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="semantics">
|
||||
<h1><a name="semantics">Semantics</a></h1>
|
||||
<span id="typedefs"></span><div class="section" id="semantics-typedefs">
|
||||
<h2><a name="semantics-typedefs">Semantics: typedefs</a></h2>
|
||||
<div class="section">
|
||||
<h1><a id="semantics" name="semantics">Semantics</a></h1>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-typedefs" name="semantics-typedefs"><span id="typedefs"></span>Semantics: typedefs</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">typedef</span> <span class="pre">...</span> <span class="pre">key_type;</span></tt></p>
|
||||
<blockquote>
|
||||
@@ -112,8 +391,8 @@ given <tt class="docutils literal"><span class="pre">ptr_set<T></span></tt
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span id="observers"></span><div class="section" id="semantics-observers">
|
||||
<h2><a name="semantics-observers">Semantics: observers</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-observers" name="semantics-observers"><span id="observers"></span>Semantics: observers</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">key_compare</span> <span class="pre">key_comp()</span> <span class="pre">const;</span></tt></p>
|
||||
</li>
|
||||
@@ -126,8 +405,8 @@ given <tt class="docutils literal"><span class="pre">ptr_set<T></span></tt
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span id="modifiers"></span><div class="section" id="semantics-modifiers">
|
||||
<h2><a name="semantics-modifiers">Semantics: modifiers</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-modifiers" name="semantics-modifiers"><span id="modifiers"></span>Semantics: modifiers</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">template<</span> <span class="pre">typename</span> <span class="pre">InputIterator</span> <span class="pre">></span>
|
||||
<span class="pre">void</span> <span class="pre">insert(</span> <span class="pre">InputIterator</span> <span class="pre">first,</span> <span class="pre">InputIterator</span> <span class="pre">last</span> <span class="pre">);</span></tt></p>
|
||||
@@ -182,8 +461,8 @@ given <tt class="docutils literal"><span class="pre">ptr_set<T></span></tt
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span id="algorithms"></span><div class="section" id="semantics-algorithms">
|
||||
<h2><a name="semantics-algorithms">Semantics: algorithms</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-algorithms" name="semantics-algorithms"><span id="algorithms"></span>Semantics: algorithms</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">iterator</span> <span class="pre">find(</span> <span class="pre">const</span> <span class="pre">Key&</span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
|
||||
</li>
|
||||
|
||||
@@ -3,9 +3,288 @@
|
||||
<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/" />
|
||||
<meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Pointer Container Library</title>
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:Date: $Date$
|
||||
:Revision: $Revision$
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* "! important" is used here to override other ``margin-top`` and
|
||||
``margin-bottom`` styles that are later in the stylesheet or
|
||||
more specific. See http://www.w3.org/TR/CSS1#the-cascade */
|
||||
.first {
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left {
|
||||
clear: left }
|
||||
|
||||
img.align-right {
|
||||
clear: right }
|
||||
|
||||
img.borderless {
|
||||
border: 0 }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
tt.docutils {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="boost-pointer-container-library">
|
||||
@@ -14,7 +293,7 @@
|
||||
<p>There are a few design decisions that will affect how the classes are
|
||||
used. Besides these the classes are much like normal standard containers
|
||||
and provides almost the same interface. The new conventions are:</p>
|
||||
<div class="contents topic" id="contents">
|
||||
<div class="contents local topic">
|
||||
<ul class="simple">
|
||||
<li><a class="reference" href="#null-pointers-are-not-allowed-by-default" id="id3" name="id3">Null pointers are not allowed by default</a></li>
|
||||
<li><a class="reference" href="#all-default-iterators-apply-an-extra-layer-of-indirection" id="id4" name="id4">All default iterators apply an extra layer of indirection</a></li>
|
||||
@@ -29,8 +308,8 @@ and provides almost the same interface. The new conventions are:</p>
|
||||
<li><a class="reference" href="#iterators-are-invalidated-as-in-the-corresponding-standard-container" id="id13" name="id13">Iterators are invalidated as in the corresponding standard container</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="null-pointers-are-not-allowed-by-default">
|
||||
<h1><a class="toc-backref" href="#id3" name="null-pointers-are-not-allowed-by-default">Null pointers are not allowed by default</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id3" id="null-pointers-are-not-allowed-by-default" name="null-pointers-are-not-allowed-by-default">Null pointers are not allowed by default</a></h1>
|
||||
<p>If the user tries to insert the null pointer, the operation will throw a
|
||||
<tt class="docutils literal"><span class="pre">bad_pointer</span></tt> exception (see <a class="reference" href="examples.html">Example 1</a>).</p>
|
||||
<p>Use <a class="reference" href="reference.html#class-nullable">nullable</a> to allow null pointers.</p>
|
||||
@@ -45,8 +324,8 @@ boost::ptr_vector< boost::nullable<animal> > vec;
|
||||
vec.push_back( 0 ); // ok
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="all-default-iterators-apply-an-extra-layer-of-indirection">
|
||||
<h1><a class="toc-backref" href="#id4" name="all-default-iterators-apply-an-extra-layer-of-indirection">All default iterators apply an extra layer of indirection</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id4" id="all-default-iterators-apply-an-extra-layer-of-indirection" name="all-default-iterators-apply-an-extra-layer-of-indirection">All default iterators apply an extra layer of indirection</a></h1>
|
||||
<p>This is done to
|
||||
make the containers easier and safer to use. It promotes a kind of
|
||||
pointer-less programming and the user of a class needs not worry about
|
||||
@@ -56,58 +335,58 @@ useful in rare cases. For example, whenever <tt class="docutils literal"><span c
|
||||
<tt class="docutils literal"><span class="pre">ptr_begin()</span></tt> will return an iterator that allows one to iterate over the
|
||||
stored pointers.</p>
|
||||
</div>
|
||||
<div class="section" id="all-comparison-operations-are-done-on-the-pointed-to-objects-and-not-at-the-pointer-level">
|
||||
<h1><a class="toc-backref" href="#id5" name="all-comparison-operations-are-done-on-the-pointed-to-objects-and-not-at-the-pointer-level">All comparison operations are done on the pointed to objects and not at the pointer level</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id5" id="all-comparison-operations-are-done-on-the-pointed-to-objects-and-not-at-the-pointer-level" name="all-comparison-operations-are-done-on-the-pointed-to-objects-and-not-at-the-pointer-level">All comparison operations are done on the pointed to objects and not at the pointer level</a></h1>
|
||||
<p>For example, in <tt class="docutils literal"><span class="pre">ptr_set<T></span></tt> the ordering is by default done by
|
||||
<tt class="docutils literal"><span class="pre">boost::ptr_less<T></span></tt> which compares the indirected pointers.
|
||||
Similarly, <tt class="docutils literal"><span class="pre">operator==()</span></tt> for <tt class="docutils literal"><span class="pre">container<Foo></span></tt> compares all objects
|
||||
with <tt class="docutils literal"><span class="pre">operator==(const</span> <span class="pre">Foo&,</span> <span class="pre">const</span> <span class="pre">Foo&)</span></tt>.</p>
|
||||
</div>
|
||||
<div class="section" id="the-containers-are-neither-copy-constructible-nor-assignable">
|
||||
<h1><a class="toc-backref" href="#id6" name="the-containers-are-neither-copy-constructible-nor-assignable">The containers are neither Copy Constructible nor Assignable</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id6" id="the-containers-are-neither-copy-constructible-nor-assignable" name="the-containers-are-neither-copy-constructible-nor-assignable">The containers are neither Copy Constructible nor Assignable</a></h1>
|
||||
<p>This is
|
||||
because cloning a lot of pointers can be a very expensive operation;
|
||||
instead functions are provided to transfer ownership. If a deep-copy is
|
||||
needed anyway, every container has a <tt class="docutils literal"><span class="pre">clone()</span></tt> member function
|
||||
(see <a class="reference" href="examples.html">Example 3</a>).</p>
|
||||
</div>
|
||||
<div class="section" id="stored-elements-are-required-to-be-clonable-for-a-subset-of-the-operations">
|
||||
<h1><a name="stored-elements-are-required-to-be-clonable-for-a-subset-of-the-operations">Stored elements are required to be <a class="reference" href="reference.html#the-clonable-concept">Clonable</a> for a subset of the operations</a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="stored-elements-are-required-to-be-clonable-for-a-subset-of-the-operations" name="stored-elements-are-required-to-be-clonable-for-a-subset-of-the-operations">Stored elements are required to be <a class="reference" href="reference.html#the-clonable-concept">Clonable</a> for a subset of the operations</a></h1>
|
||||
<p>This is because most polymorphic objects cannot be copied directly, but
|
||||
they can often be so by a use of a member function (see <a class="reference" href="examples.html">Example 4</a>). Often
|
||||
it does not even make sense to clone an object in which case a large
|
||||
subset of the operations are still workable.</p>
|
||||
</div>
|
||||
<div class="section" id="whenever-objects-are-inserted-into-a-container-they-are-cloned-before-insertion">
|
||||
<h1><a class="toc-backref" href="#id8" name="whenever-objects-are-inserted-into-a-container-they-are-cloned-before-insertion">Whenever objects are inserted into a container, they are cloned before insertion</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id8" id="whenever-objects-are-inserted-into-a-container-they-are-cloned-before-insertion" name="whenever-objects-are-inserted-into-a-container-they-are-cloned-before-insertion">Whenever objects are inserted into a container, they are cloned before insertion</a></h1>
|
||||
<p>This is necessary because all pointer containers take ownerships of stored objects
|
||||
(see <a class="reference" href="examples.html">Example 5</a>).</p>
|
||||
</div>
|
||||
<div class="section" id="whenever-pointers-are-inserted-into-a-container-ownership-is-transferred-to-the-container">
|
||||
<h1><a class="toc-backref" href="#id9" name="whenever-pointers-are-inserted-into-a-container-ownership-is-transferred-to-the-container">Whenever pointers are inserted into a container, ownership is transferred to the container</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id9" id="whenever-pointers-are-inserted-into-a-container-ownership-is-transferred-to-the-container" name="whenever-pointers-are-inserted-into-a-container-ownership-is-transferred-to-the-container">Whenever pointers are inserted into a container, ownership is transferred to the container</a></h1>
|
||||
<p>All containers take ownership of the stored pointers and therefore a
|
||||
container needs to have its own copies (see <a class="reference" href="examples.html">Example 5</a>).</p>
|
||||
</div>
|
||||
<div class="section" id="ownership-can-be-transferred-from-a-container-on-a-per-pointer-basis">
|
||||
<h1><a class="toc-backref" href="#id10" name="ownership-can-be-transferred-from-a-container-on-a-per-pointer-basis">Ownership can be transferred from a container on a per pointer basis</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id10" id="ownership-can-be-transferred-from-a-container-on-a-per-pointer-basis" name="ownership-can-be-transferred-from-a-container-on-a-per-pointer-basis">Ownership can be transferred from a container on a per pointer basis</a></h1>
|
||||
<p>This can of course also be convenient. Whenever it happens, an
|
||||
<tt class="docutils literal"><span class="pre">SmartContainer::auto_type</span></tt> object is used to provide an exception-safe transfer
|
||||
(see <a class="reference" href="examples.html">Example 6</a>).</p>
|
||||
</div>
|
||||
<div class="section" id="ownership-can-be-transferred-from-a-container-to-another-container-on-a-per-iterator-range-basis">
|
||||
<h1><a class="toc-backref" href="#id11" name="ownership-can-be-transferred-from-a-container-to-another-container-on-a-per-iterator-range-basis">Ownership can be transferred from a container to another container on a per iterator range basis</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id11" id="ownership-can-be-transferred-from-a-container-to-another-container-on-a-per-iterator-range-basis" name="ownership-can-be-transferred-from-a-container-to-another-container-on-a-per-iterator-range-basis">Ownership can be transferred from a container to another container on a per iterator range basis</a></h1>
|
||||
<p>This makes it possible to exchange data safely between different pointer
|
||||
containers without cloning the objects again (see <a class="reference" href="examples.html">Example 7</a>).</p>
|
||||
</div>
|
||||
<div class="section" id="a-container-can-be-cheaply-returned-from-functions-either-by-making-a-clone-or-by-giving-up-ownership-of-the-container">
|
||||
<h1><a class="toc-backref" href="#id12" name="a-container-can-be-cheaply-returned-from-functions-either-by-making-a-clone-or-by-giving-up-ownership-of-the-container">A container can be cheaply returned from functions either by making a clone or by giving up ownership of the container</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id12" id="a-container-can-be-cheaply-returned-from-functions-either-by-making-a-clone-or-by-giving-up-ownership-of-the-container" name="a-container-can-be-cheaply-returned-from-functions-either-by-making-a-clone-or-by-giving-up-ownership-of-the-container">A container can be cheaply returned from functions either by making a clone or by giving up ownership of the container</a></h1>
|
||||
<p>Two special member functions, <tt class="docutils literal"><span class="pre">clone()</span></tt> and <tt class="docutils literal"><span class="pre">release()</span></tt>, both return an
|
||||
<tt class="docutils literal"><span class="pre">auto_ptr<SmartContainer></span></tt> which can be assigned to another pointer container. This
|
||||
effectively reduces the cost of returning a container to one
|
||||
heap-allocation plus a call to <tt class="docutils literal"><span class="pre">swap()</span></tt> (see <a class="reference" href="examples.html">Example 3</a>).</p>
|
||||
</div>
|
||||
<div class="section" id="iterators-are-invalidated-as-in-the-corresponding-standard-container">
|
||||
<h1><a class="toc-backref" href="#id13" name="iterators-are-invalidated-as-in-the-corresponding-standard-container">Iterators are invalidated as in the corresponding standard container</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id13" id="iterators-are-invalidated-as-in-the-corresponding-standard-container" name="iterators-are-invalidated-as-in-the-corresponding-standard-container">Iterators are invalidated as in the corresponding standard container</a></h1>
|
||||
<p>Because the containers in this library wrap standard containers, the
|
||||
rules for invalidation of iterators are the same as the rules
|
||||
of the corresponding standard container.</p>
|
||||
|
||||
@@ -3,16 +3,295 @@
|
||||
<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/" />
|
||||
<meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Pointer Container Library</title>
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:Date: $Date$
|
||||
:Revision: $Revision$
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* "! important" is used here to override other ``margin-top`` and
|
||||
``margin-bottom`` styles that are later in the stylesheet or
|
||||
more specific. See http://www.w3.org/TR/CSS1#the-cascade */
|
||||
.first {
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left {
|
||||
clear: left }
|
||||
|
||||
img.align-right {
|
||||
clear: right }
|
||||
|
||||
img.borderless {
|
||||
border: 0 }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
tt.docutils {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</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="examples">Examples</h2>
|
||||
<p>Some examples are given here and in the accompanying test files:</p>
|
||||
<div class="contents topic" id="contents">
|
||||
<div class="contents local topic">
|
||||
<ul class="simple">
|
||||
<li><a class="reference" href="#null-pointers-cannot-be-stored-in-the-containers" id="id1" name="id1">1. Null pointers cannot be stored in the containers</a></li>
|
||||
<li><a class="reference" href="#iterators-and-other-operations-return-indirected-values" id="id2" name="id2">2. Iterators and other operations return indirected values</a></li>
|
||||
@@ -24,16 +303,16 @@
|
||||
<li><a class="reference" href="#selected-test-files" id="id8" name="id8">8. Selected test files</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<span id="example-1"></span><div class="section" id="null-pointers-cannot-be-stored-in-the-containers">
|
||||
<h1><a class="toc-backref" href="#id1" name="null-pointers-cannot-be-stored-in-the-containers">1. Null pointers cannot be stored in the containers</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id1" id="null-pointers-cannot-be-stored-in-the-containers" name="null-pointers-cannot-be-stored-in-the-containers"><span id="example-1"></span>1. Null pointers cannot be stored in the containers</a></h1>
|
||||
<pre class="literal-block">
|
||||
my_container.push_back( 0 ); // throws bad_ptr
|
||||
my_container.replace( an_iterator, 0 ); // throws bad_ptr
|
||||
my_container.insert( an_iterator, 0 ); // throws bad_ptr
|
||||
</pre>
|
||||
</div>
|
||||
<span id="example-2"></span><div class="section" id="iterators-and-other-operations-return-indirected-values">
|
||||
<h1><a class="toc-backref" href="#id2" name="iterators-and-other-operations-return-indirected-values">2. Iterators and other operations return indirected values</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id2" id="iterators-and-other-operations-return-indirected-values" name="iterators-and-other-operations-return-indirected-values"><span id="example-2"></span>2. Iterators and other operations return indirected values</a></h1>
|
||||
<pre class="literal-block">
|
||||
ptr_vector<X> pvec;
|
||||
std::vector<X*> vec;
|
||||
@@ -45,8 +324,8 @@ pvec.begin()->foo(); // no indirection needed
|
||||
pvec.front() = X(); // no indirection needed
|
||||
</pre>
|
||||
</div>
|
||||
<span id="example-3"></span><div class="section" id="copy-semantics-of-pointer-containers">
|
||||
<h1><a class="toc-backref" href="#id3" name="copy-semantics-of-pointer-containers">3. Copy-semantics of pointer containers</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id3" id="copy-semantics-of-pointer-containers" name="copy-semantics-of-pointer-containers"><span id="example-3"></span>3. Copy-semantics of pointer containers</a></h1>
|
||||
<pre class="literal-block">
|
||||
ptr_vector<T> vec1;
|
||||
...
|
||||
@@ -57,8 +336,8 @@ vec1 = vec2; // compile time error: 'operator=()' not def
|
||||
ptr_vector<T> vec3( vec1 ); // compile time error: copy-constructor not defined
|
||||
</pre>
|
||||
</div>
|
||||
<span id="example-4"></span><div class="section" id="making-a-non-copyable-type-clonable">
|
||||
<h1><a class="toc-backref" href="#id4" name="making-a-non-copyable-type-clonable">4. Making a non-copyable type Clonable</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id4" id="making-a-non-copyable-type-clonable" name="making-a-non-copyable-type-clonable"><span id="example-4"></span>4. Making a non-copyable type Clonable</a></h1>
|
||||
<pre class="literal-block">
|
||||
// a class that has no normal copy semantics
|
||||
class X : boost::noncopyable { public: X* clone() const; ... };
|
||||
@@ -74,8 +353,8 @@ vec2 = vec1.clone(); // 'clone()' requires cloni
|
||||
vec2.insert( vec2.end(), vec1.begin(), vec1.end() ); // inserting always means inserting clones
|
||||
</pre>
|
||||
</div>
|
||||
<span id="example-5"></span><div class="section" id="objects-are-cloned-before-insertion-inserted-pointers-are-owned-by-the-container">
|
||||
<h1><a class="toc-backref" href="#id5" name="objects-are-cloned-before-insertion-inserted-pointers-are-owned-by-the-container">5. Objects are cloned before insertion, inserted pointers are owned by the container</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id5" id="objects-are-cloned-before-insertion-inserted-pointers-are-owned-by-the-container" name="objects-are-cloned-before-insertion-inserted-pointers-are-owned-by-the-container"><span id="example-5"></span>5. Objects are cloned before insertion, inserted pointers are owned by the container</a></h1>
|
||||
<pre class="literal-block">
|
||||
class X { ... }; // assume 'X' is Clonable
|
||||
X x; // and 'X' can be stack-allocated
|
||||
@@ -86,8 +365,8 @@ list.push_back( new X ); // always give the pointer directly to the
|
||||
list.push_back( &x ); // don't do this!!!
|
||||
</pre>
|
||||
</div>
|
||||
<span id="example-6"></span><div class="section" id="transferring-ownership-of-a-single-element">
|
||||
<h1><a class="toc-backref" href="#id6" name="transferring-ownership-of-a-single-element">6. Transferring ownership of a single element</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id6" id="transferring-ownership-of-a-single-element" name="transferring-ownership-of-a-single-element"><span id="example-6"></span>6. Transferring ownership of a single element</a></h1>
|
||||
<pre class="literal-block">
|
||||
ptr_deque<T> deq;
|
||||
typedef ptr_deque<T>::auto_type auto_type;
|
||||
@@ -99,8 +378,8 @@ auto_type ptr2 = deq.release( deq.begin() + 2 ); // use an iterator to determine
|
||||
ptr = deq.release_front(); // supported for 'ptr_list' and 'ptr_deque'
|
||||
</pre>
|
||||
</div>
|
||||
<span id="example-7"></span><div class="section" id="transferring-ownership-of-pointers-between-different-pointer-containers">
|
||||
<h1><a class="toc-backref" href="#id7" name="transferring-ownership-of-pointers-between-different-pointer-containers">7. Transferring ownership of pointers between different pointer containers</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id7" id="transferring-ownership-of-pointers-between-different-pointer-containers" name="transferring-ownership-of-pointers-between-different-pointer-containers"><span id="example-7"></span>7. Transferring ownership of pointers between different pointer containers</a></h1>
|
||||
<pre class="literal-block">
|
||||
ptr_list<X> list; ptr_vector<X> vec;
|
||||
...
|
||||
@@ -111,8 +390,8 @@ list.transfer( list.begin(), vec.begin(), vec ); // make the first ele
|
||||
vec.transfer( vec.end(), list.begin(), list.end(), list ); // put all the lists element into the vector
|
||||
</pre>
|
||||
</div>
|
||||
<span id="example-8"></span><div class="section" id="selected-test-files">
|
||||
<h1><a class="toc-backref" href="#id8" name="selected-test-files">8. Selected test files</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id8" id="selected-test-files" name="selected-test-files"><span id="example-8"></span>8. Selected test files</a></h1>
|
||||
<table class="docutils field-list" frame="void" rules="none">
|
||||
<col class="field-name" />
|
||||
<col class="field-body" />
|
||||
|
||||
321
doc/faq.html
321
doc/faq.html
@@ -3,15 +3,294 @@
|
||||
<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/" />
|
||||
<meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Pointer Container Library</title>
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:Date: $Date$
|
||||
:Revision: $Revision$
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* "! important" is used here to override other ``margin-top`` and
|
||||
``margin-bottom`` styles that are later in the stylesheet or
|
||||
more specific. See http://www.w3.org/TR/CSS1#the-cascade */
|
||||
.first {
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left {
|
||||
clear: left }
|
||||
|
||||
img.align-right {
|
||||
clear: right }
|
||||
|
||||
img.borderless {
|
||||
border: 0 }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
tt.docutils {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</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="faq">FAQ</h2>
|
||||
<div class="contents topic" id="contents">
|
||||
<div class="contents local topic">
|
||||
<ul class="simple">
|
||||
<li><a class="reference" href="#since-a-pointer-container-is-not-copy-constructible-and-assignable-i-cannot-put-them-into-standard-containers-what-do-i-do" id="id4" name="id4">Since a pointer container is not Copy Constructible and Assignable, I cannot put them into standard containers; what do I do?</a></li>
|
||||
<li><a class="reference" href="#calling-assign-is-very-costly-and-i-do-not-really-need-to-store-cloned-objects-i-merely-need-to-overwrite-the-existing-ones-what-do-i-do" id="id5" name="id5">Calling <tt class="docutils literal"><span class="pre">assign()</span></tt> is very costly and I do not really need to store cloned objects; I merely need to overwrite the existing ones; what do I do?</a></li>
|
||||
@@ -24,32 +303,32 @@
|
||||
<li><a class="reference" href="#when-the-stored-pointers-cannot-be-0-how-do-i-allow-this-empty-behavior-anyway" id="id12" name="id12">When the stored pointers cannot be <tt class="docutils literal"><span class="pre">0</span></tt>, how do I allow this "empty" behavior anyway?</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="since-a-pointer-container-is-not-copy-constructible-and-assignable-i-cannot-put-them-into-standard-containers-what-do-i-do">
|
||||
<h1><a class="toc-backref" href="#id4" name="since-a-pointer-container-is-not-copy-constructible-and-assignable-i-cannot-put-them-into-standard-containers-what-do-i-do">Since a pointer container is not Copy Constructible and Assignable, I cannot put them into standard containers; what do I do?</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id4" id="since-a-pointer-container-is-not-copy-constructible-and-assignable-i-cannot-put-them-into-standard-containers-what-do-i-do" name="since-a-pointer-container-is-not-copy-constructible-and-assignable-i-cannot-put-them-into-standard-containers-what-do-i-do">Since a pointer container is not Copy Constructible and Assignable, I cannot put them into standard containers; what do I do?</a></h1>
|
||||
<p>Since they are <a class="reference" href="ptr_container.html#the-clonable-concept">Clonable</a>, you simply put them in a pointer container.</p>
|
||||
</div>
|
||||
<div class="section" id="calling-assign-is-very-costly-and-i-do-not-really-need-to-store-cloned-objects-i-merely-need-to-overwrite-the-existing-ones-what-do-i-do">
|
||||
<h1><a class="toc-backref" href="#id5" name="calling-assign-is-very-costly-and-i-do-not-really-need-to-store-cloned-objects-i-merely-need-to-overwrite-the-existing-ones-what-do-i-do">Calling <tt class="docutils literal docutils literal"><span class="pre">assign()</span></tt> is very costly and I do not really need to store cloned objects; I merely need to overwrite the existing ones; what do I do?</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id5" id="calling-assign-is-very-costly-and-i-do-not-really-need-to-store-cloned-objects-i-merely-need-to-overwrite-the-existing-ones-what-do-i-do" name="calling-assign-is-very-costly-and-i-do-not-really-need-to-store-cloned-objects-i-merely-need-to-overwrite-the-existing-ones-what-do-i-do">Calling <tt class="docutils literal docutils literal"><span class="pre">assign()</span></tt> is very costly and I do not really need to store cloned objects; I merely need to overwrite the existing ones; what do I do?</a></h1>
|
||||
<p>Call <tt class="docutils literal"><span class="pre">std::copy(</span> <span class="pre">first,</span> <span class="pre">last,</span> <span class="pre">c.begin()</span> <span class="pre">);</span></tt>.</p>
|
||||
</div>
|
||||
<div class="section" id="which-mutating-algorithms-are-safe-to-use-with-pointers">
|
||||
<h1><a class="toc-backref" href="#id6" name="which-mutating-algorithms-are-safe-to-use-with-pointers">Which mutating algorithms are safe to use with pointers?</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id6" id="which-mutating-algorithms-are-safe-to-use-with-pointers" name="which-mutating-algorithms-are-safe-to-use-with-pointers">Which mutating algorithms are safe to use with pointers?</a></h1>
|
||||
<p>Any mutating algorithm that moves elements around by swapping them. An
|
||||
important example is <tt class="docutils literal"><span class="pre">std::sort()</span></tt>; examples of unsafe algorithms are
|
||||
<tt class="docutils literal"><span class="pre">std::unique()</span></tt> and <tt class="docutils literal"><span class="pre">std::remove()</span></tt>.</p>
|
||||
<!-- That is why these algorithms are
|
||||
provided as member functions. -->
|
||||
</div>
|
||||
<div class="section" id="why-does-ptr-map-t-insert-replace-take-two-arguments-the-key-and-the-pointer-instead-of-one-std-pair-and-why-is-the-key-passed-by-non-const-reference">
|
||||
<h1><a class="toc-backref" href="#id7" name="why-does-ptr-map-t-insert-replace-take-two-arguments-the-key-and-the-pointer-instead-of-one-std-pair-and-why-is-the-key-passed-by-non-const-reference">Why does <tt class="docutils literal docutils literal"><span class="pre">ptr_map<T>::insert()/replace()</span></tt> take two arguments (the key and the pointer) instead of one <tt class="docutils literal docutils literal"><span class="pre">std::pair</span></tt>? And why is the key passed by non-const reference?</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id7" id="why-does-ptr-map-t-insert-replace-take-two-arguments-the-key-and-the-pointer-instead-of-one-std-pair-and-why-is-the-key-passed-by-non-const-reference" name="why-does-ptr-map-t-insert-replace-take-two-arguments-the-key-and-the-pointer-instead-of-one-std-pair-and-why-is-the-key-passed-by-non-const-reference">Why does <tt class="docutils literal docutils literal"><span class="pre">ptr_map<T>::insert()/replace()</span></tt> take two arguments (the key and the pointer) instead of one <tt class="docutils literal docutils literal"><span class="pre">std::pair</span></tt>? And why is the key passed by non-const reference?</a></h1>
|
||||
<p>This is the only way the function can be implemented in an exception-safe
|
||||
manner; since the copy-constructor of the key might throw, and since
|
||||
function arguments are not guaranteed to be evaluated from left to right,
|
||||
we need to ensure that evaluating the first argument does not throw.
|
||||
Passing the key as a reference achieves just that.</p>
|
||||
</div>
|
||||
<div class="section" id="when-instantiating-a-pointer-container-with-a-type-t-is-t-then-allowed-to-be-incomplete-at-that-point">
|
||||
<h1><a class="toc-backref" href="#id8" name="when-instantiating-a-pointer-container-with-a-type-t-is-t-then-allowed-to-be-incomplete-at-that-point">When instantiating a pointer container with a type <tt class="docutils literal docutils literal"><span class="pre">T</span></tt>, is <tt class="docutils literal docutils literal"><span class="pre">T</span></tt> then allowed to be incomplete at that point?</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id8" id="when-instantiating-a-pointer-container-with-a-type-t-is-t-then-allowed-to-be-incomplete-at-that-point" name="when-instantiating-a-pointer-container-with-a-type-t-is-t-then-allowed-to-be-incomplete-at-that-point">When instantiating a pointer container with a type <tt class="docutils literal docutils literal"><span class="pre">T</span></tt>, is <tt class="docutils literal docutils literal"><span class="pre">T</span></tt> then allowed to be incomplete at that point?</a></h1>
|
||||
<p>No. This is a distinct property of <tt class="docutils literal"><span class="pre">shared_ptr</span></tt> which implies some overhead.</p>
|
||||
<p>However, one can leave <tt class="docutils literal"><span class="pre">T</span></tt> incomplete in the header file:</p>
|
||||
<pre class="literal-block">
|
||||
@@ -68,14 +347,14 @@ class X { ptr_deque<Foo> container; ... }
|
||||
...
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="why-do-iterator-range-inserts-give-the-strong-exception-safety-guarantee">
|
||||
<h1><a class="toc-backref" href="#id9" name="why-do-iterator-range-inserts-give-the-strong-exception-safety-guarantee">Why do iterator-range inserts give the strong exception-safety guarantee?</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id9" id="why-do-iterator-range-inserts-give-the-strong-exception-safety-guarantee" name="why-do-iterator-range-inserts-give-the-strong-exception-safety-guarantee">Why do iterator-range inserts give the strong exception-safety guarantee?</a></h1>
|
||||
<p>Is this not very inefficient? It is because it is actually affordable to
|
||||
do so; the overhead is one heap-allocation which is relatively small
|
||||
compared to cloning N objects.</p>
|
||||
</div>
|
||||
<div class="section" id="what-is-the-polymorphic-class-problem">
|
||||
<h1><a class="toc-backref" href="#id10" name="what-is-the-polymorphic-class-problem">What is the <span class="target" id="polymorphic-class-problem">polymorphic class problem</span>?</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id10" id="what-is-the-polymorphic-class-problem" name="what-is-the-polymorphic-class-problem">What is the <span class="target" id="polymorphic-class-problem">polymorphic class problem</span>?</a></h1>
|
||||
<p>The problem refers to the relatively troublesome way C++ supports Object
|
||||
Oriented programming in connection with containers of pointers to
|
||||
polymorphic objects. In a language without garbage collection, you end up
|
||||
@@ -83,8 +362,8 @@ using either a container of pointer pointers or a container that takes
|
||||
ownership of the pointers. The hard part is to find a safe, fast and
|
||||
elegant solution.</p>
|
||||
</div>
|
||||
<div class="section" id="are-the-pointer-containers-faster-and-do-they-have-a-better-memory-footprint-than-a-container-of-pointer-pointers">
|
||||
<h1><a class="toc-backref" href="#id11" name="are-the-pointer-containers-faster-and-do-they-have-a-better-memory-footprint-than-a-container-of-pointer-pointers">Are the pointer containers faster and do they have a better memory footprint than a container of pointer pointers?</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id11" id="are-the-pointer-containers-faster-and-do-they-have-a-better-memory-footprint-than-a-container-of-pointer-pointers" name="are-the-pointer-containers-faster-and-do-they-have-a-better-memory-footprint-than-a-container-of-pointer-pointers">Are the pointer containers faster and do they have a better memory footprint than a container of pointer pointers?</a></h1>
|
||||
<p>The short answer is yes: they are faster and they do use less memory; in
|
||||
fact, they are the only way to obtain the zero-overhead hallmark of C++.
|
||||
Smart pointers usually have one word or more of memory overhead per
|
||||
@@ -94,8 +373,8 @@ your objects are big, then the memory overhead is often negligible, but if
|
||||
you have many small objects, it is not. Further reading can be found in
|
||||
these references: <a class="reference" href="ptr_container.html#references">[11]</a> and <a class="reference" href="ptr_container.html#references">[12]</a>.</p>
|
||||
</div>
|
||||
<div class="section" id="when-the-stored-pointers-cannot-be-0-how-do-i-allow-this-empty-behavior-anyway">
|
||||
<h1><a class="toc-backref" href="#id12" name="when-the-stored-pointers-cannot-be-0-how-do-i-allow-this-empty-behavior-anyway">When the stored pointers cannot be <tt class="docutils literal docutils literal"><span class="pre">0</span></tt>, how do I allow this "empty" behavior anyway?</a></h1>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id12" id="when-the-stored-pointers-cannot-be-0-how-do-i-allow-this-empty-behavior-anyway" name="when-the-stored-pointers-cannot-be-0-how-do-i-allow-this-empty-behavior-anyway">When the stored pointers cannot be <tt class="docutils literal docutils literal"><span class="pre">0</span></tt>, how do I allow this "empty" behavior anyway?</a></h1>
|
||||
<p>Storing a null-pointer among a list of pointers does not fit well into the Object Oriented paradigm.
|
||||
The most elegant design is to use the Null-Object Pattern where one basically makes a concrete
|
||||
class with dummy implementations of the virtual functions. See <a class="reference" href="ptr_container.html#references">[13]</a> for details.</p>
|
||||
|
||||
@@ -3,9 +3,288 @@
|
||||
<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/" />
|
||||
<meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Pointer Container Library</title>
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:Date: $Date$
|
||||
:Revision: $Revision$
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* "! important" is used here to override other ``margin-top`` and
|
||||
``margin-bottom`` styles that are later in the stylesheet or
|
||||
more specific. See http://www.w3.org/TR/CSS1#the-cascade */
|
||||
.first {
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left {
|
||||
clear: left }
|
||||
|
||||
img.align-right {
|
||||
clear: right }
|
||||
|
||||
img.borderless {
|
||||
border: 0 }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
tt.docutils {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="boost-pointer-container-library">
|
||||
|
||||
283
doc/headers.html
283
doc/headers.html
@@ -3,9 +3,288 @@
|
||||
<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/" />
|
||||
<meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Pointer Container Library</title>
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:Date: $Date$
|
||||
:Revision: $Revision$
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* "! important" is used here to override other ``margin-top`` and
|
||||
``margin-bottom`` styles that are later in the stylesheet or
|
||||
more specific. See http://www.w3.org/TR/CSS1#the-cascade */
|
||||
.first {
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left {
|
||||
clear: left }
|
||||
|
||||
img.align-right {
|
||||
clear: right }
|
||||
|
||||
img.borderless {
|
||||
border: 0 }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
tt.docutils {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="boost-pointer-container-library">
|
||||
|
||||
@@ -3,9 +3,288 @@
|
||||
<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/" />
|
||||
<meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Pointer Container Library</title>
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:Date: $Date$
|
||||
:Revision: $Revision$
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* "! important" is used here to override other ``margin-top`` and
|
||||
``margin-bottom`` styles that are later in the stylesheet or
|
||||
more specific. See http://www.w3.org/TR/CSS1#the-cascade */
|
||||
.first {
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left {
|
||||
clear: left }
|
||||
|
||||
img.align-right {
|
||||
clear: right }
|
||||
|
||||
img.borderless {
|
||||
border: 0 }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
tt.docutils {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="boost-pointer-container-library">
|
||||
|
||||
@@ -3,15 +3,294 @@
|
||||
<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/" />
|
||||
<meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Pointer Container Library</title>
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:Date: $Date$
|
||||
:Revision: $Revision$
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* "! important" is used here to override other ``margin-top`` and
|
||||
``margin-bottom`` styles that are later in the stylesheet or
|
||||
more specific. See http://www.w3.org/TR/CSS1#the-cascade */
|
||||
.first {
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left {
|
||||
clear: left }
|
||||
|
||||
img.align-right {
|
||||
clear: right }
|
||||
|
||||
img.borderless {
|
||||
border: 0 }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
tt.docutils {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="boost-pointer-container-library">
|
||||
<h1 class="title"><img alt="Boost" src="boost.png" /> Pointer Container Library</h1>
|
||||
<div class="section" id="class-ptr-array">
|
||||
<h1><a name="class-ptr-array">Class <tt class="docutils literal"><span class="pre">ptr_array</span></tt></a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="class-ptr-array" name="class-ptr-array">Class <tt class="docutils literal"><span class="pre">ptr_array</span></tt></a></h1>
|
||||
<p>A <tt class="docutils literal"><span class="pre">ptr_array<T,size></span></tt> is a pointer container that uses an underlying <tt class="docutils literal"><span class="pre">boost::array<void*,size></span></tt>
|
||||
to store the pointers. The class is useful when there is no requirement
|
||||
of dynamic expansion and when absolute no overhead is tolerable.</p>
|
||||
@@ -68,7 +347,11 @@ namespace boost
|
||||
|
||||
template< size_t idx >
|
||||
auto_type replace( T* r );
|
||||
template< size_t idx, class U >
|
||||
auto_type replace( std::auto_ptr<U> r );
|
||||
auto_type replace( size_t idx, T* r );
|
||||
template< class U >
|
||||
auto_type replace( size_t idx, std::auto_ptr<U> r );
|
||||
|
||||
public: // <a class="reference" href="#pointer-container-requirements">pointer container requirements</a>
|
||||
std::auto_ptr<ptr_array> clone() const;
|
||||
@@ -82,10 +365,10 @@ namespace boost
|
||||
} // namespace 'boost'
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="semantics">
|
||||
<h1><a name="semantics">Semantics</a></h1>
|
||||
<span id="construct-copy-destroy"></span><div class="section" id="semantics-construct-copy-destroy">
|
||||
<h2><a name="semantics-construct-copy-destroy">Semantics: construct/copy/destroy</a></h2>
|
||||
<div class="section">
|
||||
<h1><a id="semantics" name="semantics">Semantics</a></h1>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-construct-copy-destroy" name="semantics-construct-copy-destroy"><span id="construct-copy-destroy"></span>Semantics: construct/copy/destroy</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">ptr_array();</span></tt></p>
|
||||
<blockquote>
|
||||
@@ -103,8 +386,8 @@ namespace boost
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span id="element-access"></span><div class="section" id="semantics-element-access">
|
||||
<h2><a name="semantics-element-access">Semantics: element access</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-element-access" name="semantics-element-access"><span id="element-access"></span>Semantics: element access</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">T&</span> <span class="pre">front();</span></tt></p>
|
||||
</li>
|
||||
@@ -163,8 +446,8 @@ namespace boost
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span id="modifiers"></span><div class="section" id="semantics-modifiers">
|
||||
<h2><a name="semantics-modifiers">Semantics: modifiers</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-modifiers" name="semantics-modifiers"><span id="modifiers"></span>Semantics: modifiers</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">void</span> <span class="pre">swap(</span> <span class="pre">ptr_array&</span> <span class="pre">r</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
@@ -195,6 +478,13 @@ namespace boost
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">template<</span> <span class="pre">size_t</span> <span class="pre">idx,</span> <span class="pre">class</span> <span class="pre">U</span> <span class="pre">></span> <span class="pre">auto_type</span> <span class="pre">replace(</span> <span class="pre">std::auto_ptr<U></span> <span class="pre">r</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
<li>Effects: <tt class="docutils literal"><span class="pre">return</span> <span class="pre">replace<idx>(</span> <span class="pre">r.release()</span> <span class="pre">);</span></tt></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">auto_type</span> <span class="pre">replace(</span> <span class="pre">size_t</span> <span class="pre">idx,</span> <span class="pre">T*</span> <span class="pre">r</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
@@ -205,10 +495,17 @@ namespace boost
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">template<</span> <span class="pre">class</span> <span class="pre">U</span> <span class="pre">></span> <span class="pre">auto_type</span> <span class="pre">replace(</span> <span class="pre">size_t</span> <span class="pre">idx,</span> <span class="pre">std::auto_ptr<U></span> <span class="pre">r</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
<li>Effects: <tt class="docutils literal"><span class="pre">return</span> <span class="pre">replace(</span> <span class="pre">idx,</span> <span class="pre">r.release()</span> <span class="pre">);</span></tt></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span id="pointer-container-requirements"></span><div class="section" id="semantics-pointer-container-requirements">
|
||||
<h2><a name="semantics-pointer-container-requirements">Semantics: pointer container requirements</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-pointer-container-requirements" name="semantics-pointer-container-requirements"><span id="pointer-container-requirements"></span>Semantics: pointer container requirements</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">std::auto_ptr<ptr_array></span> <span class="pre">clone()</span> <span class="pre">const;</span></tt></p>
|
||||
<blockquote>
|
||||
|
||||
@@ -72,7 +72,11 @@ of dynamic expansion and when absolute no overhead is tolerable.
|
||||
|
||||
template< size_t idx >
|
||||
auto_type replace( T* r );
|
||||
template< size_t idx, class U >
|
||||
auto_type replace( std::auto_ptr<U> r );
|
||||
auto_type replace( size_t idx, T* r );
|
||||
template< class U >
|
||||
auto_type replace( size_t idx, std::auto_ptr<U> r );
|
||||
|
||||
public: // `pointer container requirements`_
|
||||
std::auto_ptr<ptr_array> clone() const;
|
||||
@@ -186,6 +190,10 @@ Semantics: modifiers
|
||||
- Throws: ``bad_pointer`` if ``x == 0``.
|
||||
|
||||
- Exception safety: Strong guarantee
|
||||
|
||||
- ``template< size_t idx, class U > auto_type replace( std::auto_ptr<U> r );``
|
||||
|
||||
- Effects: ``return replace<idx>( r.release() );``
|
||||
|
||||
- ``auto_type replace( size_t idx, T* r );``
|
||||
|
||||
@@ -197,7 +205,10 @@ Semantics: modifiers
|
||||
|
||||
- Exception safety: Strong guarantee
|
||||
|
||||
- ``template< class U > auto_type replace( size_t idx, std::auto_ptr<U> r );``
|
||||
|
||||
- Effects: ``return replace( idx, r.release() );``
|
||||
|
||||
.. _`pointer container requirements`:
|
||||
|
||||
Semantics: pointer container requirements
|
||||
|
||||
@@ -3,12 +3,291 @@
|
||||
<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/" />
|
||||
<meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Pointer Container Library</title>
|
||||
<meta name="author" content="Thorsten Ottosen" />
|
||||
<meta name="date" content="3rd of May 2005" />
|
||||
<meta name="copyright" content="Thorsten Ottosen 2004-2005. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see LICENSE_1_0.txt)." />
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:Date: $Date$
|
||||
:Revision: $Revision$
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* "! important" is used here to override other ``margin-top`` and
|
||||
``margin-bottom`` styles that are later in the stylesheet or
|
||||
more specific. See http://www.w3.org/TR/CSS1#the-cascade */
|
||||
.first {
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left {
|
||||
clear: left }
|
||||
|
||||
img.align-right {
|
||||
clear: right }
|
||||
|
||||
img.borderless {
|
||||
border: 0 }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
tt.docutils {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="boost-pointer-container-library">
|
||||
@@ -29,8 +308,8 @@
|
||||
<td>Thorsten Ottosen 2004-2005. Use, modification and distribution is subject to the Boost Software License, Version 1.0 (see <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">LICENSE_1_0.txt</a>).</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="section" id="overview">
|
||||
<h1><a name="overview">Overview</a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="overview" name="overview">Overview</a></h1>
|
||||
<p>Boost.Pointer Container provides containers for holding heap-allocated
|
||||
objects in an exception-safe manner and with minimal overhead.
|
||||
The aim of the library is in particular to make OO programming
|
||||
@@ -71,8 +350,8 @@ and designs for dealing with OO specific problems</p>
|
||||
<li><a class="reference" href="#references">References</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="motivation">
|
||||
<h1><a name="motivation">Motivation</a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="motivation" name="motivation">Motivation</a></h1>
|
||||
<p>Whenever a programmer wants to have a container of pointers to
|
||||
heap-allocated objects, there is usually only one exception-safe way:
|
||||
to make a container of pointer pointers like <tt class="docutils literal"><span class="pre">boost::shared_ptr</span></tt>.
|
||||
@@ -105,8 +384,8 @@ now it is possible for <tt class="docutils literal"><span class="pre">pop_back()
|
||||
<li>Less flexible than containers of smart pointers like <a class="reference" href="../../smart_ptr/shared_ptr.htm">boost::shared_ptr</a></li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="section" id="acknowledgements">
|
||||
<h1><a name="acknowledgements">Acknowledgements</a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="acknowledgements" name="acknowledgements">Acknowledgements</a></h1>
|
||||
<p>The following people have been very helpful:</p>
|
||||
<ul class="simple">
|
||||
<li>Bjørn D. Rasmussen for unintentionally motivating me to start this library</li>
|
||||
@@ -124,8 +403,8 @@ which is used internally</li>
|
||||
<li>Pavel Chikulaev for comments and bug-fixes</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="references">
|
||||
<h1><a name="references">References</a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="references" name="references">References</a></h1>
|
||||
<table class="docutils footnote" frame="void" id="id6" rules="none">
|
||||
<colgroup><col class="label" /><col /></colgroup>
|
||||
<tbody valign="top">
|
||||
|
||||
@@ -3,15 +3,294 @@
|
||||
<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/" />
|
||||
<meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Pointer Container Library</title>
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:Date: $Date$
|
||||
:Revision: $Revision$
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* "! important" is used here to override other ``margin-top`` and
|
||||
``margin-bottom`` styles that are later in the stylesheet or
|
||||
more specific. See http://www.w3.org/TR/CSS1#the-cascade */
|
||||
.first {
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left {
|
||||
clear: left }
|
||||
|
||||
img.align-right {
|
||||
clear: right }
|
||||
|
||||
img.borderless {
|
||||
border: 0 }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
tt.docutils {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="boost-pointer-container-library">
|
||||
<h1 class="title"><img alt="Boost" src="boost.png" /> Pointer Container Library</h1>
|
||||
<div class="section" id="class-ptr-deque">
|
||||
<h1><a name="class-ptr-deque">Class <tt class="docutils literal"><span class="pre">ptr_deque</span></tt></a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="class-ptr-deque" name="class-ptr-deque">Class <tt class="docutils literal"><span class="pre">ptr_deque</span></tt></a></h1>
|
||||
<p>A <tt class="docutils literal"><span class="pre">ptr_deque<T></span></tt> is a pointer container that uses an underlying <tt class="docutils literal"><span class="pre">std:deque<void*></span></tt>
|
||||
to store the pointers.</p>
|
||||
<p><strong>See also:</strong></p>
|
||||
@@ -51,10 +330,14 @@ namespace boost
|
||||
|
||||
public: // <a class="reference" href="#modifiers">modifiers</a>
|
||||
void push_front( T* x );
|
||||
template< class U >
|
||||
void push_front( std::auto_ptr<U> x );
|
||||
auto_type pop_front();
|
||||
|
||||
public: // <a class="reference" href="#pointer-container-requirements">pointer container requirements</a>
|
||||
auto_type replace( size_type idx, T* x );
|
||||
auto_type replace( size_type idx, T* x );
|
||||
template< class U >
|
||||
auto_type replace( size_type idx, std::auto_ptr<U> x );
|
||||
bool is_null( size_type idx ) const;
|
||||
|
||||
};
|
||||
@@ -62,10 +345,10 @@ namespace boost
|
||||
} // namespace 'boost'
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="semantics">
|
||||
<h1><a name="semantics">Semantics</a></h1>
|
||||
<span id="modifiers"></span><div class="section" id="semantics-modifiers">
|
||||
<h2><a name="semantics-modifiers">Semantics: modifiers</a></h2>
|
||||
<div class="section">
|
||||
<h1><a id="semantics" name="semantics">Semantics</a></h1>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-modifiers" name="semantics-modifiers"><span id="modifiers"></span>Semantics: modifiers</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">void</span> <span class="pre">push_front(</span> <span class="pre">T*</span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
@@ -77,6 +360,13 @@ namespace boost
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">template<</span> <span class="pre">class</span> <span class="pre">U</span> <span class="pre">></span> <span class="pre">void</span> <span class="pre">push_front(</span> <span class="pre">std::auto_ptr<U></span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
<li>Effects: <tt class="docutils literal"><span class="pre">push_front(</span> <span class="pre">x.release()</span> <span class="pre">);</span></tt></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- - ``void push_front( const T& x );``
|
||||
|
||||
@@ -97,8 +387,8 @@ namespace boost
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span id="element-access"></span><div class="section" id="semantics-element-access">
|
||||
<h2><a name="semantics-element-access">Semantics: element access</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-element-access" name="semantics-element-access"><span id="element-access"></span>Semantics: element access</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">T&</span> <span class="pre">operator[](</span> <span class="pre">size_type</span> <span class="pre">n</span> <span class="pre">);</span></tt></p>
|
||||
</li>
|
||||
@@ -124,8 +414,8 @@ namespace boost
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span id="pointer-container-requirements"></span><div class="section" id="semantics-pointer-container-requirements">
|
||||
<h2><a name="semantics-pointer-container-requirements">Semantics: pointer container requirements</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-pointer-container-requirements" name="semantics-pointer-container-requirements"><span id="pointer-container-requirements"></span>Semantics: pointer container requirements</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">auto_type</span> <span class="pre">replace(</span> <span class="pre">size_type</span> <span class="pre">idx,</span> <span class="pre">T*</span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
@@ -137,6 +427,13 @@ namespace boost
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">template<</span> <span class="pre">class</span> <span class="pre">U</span> <span class="pre">></span> <span class="pre">auto_type</span> <span class="pre">replace(</span> <span class="pre">size_type</span> <span class="pre">idx,</span> <span class="pre">std::auto_ptr<U></span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
<li>Effects: <tt class="docutils literal"><span class="pre">return</span> <span class="pre">replace(</span> <span class="pre">idx,</span> <span class="pre">x.release()</span> <span class="pre">);</span></tt></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">bool</span> <span class="pre">is_null(</span> <span class="pre">size_type</span> <span class="pre">idx</span> <span class="pre">)</span> <span class="pre">const;</span></tt></p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
|
||||
@@ -53,10 +53,14 @@ to store the pointers.
|
||||
|
||||
public: // modifiers_
|
||||
void push_front( T* x );
|
||||
template< class U >
|
||||
void push_front( std::auto_ptr<U> x );
|
||||
auto_type pop_front();
|
||||
|
||||
public: // `pointer container requirements`_
|
||||
auto_type replace( size_type idx, T* x );
|
||||
auto_type replace( size_type idx, T* x );
|
||||
template< class U >
|
||||
auto_type replace( size_type idx, std::auto_ptr<U> x );
|
||||
bool is_null( size_type idx ) const;
|
||||
|
||||
};
|
||||
@@ -86,6 +90,9 @@ Semantics: modifiers
|
||||
|
||||
- Exception safety: Strong guarantee
|
||||
|
||||
- ``template< class U > void push_front( std::auto_ptr<U> x );``
|
||||
|
||||
- Effects: ``push_front( x.release() );``
|
||||
|
||||
..
|
||||
- ``void push_front( const T& x );``
|
||||
@@ -145,6 +152,10 @@ Semantics: pointer container requirements
|
||||
- Throws: ``bad_index`` if ``idx >= size()`` and ``bad_pointer`` if ``x == 0``.
|
||||
|
||||
- Exception safety: Strong guarantee
|
||||
|
||||
- ``template< class U > auto_type replace( size_type idx, std::auto_ptr<U> x );``
|
||||
|
||||
- Effects: ``return replace( idx, x.release() );``
|
||||
|
||||
- ``bool is_null( size_type idx ) const;``
|
||||
|
||||
|
||||
@@ -3,15 +3,294 @@
|
||||
<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/" />
|
||||
<meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Pointer Container Library</title>
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:Date: $Date$
|
||||
:Revision: $Revision$
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* "! important" is used here to override other ``margin-top`` and
|
||||
``margin-bottom`` styles that are later in the stylesheet or
|
||||
more specific. See http://www.w3.org/TR/CSS1#the-cascade */
|
||||
.first {
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left {
|
||||
clear: left }
|
||||
|
||||
img.align-right {
|
||||
clear: right }
|
||||
|
||||
img.borderless {
|
||||
border: 0 }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
tt.docutils {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="boost-pointer-container-library">
|
||||
<h1 class="title"><img alt="Boost" src="boost.png" /> Pointer Container Library</h1>
|
||||
<div class="section" id="class-ptr-vector">
|
||||
<h1><a name="class-ptr-vector">Class <tt class="docutils literal"><span class="pre">ptr_vector</span></tt></a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="class-ptr-list" name="class-ptr-list">Class <tt class="docutils literal"><span class="pre">ptr_list</span></tt></a></h1>
|
||||
<p>A <tt class="docutils literal"><span class="pre">ptr_list<T></span></tt> is a pointer container that uses an underlying <tt class="docutils literal"><span class="pre">std:list<void*></span></tt>
|
||||
to store the pointers.</p>
|
||||
<p><strong>See also:</strong></p>
|
||||
@@ -45,6 +324,8 @@ namespace boost
|
||||
|
||||
public: // <a class="reference" href="#modifiers">modifiers</a>
|
||||
void push_front( T* x );
|
||||
template< class U >
|
||||
void push_front( std::auto_ptr<U> x );
|
||||
auto_type pop_front();
|
||||
|
||||
public: // <a class="reference" href="#list-operations">list operations</a>
|
||||
@@ -55,10 +336,10 @@ namespace boost
|
||||
} // namespace 'boost'
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="semantics">
|
||||
<h1><a name="semantics">Semantics</a></h1>
|
||||
<span id="modifiers"></span><div class="section" id="semantics-modifiers">
|
||||
<h2><a name="semantics-modifiers">Semantics: modifiers</a></h2>
|
||||
<div class="section">
|
||||
<h1><a id="semantics" name="semantics">Semantics</a></h1>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-modifiers" name="semantics-modifiers"><span id="modifiers"></span>Semantics: modifiers</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">void</span> <span class="pre">push_front(</span> <span class="pre">T*</span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
@@ -70,6 +351,13 @@ namespace boost
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">template<</span> <span class="pre">class</span> <span class="pre">U</span> <span class="pre">></span> <span class="pre">void</span> <span class="pre">push_front(</span> <span class="pre">std::auto_ptr<U></span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
<li>Effects: <tt class="docutils literal"><span class="pre">push_front(</span> <span class="pre">x.release()</span> <span class="pre">);</span></tt></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- - ``void push_front( const T& x );``
|
||||
|
||||
@@ -90,8 +378,8 @@ namespace boost
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span id="list-operations"></span><div class="section" id="semantics-list-operations">
|
||||
<h2><a name="semantics-list-operations">Semantics: list operations</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-list-operations" name="semantics-list-operations"><span id="list-operations"></span>Semantics: list operations</a></h2>
|
||||
<!-- - ``void splice( iterator before, ptr_list& x );``
|
||||
|
||||
- Requirements:``&x != this``
|
||||
|
||||
@@ -48,6 +48,8 @@ to store the pointers.
|
||||
|
||||
public: // modifiers_
|
||||
void push_front( T* x );
|
||||
template< class U >
|
||||
void push_front( std::auto_ptr<U> x );
|
||||
auto_type pop_front();
|
||||
|
||||
public: // `list operations`_
|
||||
@@ -76,6 +78,10 @@ Semantics: modifiers
|
||||
|
||||
- Exception safety: Strong guarantee
|
||||
|
||||
- ``template< class U > void push_front( std::auto_ptr<U> x );``
|
||||
|
||||
- Effects: ``push_front( x.release() );``
|
||||
|
||||
..
|
||||
- ``void push_front( const T& x );``
|
||||
|
||||
|
||||
283
doc/ptr_map.html
283
doc/ptr_map.html
@@ -3,9 +3,288 @@
|
||||
<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/" />
|
||||
<meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Pointer Container Library</title>
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:Date: $Date$
|
||||
:Revision: $Revision$
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* "! important" is used here to override other ``margin-top`` and
|
||||
``margin-bottom`` styles that are later in the stylesheet or
|
||||
more specific. See http://www.w3.org/TR/CSS1#the-cascade */
|
||||
.first {
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left {
|
||||
clear: left }
|
||||
|
||||
img.align-right {
|
||||
clear: right }
|
||||
|
||||
img.borderless {
|
||||
border: 0 }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
tt.docutils {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="boost-pointer-container-library">
|
||||
|
||||
@@ -3,15 +3,294 @@
|
||||
<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/" />
|
||||
<meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Pointer Container Library</title>
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:Date: $Date$
|
||||
:Revision: $Revision$
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* "! important" is used here to override other ``margin-top`` and
|
||||
``margin-bottom`` styles that are later in the stylesheet or
|
||||
more specific. See http://www.w3.org/TR/CSS1#the-cascade */
|
||||
.first {
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left {
|
||||
clear: left }
|
||||
|
||||
img.align-right {
|
||||
clear: right }
|
||||
|
||||
img.borderless {
|
||||
border: 0 }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
tt.docutils {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="boost-pointer-container-library">
|
||||
<h1 class="title"><img alt="Boost" src="boost.png" /> Pointer Container Library</h1>
|
||||
<div class="section" id="class-ptr-map-adapter">
|
||||
<h1><a name="class-ptr-map-adapter">Class <tt class="docutils literal"><span class="pre">ptr_map_adapter</span></tt></a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="class-ptr-map-adapter" name="class-ptr-map-adapter">Class <tt class="docutils literal"><span class="pre">ptr_map_adapter</span></tt></a></h1>
|
||||
<p>This class is used to build custom pointer containers with
|
||||
an underlying map-like container. The interface of the class is an extension
|
||||
of the interface from <tt class="docutils literal"><span class="pre">associative_ptr_container</span></tt>.</p>
|
||||
@@ -41,7 +320,9 @@ namespace boost
|
||||
{
|
||||
|
||||
public: // <a class="reference" href="#modifiers">modifiers</a>
|
||||
std::pair<iterator,bool> insert( key_type& k, value_type x );
|
||||
std::pair<iterator,bool> insert( key_type& k, T* x );
|
||||
template< class U >
|
||||
std::pair<iterator,bool> insert( const key_type& k, std::auto_ptr<U> x );
|
||||
|
||||
public; // <a class="reference" href="#lookup">lookup</a>
|
||||
T& operator[]( const key_type& key );
|
||||
@@ -60,10 +341,10 @@ namespace boost
|
||||
} // namespace 'boost'
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="semantics">
|
||||
<h1><a name="semantics">Semantics</a></h1>
|
||||
<span id="modifiers"></span><div class="section" id="semantics-modifiers">
|
||||
<h2><a name="semantics-modifiers">Semantics: modifiers</a></h2>
|
||||
<div class="section">
|
||||
<h1><a id="semantics" name="semantics">Semantics</a></h1>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-modifiers" name="semantics-modifiers"><span id="modifiers"></span>Semantics: modifiers</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">std::pair<iterator,bool></span> <span class="pre">insert(</span> <span class="pre">key_type&</span> <span class="pre">k,</span> <span class="pre">value_type</span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
@@ -75,6 +356,13 @@ namespace boost
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">template<</span> <span class="pre">class</span> <span class="pre">U</span> <span class="pre">></span> <span class="pre">std::pair<iterator,bool></span> <span class="pre">insert(</span> <span class="pre">const</span> <span class="pre">key_type&</span> <span class="pre">k,</span> <span class="pre">std::auto_ptr<U></span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
<li>Equivalent to (but without the <tt class="docutils literal"><span class="pre">const_cast</span></tt>): <tt class="docutils literal"><span class="pre">return</span> <span class="pre">insert(</span> <span class="pre">const_cast<key_type&>(k),</span> <span class="pre">x.release()</span> <span class="pre">);</span></tt></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- - ``std::pair<iterator,bool> insert( key_type& k, const_reference x );``
|
||||
|
||||
@@ -82,8 +370,8 @@ namespace boost
|
||||
|
||||
- Exception safety: Strong guarantee -->
|
||||
</div>
|
||||
<span id="lookup"></span><div class="section" id="semantics-lookup">
|
||||
<h2><a name="semantics-lookup">Semantics: lookup</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-lookup" name="semantics-lookup"><span id="lookup"></span>Semantics: lookup</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">T&</span> <span class="pre">operator[](</span> <span class="pre">const</span> <span class="pre">key_type&</span> <span class="pre">key</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
@@ -105,8 +393,8 @@ namespace boost
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span id="pointer-container-requirements"></span><div class="section" id="semantics-pointer-container-requirements">
|
||||
<h2><a name="semantics-pointer-container-requirements">Semantics: pointer container requirements</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-pointer-container-requirements" name="semantics-pointer-container-requirements"><span id="pointer-container-requirements"></span>Semantics: pointer container requirements</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">bool</span> <span class="pre">transfer(</span> <span class="pre">iterator</span> <span class="pre">object,</span> <span class="pre">ptr_map_adapter&</span> <span class="pre">from</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
|
||||
@@ -44,7 +44,9 @@ of the interface from ``associative_ptr_container``.
|
||||
{
|
||||
|
||||
public: // `modifiers`_
|
||||
std::pair<iterator,bool> insert( key_type& k, value_type x );
|
||||
std::pair<iterator,bool> insert( key_type& k, T* x );
|
||||
template< class U >
|
||||
std::pair<iterator,bool> insert( const key_type& k, std::auto_ptr<U> x );
|
||||
|
||||
public; // `lookup`_
|
||||
T& operator[]( const key_type& key );
|
||||
@@ -82,6 +84,10 @@ Semantics: modifiers
|
||||
- Exception safety: Strong guarantee
|
||||
|
||||
|
||||
- ``template< class U > std::pair<iterator,bool> insert( const key_type& k, std::auto_ptr<U> x );``
|
||||
|
||||
- Equivalent to (but without the ``const_cast``): ``return insert( const_cast<key_type&>(k), x.release() );``
|
||||
|
||||
..
|
||||
- ``std::pair<iterator,bool> insert( key_type& k, const_reference x );``
|
||||
|
||||
|
||||
@@ -3,9 +3,288 @@
|
||||
<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/" />
|
||||
<meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Pointer Container Library</title>
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:Date: $Date$
|
||||
:Revision: $Revision$
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* "! important" is used here to override other ``margin-top`` and
|
||||
``margin-bottom`` styles that are later in the stylesheet or
|
||||
more specific. See http://www.w3.org/TR/CSS1#the-cascade */
|
||||
.first {
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left {
|
||||
clear: left }
|
||||
|
||||
img.align-right {
|
||||
clear: right }
|
||||
|
||||
img.borderless {
|
||||
border: 0 }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
tt.docutils {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="boost-pointer-container-library">
|
||||
|
||||
@@ -3,15 +3,294 @@
|
||||
<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/" />
|
||||
<meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Pointer Container Library</title>
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:Date: $Date$
|
||||
:Revision: $Revision$
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* "! important" is used here to override other ``margin-top`` and
|
||||
``margin-bottom`` styles that are later in the stylesheet or
|
||||
more specific. See http://www.w3.org/TR/CSS1#the-cascade */
|
||||
.first {
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left {
|
||||
clear: left }
|
||||
|
||||
img.align-right {
|
||||
clear: right }
|
||||
|
||||
img.borderless {
|
||||
border: 0 }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
tt.docutils {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="boost-pointer-container-library">
|
||||
<h1 class="title"><img alt="Boost" src="boost.png" /> Pointer Container Library</h1>
|
||||
<div class="section" id="class-ptr-multimap-adapter">
|
||||
<h1><a name="class-ptr-multimap-adapter">Class <tt class="docutils literal"><span class="pre">ptr_multimap_adapter</span></tt></a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="class-ptr-multimap-adapter" name="class-ptr-multimap-adapter">Class <tt class="docutils literal"><span class="pre">ptr_multimap_adapter</span></tt></a></h1>
|
||||
<p>This class is used to build custom pointer containers with
|
||||
an underlying multimap-like container. The interface of the class is an extension
|
||||
of the interface from <tt class="docutils literal"><span class="pre">associative_ptr_container</span></tt>.</p>
|
||||
@@ -41,7 +320,9 @@ namespace boost
|
||||
{
|
||||
|
||||
public: // <a class="reference" href="#modifiers">modifiers</a>
|
||||
iterator insert( key_type& k, T* x );
|
||||
iterator insert( key_type& k, T* x );
|
||||
template< class U >
|
||||
iterator insert( const key_type&, std::auto_ptr<U> x );
|
||||
|
||||
public: // <a class="reference" href="#pointer-container-requirements">pointer container requirements</a>
|
||||
void transfer( iterator object, ptr_multimap_adapter& from );
|
||||
@@ -55,10 +336,10 @@ namespace boost
|
||||
} // namespace 'boost'
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="semantics">
|
||||
<h1><a name="semantics">Semantics</a></h1>
|
||||
<span id="modifiers"></span><div class="section" id="semantics-modifiers">
|
||||
<h2><a name="semantics-modifiers">Semantics: modifiers</a></h2>
|
||||
<div class="section">
|
||||
<h1><a id="semantics" name="semantics">Semantics</a></h1>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-modifiers" name="semantics-modifiers"><span id="modifiers"></span>Semantics: modifiers</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">iterator</span> <span class="pre">insert(</span> <span class="pre">key_type&</span> <span class="pre">k,</span> <span class="pre">T*</span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
@@ -70,6 +351,13 @@ namespace boost
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">template<</span> <span class="pre">class</span> <span class="pre">U</span> <span class="pre">></span> <span class="pre">iterator</span> <span class="pre">insert(</span> <span class="pre">const</span> <span class="pre">key_type&</span> <span class="pre">k,</span> <span class="pre">std::auto_ptr<U></span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
<li>Equivalent to (but without the <tt class="docutils literal"><span class="pre">const_cast</span></tt>): <tt class="docutils literal"><span class="pre">return</span> <span class="pre">insert(</span> <span class="pre">const_cast<key_type&>(k),</span> <span class="pre">x.release()</span> <span class="pre">);</span></tt></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- - ``iterator insert( key_type& k, const_reference x );``
|
||||
|
||||
@@ -88,8 +376,8 @@ namespace boost
|
||||
|
||||
- Throws: ``bad_ptr_container_operation`` if the key does not exist -->
|
||||
</div>
|
||||
<span id="pointer-container-requirements"></span><div class="section" id="semantics-pointer-container-requirements">
|
||||
<h2><a name="semantics-pointer-container-requirements">Semantics: pointer container requirements</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-pointer-container-requirements" name="semantics-pointer-container-requirements"><span id="pointer-container-requirements"></span>Semantics: pointer container requirements</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">void</span> <span class="pre">transfer(</span> <span class="pre">iterator</span> <span class="pre">object,</span> <span class="pre">ptr_multimap_adapter&</span> <span class="pre">from</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
|
||||
@@ -45,7 +45,9 @@ __ ptr_container.html#map-iterator-operations
|
||||
{
|
||||
|
||||
public: // `modifiers`_
|
||||
iterator insert( key_type& k, T* x );
|
||||
iterator insert( key_type& k, T* x );
|
||||
template< class U >
|
||||
iterator insert( const key_type&, std::auto_ptr<U> x );
|
||||
|
||||
public: // `pointer container requirements`_
|
||||
void transfer( iterator object, ptr_multimap_adapter& from );
|
||||
@@ -77,6 +79,9 @@ Semantics: modifiers
|
||||
|
||||
- Exception safety: Strong guarantee
|
||||
|
||||
- ``template< class U > iterator insert( const key_type& k, std::auto_ptr<U> x );``
|
||||
|
||||
- Equivalent to (but without the ``const_cast``): ``return insert( const_cast<key_type&>(k), x.release() );``
|
||||
|
||||
..
|
||||
- ``iterator insert( key_type& k, const_reference x );``
|
||||
|
||||
@@ -3,9 +3,288 @@
|
||||
<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/" />
|
||||
<meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Pointer Container Library</title>
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:Date: $Date$
|
||||
:Revision: $Revision$
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* "! important" is used here to override other ``margin-top`` and
|
||||
``margin-bottom`` styles that are later in the stylesheet or
|
||||
more specific. See http://www.w3.org/TR/CSS1#the-cascade */
|
||||
.first {
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left {
|
||||
clear: left }
|
||||
|
||||
img.align-right {
|
||||
clear: right }
|
||||
|
||||
img.borderless {
|
||||
border: 0 }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
tt.docutils {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="boost-pointer-container-library">
|
||||
|
||||
@@ -3,15 +3,294 @@
|
||||
<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/" />
|
||||
<meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Pointer Container Library</title>
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:Date: $Date$
|
||||
:Revision: $Revision$
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* "! important" is used here to override other ``margin-top`` and
|
||||
``margin-bottom`` styles that are later in the stylesheet or
|
||||
more specific. See http://www.w3.org/TR/CSS1#the-cascade */
|
||||
.first {
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left {
|
||||
clear: left }
|
||||
|
||||
img.align-right {
|
||||
clear: right }
|
||||
|
||||
img.borderless {
|
||||
border: 0 }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
tt.docutils {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="boost-pointer-container-library">
|
||||
<h1 class="title"><img alt="Boost" src="boost.png" /> Pointer Container Library</h1>
|
||||
<div class="section" id="class-ptr-multiset-adapter">
|
||||
<h1><a name="class-ptr-multiset-adapter">Class <tt class="docutils literal"><span class="pre">ptr_multiset_adapter</span></tt></a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="class-ptr-multiset-adapter" name="class-ptr-multiset-adapter">Class <tt class="docutils literal"><span class="pre">ptr_multiset_adapter</span></tt></a></h1>
|
||||
<p>This class is used to build custom pointer containers with
|
||||
an underlying multiset-like container. The interface of the class is an extension
|
||||
of the interface from <tt class="docutils literal"><span class="pre">associative_ptr_container</span></tt>.</p>
|
||||
@@ -40,7 +319,9 @@ namespace boost
|
||||
{
|
||||
|
||||
public: // <a class="reference" href="#modifiers">modifiers</a>
|
||||
iterator insert( Key* x );
|
||||
iterator insert( Key* x );
|
||||
template< class Key2 >
|
||||
iterator insert( std::auto_ptr<Key2> x );
|
||||
|
||||
public: // <a class="reference" href="#pointer-container-requirements">pointer container requirements</a>
|
||||
void transfer( iterator object, ptr_multiset_adapter& from );
|
||||
@@ -54,10 +335,10 @@ namespace boost
|
||||
} // namespace 'boost'
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="semantics">
|
||||
<h1><a name="semantics">Semantics</a></h1>
|
||||
<span id="modifiers"></span><div class="section" id="semantics-modifiers">
|
||||
<h2><a name="semantics-modifiers">Semantics: modifiers</a></h2>
|
||||
<div class="section">
|
||||
<h1><a id="semantics" name="semantics">Semantics</a></h1>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-modifiers" name="semantics-modifiers"><span id="modifiers"></span>Semantics: modifiers</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">iterator</span> <span class="pre">insert(</span> <span class="pre">key_type*</span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
@@ -69,6 +350,13 @@ namespace boost
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">template<</span> <span class="pre">class</span> <span class="pre">Key2</span> <span class="pre">></span> <span class="pre">iterator</span> <span class="pre">insert(</span> <span class="pre">std::auto_ptr<Key2></span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
<li>Effects: <tt class="docutils literal"><span class="pre">return</span> <span class="pre">insert(</span> <span class="pre">x.release()</span> <span class="pre">);</span></tt></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- - ``iterator insert( const key_type& x );``
|
||||
|
||||
@@ -76,8 +364,8 @@ namespace boost
|
||||
|
||||
- Exception safety: Strong guarantee -->
|
||||
</div>
|
||||
<span id="pointer-container-requirements"></span><div class="section" id="semantics-pointer-container-requirements">
|
||||
<h2><a name="semantics-pointer-container-requirements">Semantics: pointer container requirements</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-pointer-container-requirements" name="semantics-pointer-container-requirements"><span id="pointer-container-requirements"></span>Semantics: pointer container requirements</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">void</span> <span class="pre">transfer(</span> <span class="pre">iterator</span> <span class="pre">object,</span> <span class="pre">ptr_multiset_adapter&</span> <span class="pre">from</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
|
||||
@@ -43,7 +43,9 @@ of the interface from ``associative_ptr_container``.
|
||||
{
|
||||
|
||||
public: // `modifiers`_
|
||||
iterator insert( Key* x );
|
||||
iterator insert( Key* x );
|
||||
template< class Key2 >
|
||||
iterator insert( std::auto_ptr<Key2> x );
|
||||
|
||||
public: // `pointer container requirements`_
|
||||
void transfer( iterator object, ptr_multiset_adapter& from );
|
||||
@@ -75,6 +77,11 @@ Semantics: modifiers
|
||||
|
||||
- Exception safety: Strong guarantee
|
||||
|
||||
|
||||
- ``template< class Key2 > iterator insert( std::auto_ptr<Key2> x );``
|
||||
|
||||
- Effects: ``return insert( x.release() );``
|
||||
|
||||
..
|
||||
- ``iterator insert( const key_type& x );``
|
||||
|
||||
|
||||
@@ -3,15 +3,294 @@
|
||||
<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/" />
|
||||
<meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Pointer Container Library</title>
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:Date: $Date$
|
||||
:Revision: $Revision$
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* "! important" is used here to override other ``margin-top`` and
|
||||
``margin-bottom`` styles that are later in the stylesheet or
|
||||
more specific. See http://www.w3.org/TR/CSS1#the-cascade */
|
||||
.first {
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left {
|
||||
clear: left }
|
||||
|
||||
img.align-right {
|
||||
clear: right }
|
||||
|
||||
img.borderless {
|
||||
border: 0 }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
tt.docutils {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="boost-pointer-container-library">
|
||||
<h1 class="title"><img alt="Boost" src="boost.png" /> Pointer Container Library</h1>
|
||||
<div class="section" id="class-ptr-sequence-adapter">
|
||||
<h1><a name="class-ptr-sequence-adapter">Class <tt class="docutils literal"><span class="pre">ptr_sequence_adapter</span></tt></a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="class-ptr-sequence-adapter" name="class-ptr-sequence-adapter">Class <tt class="docutils literal"><span class="pre">ptr_sequence_adapter</span></tt></a></h1>
|
||||
<p>This section describes all the common operations for all the pointer
|
||||
sequences:</p>
|
||||
<ul class="simple">
|
||||
@@ -57,8 +336,12 @@ namespace boost
|
||||
|
||||
public: // <a class="reference" href="#modifiers">modifiers</a>
|
||||
void push_back( T* x );
|
||||
template< class U >
|
||||
void push_back( std::auto_ptr<U> x );
|
||||
auto_type pop_back();
|
||||
iterator insert( iterator position, T* x );
|
||||
template< class U >
|
||||
iterator insert( iterator position, std::auto_ptr<U> x );
|
||||
template< class InputIterator >
|
||||
void insert( iterator position, InputIterator first, InputIterator last );
|
||||
template< class InputRange >
|
||||
@@ -117,10 +400,10 @@ namespace boost
|
||||
} // namespace 'boost'
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="semantics">
|
||||
<h1><a name="semantics">Semantics</a></h1>
|
||||
<span id="construct-copy-destroy"></span><div class="section" id="semantics-construct-copy-destroy">
|
||||
<h2><a name="semantics-construct-copy-destroy">Semantics: construct/copy/destroy</a></h2>
|
||||
<div class="section">
|
||||
<h1><a id="semantics" name="semantics">Semantics</a></h1>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-construct-copy-destroy" name="semantics-construct-copy-destroy"><span id="construct-copy-destroy"></span>Semantics: construct/copy/destroy</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">template<</span> <span class="pre">class</span> <span class="pre">InputIterator</span> <span class="pre">></span>
|
||||
<span class="pre">void</span> <span class="pre">assign(</span> <span class="pre">InputIterator</span> <span class="pre">first,</span> <span class="pre">InputIterator</span> <span class="pre">last</span> <span class="pre">);</span></tt></p>
|
||||
@@ -163,8 +446,8 @@ Postconditions: size() == sz
|
||||
|
||||
Exception safety: Strong guarantee -->
|
||||
</div>
|
||||
<span id="element-access"></span><div class="section" id="semantics-element-access">
|
||||
<h2><a name="semantics-element-access">Semantics: element access</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-element-access" name="semantics-element-access"><span id="element-access"></span>Semantics: element access</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">T&</span> <span class="pre">front();</span></tt></p>
|
||||
<blockquote>
|
||||
@@ -204,8 +487,8 @@ Exception safety: Strong guarantee -->
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span id="modifiers"></span><div class="section" id="semantics-modifiers">
|
||||
<h2><a name="semantics-modifiers">Semantics: modifiers</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-modifiers" name="semantics-modifiers"><span id="modifiers"></span>Semantics: modifiers</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">void</span> <span class="pre">push_back(</span> <span class="pre">T*</span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
@@ -217,6 +500,13 @@ Exception safety: Strong guarantee -->
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">template<</span> <span class="pre">class</span> <span class="pre">U</span> <span class="pre">></span> <span class="pre">void</span> <span class="pre">push_back(</span> <span class="pre">std::auto_ptr<U></span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
<li>Effects: <tt class="docutils literal"><span class="pre">push_back(</span> <span class="pre">x.release()</span> <span class="pre">);</span></tt></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- - ``void push_back( const T& x );``
|
||||
|
||||
@@ -246,6 +536,13 @@ Exception safety: Strong guarantee -->
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">template<</span> <span class="pre">class</span> <span class="pre">U</span> <span class="pre">></span> <span class="pre">iterator</span> <span class="pre">insert(</span> <span class="pre">iterator</span> <span class="pre">position,</span> <span class="pre">std::auto_ptr<U></span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
<li>Effects: <tt class="docutils literal"><span class="pre">return</span> <span class="pre">insert(</span> <span class="pre">position,</span> <span class="pre">x.release()</span> <span class="pre">);</span></tt></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- - ``iterator insert( iterator position, const T& x );``
|
||||
|
||||
@@ -309,8 +606,8 @@ Exception safety: Strong guarantee -->
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span id="pointer-container-requirements"></span><div class="section" id="semantics-pointer-container-requirements">
|
||||
<h2><a name="semantics-pointer-container-requirements">Semantics: pointer container requirements</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-pointer-container-requirements" name="semantics-pointer-container-requirements"><span id="pointer-container-requirements"></span>Semantics: pointer container requirements</a></h2>
|
||||
<p>You cannot use <tt class="docutils literal"><span class="pre">transfer()</span></tt> to move elements between two
|
||||
different types of containers. This is to avoid
|
||||
problems with different allocators. The requirement might be
|
||||
@@ -357,8 +654,8 @@ takes place before <tt class="docutils literal"><span class="pre">before</span><
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span id="algorithms"></span><div class="section" id="semantics-algorithms">
|
||||
<h2><a name="semantics-algorithms">Semantics: algorithms</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-algorithms" name="semantics-algorithms"><span id="algorithms"></span>Semantics: algorithms</a></h2>
|
||||
<p>The general requirement for these algorithms is that the container <em>does not
|
||||
contain any nulls</em>.</p>
|
||||
<ul>
|
||||
|
||||
@@ -63,8 +63,12 @@ __ reversible_ptr_container.html
|
||||
|
||||
public: // `modifiers`_
|
||||
void push_back( T* x );
|
||||
template< class U >
|
||||
void push_back( std::auto_ptr<U> x );
|
||||
auto_type pop_back();
|
||||
iterator insert( iterator position, T* x );
|
||||
template< class U >
|
||||
iterator insert( iterator position, std::auto_ptr<U> x );
|
||||
template< class InputIterator >
|
||||
void insert( iterator position, InputIterator first, InputIterator last );
|
||||
template< class InputRange >
|
||||
@@ -230,6 +234,10 @@ Semantics: modifiers
|
||||
|
||||
- Exception safety: Strong guarantee
|
||||
|
||||
- ``template< class U > void push_back( std::auto_ptr<U> x );``
|
||||
|
||||
- Effects: ``push_back( x.release() );``
|
||||
|
||||
..
|
||||
- ``void push_back( const T& x );``
|
||||
|
||||
@@ -260,6 +268,10 @@ Semantics: modifiers
|
||||
- Throws: ``bad_pointer`` if ``x == 0``
|
||||
|
||||
- Exception safety: Strong guarantee
|
||||
|
||||
- ``template< class U > iterator insert( iterator position, std::auto_ptr<U> x );``
|
||||
|
||||
- Effects: ``return insert( position, x.release() );``
|
||||
|
||||
..
|
||||
- ``iterator insert( iterator position, const T& x );``
|
||||
|
||||
283
doc/ptr_set.html
283
doc/ptr_set.html
@@ -3,9 +3,288 @@
|
||||
<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/" />
|
||||
<meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Pointer Container Library</title>
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:Date: $Date$
|
||||
:Revision: $Revision$
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* "! important" is used here to override other ``margin-top`` and
|
||||
``margin-bottom`` styles that are later in the stylesheet or
|
||||
more specific. See http://www.w3.org/TR/CSS1#the-cascade */
|
||||
.first {
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left {
|
||||
clear: left }
|
||||
|
||||
img.align-right {
|
||||
clear: right }
|
||||
|
||||
img.borderless {
|
||||
border: 0 }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
tt.docutils {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="boost-pointer-container-library">
|
||||
|
||||
@@ -3,15 +3,294 @@
|
||||
<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/" />
|
||||
<meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Pointer Container Library</title>
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:Date: $Date$
|
||||
:Revision: $Revision$
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* "! important" is used here to override other ``margin-top`` and
|
||||
``margin-bottom`` styles that are later in the stylesheet or
|
||||
more specific. See http://www.w3.org/TR/CSS1#the-cascade */
|
||||
.first {
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left {
|
||||
clear: left }
|
||||
|
||||
img.align-right {
|
||||
clear: right }
|
||||
|
||||
img.borderless {
|
||||
border: 0 }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
tt.docutils {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="boost-pointer-container-library">
|
||||
<h1 class="title"><img alt="Boost" src="boost.png" /> Pointer Container Library</h1>
|
||||
<div class="section" id="class-ptr-set-adapter">
|
||||
<h1><a name="class-ptr-set-adapter">Class <tt class="docutils literal"><span class="pre">ptr_set_adapter</span></tt></a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="class-ptr-set-adapter" name="class-ptr-set-adapter">Class <tt class="docutils literal"><span class="pre">ptr_set_adapter</span></tt></a></h1>
|
||||
<p>This class is used to build custom pointer containers with
|
||||
an underlying set-like container. The interface of the class is an extension
|
||||
of the interface from <tt class="docutils literal"><span class="pre">associative_ptr_container</span></tt>.</p>
|
||||
@@ -40,7 +319,9 @@ namespace boost
|
||||
{
|
||||
|
||||
public: // <a class="reference" href="#modifiers">modifiers</a>
|
||||
std::pair<iterator,bool> insert( Key* x );
|
||||
std::pair<iterator,bool> insert( Key* x );
|
||||
template< class Key2 >
|
||||
std::pair<iterator,bool> insert( std::auto_ptr<Key2> x );
|
||||
|
||||
public: // <a class="reference" href="#pointer-container-requirements">pointer container requirements</a>
|
||||
bool transfer( iterator object, ptr_set_adapter& from );
|
||||
@@ -54,10 +335,10 @@ namespace boost
|
||||
} // namespace 'boost'
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="semantics">
|
||||
<h1><a name="semantics">Semantics</a></h1>
|
||||
<span id="modifiers"></span><div class="section" id="semantics-modifiers">
|
||||
<h2><a name="semantics-modifiers">Semantics: modifiers</a></h2>
|
||||
<div class="section">
|
||||
<h1><a id="semantics" name="semantics">Semantics</a></h1>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-modifiers" name="semantics-modifiers"><span id="modifiers"></span>Semantics: modifiers</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">std::pair<iterator,bool></span> <span class="pre">insert(</span> <span class="pre">key_type*</span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
@@ -69,6 +350,13 @@ namespace boost
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">template<</span> <span class="pre">class</span> <span class="pre">Key2</span> <span class="pre">></span> <span class="pre">std::pair<iterator,bool></span> <span class="pre">insert(</span> <span class="pre">std::auto_ptr<Key2></span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
<li>Effects: <tt class="docutils literal"><span class="pre">return</span> <span class="pre">insert(</span> <span class="pre">x.release()</span> <span class="pre">);</span></tt></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- - ``std::pair<iterator,bool> insert( const key_type& x );``
|
||||
|
||||
@@ -76,8 +364,8 @@ namespace boost
|
||||
|
||||
- Exception safety: Strong guarantee -->
|
||||
</div>
|
||||
<span id="pointer-container-requirements"></span><div class="section" id="semantics-pointer-container-requirements">
|
||||
<h2><a name="semantics-pointer-container-requirements">Semantics: pointer container requirements</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-pointer-container-requirements" name="semantics-pointer-container-requirements"><span id="pointer-container-requirements"></span>Semantics: pointer container requirements</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">bool</span> <span class="pre">transfer(</span> <span class="pre">iterator</span> <span class="pre">object,</span> <span class="pre">ptr_set_adapter&</span> <span class="pre">from</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
|
||||
@@ -43,7 +43,9 @@ of the interface from ``associative_ptr_container``.
|
||||
{
|
||||
|
||||
public: // `modifiers`_
|
||||
std::pair<iterator,bool> insert( Key* x );
|
||||
std::pair<iterator,bool> insert( Key* x );
|
||||
template< class Key2 >
|
||||
std::pair<iterator,bool> insert( std::auto_ptr<Key2> x );
|
||||
|
||||
public: // `pointer container requirements`_
|
||||
bool transfer( iterator object, ptr_set_adapter& from );
|
||||
@@ -74,6 +76,11 @@ Semantics: modifiers
|
||||
- Throws: bad_pointer if ``x == 0``
|
||||
|
||||
- Exception safety: Strong guarantee
|
||||
|
||||
- ``template< class Key2 > std::pair<iterator,bool> insert( std::auto_ptr<Key2> x );``
|
||||
|
||||
- Effects: ``return insert( x.release() );``
|
||||
|
||||
|
||||
..
|
||||
- ``std::pair<iterator,bool> insert( const key_type& x );``
|
||||
|
||||
@@ -3,15 +3,294 @@
|
||||
<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/" />
|
||||
<meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Pointer Container Library</title>
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:Date: $Date$
|
||||
:Revision: $Revision$
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* "! important" is used here to override other ``margin-top`` and
|
||||
``margin-bottom`` styles that are later in the stylesheet or
|
||||
more specific. See http://www.w3.org/TR/CSS1#the-cascade */
|
||||
.first {
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left {
|
||||
clear: left }
|
||||
|
||||
img.align-right {
|
||||
clear: right }
|
||||
|
||||
img.borderless {
|
||||
border: 0 }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
tt.docutils {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="boost-pointer-container-library">
|
||||
<h1 class="title"><img alt="Boost" src="boost.png" /> Pointer Container Library</h1>
|
||||
<div class="section" id="class-ptr-vector">
|
||||
<h1><a name="class-ptr-vector">Class <tt class="docutils literal"><span class="pre">ptr_vector</span></tt></a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="class-ptr-vector" name="class-ptr-vector">Class <tt class="docutils literal"><span class="pre">ptr_vector</span></tt></a></h1>
|
||||
<p>A <tt class="docutils literal"><span class="pre">ptr_vector<T></span></tt> is a pointer container that uses an underlying <tt class="docutils literal"><span class="pre">std::vector<void*></span></tt>
|
||||
to store the pointers.</p>
|
||||
<p><strong>See also:</strong></p>
|
||||
@@ -57,17 +336,19 @@ namespace boost
|
||||
const T& at( size_type n ) const;
|
||||
|
||||
public: // <a class="reference" href="#pointer-container-requirements">pointer container requirements</a>
|
||||
auto_type replace( size_type idx, T* x );
|
||||
auto_type replace( size_type idx, T* x );
|
||||
template< class U >
|
||||
auto_type replace( size_type idx, std::auto_ptr<U> x );
|
||||
bool is_null( size_type idx ) const;
|
||||
};
|
||||
|
||||
} // namespace 'boost'
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="semantics">
|
||||
<h1><a name="semantics">Semantics</a></h1>
|
||||
<span id="construction"></span><div class="section" id="semantics-construction">
|
||||
<h2><a name="semantics-construction">Semantics: construction</a></h2>
|
||||
<div class="section">
|
||||
<h1><a id="semantics" name="semantics">Semantics</a></h1>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-construction" name="semantics-construction"><span id="construction"></span>Semantics: construction</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">ptr_vector(</span> <span class="pre">size_type</span> <span class="pre">to_reserve</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
@@ -79,8 +360,8 @@ of size least <tt class="docutils literal"><span class="pre">to_reserve</span></
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span id="capacity"></span><div class="section" id="semantics-capacity">
|
||||
<h2><a name="semantics-capacity">Semantics: capacity</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-capacity" name="semantics-capacity"><span id="capacity"></span>Semantics: capacity</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">size_type</span> <span class="pre">capacity()</span> <span class="pre">const;</span></tt></p>
|
||||
<blockquote>
|
||||
@@ -102,8 +383,8 @@ of size least <tt class="docutils literal"><span class="pre">to_reserve</span></
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span id="element-access"></span><div class="section" id="semantics-element-access">
|
||||
<h2><a name="semantics-element-access">Semantics: element access</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-element-access" name="semantics-element-access"><span id="element-access"></span>Semantics: element access</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">T&</span> <span class="pre">operator[](</span> <span class="pre">size_type</span> <span class="pre">n</span> <span class="pre">);</span></tt></p>
|
||||
</li>
|
||||
@@ -123,14 +404,14 @@ of size least <tt class="docutils literal"><span class="pre">to_reserve</span></
|
||||
<ul class="simple">
|
||||
<li>Requirements: <tt class="docutils literal"><span class="pre">n</span> <span class="pre"><</span> <span class="pre">size()</span></tt></li>
|
||||
<li>Effects: Returns a reference to the <tt class="docutils literal"><span class="pre">n</span></tt>'th element</li>
|
||||
<li>Throws: <tt class="docutils literal"><span class="pre">bad_index</span></tt> if <tt class="docutils literal"><span class="pre">n</span> <span class="pre">>=size()</span></tt></li>
|
||||
<li>Throws: <tt class="docutils literal"><span class="pre">bad_index</span></tt> if <tt class="docutils literal"><span class="pre">n</span> <span class="pre">>=</span> <span class="pre">size()</span></tt></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span id="pointer-container-requirements"></span><div class="section" id="semantics-pointer-container-requirements">
|
||||
<h2><a name="semantics-pointer-container-requirements">Semantics: pointer container requirements</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-pointer-container-requirements" name="semantics-pointer-container-requirements"><span id="pointer-container-requirements"></span>Semantics: pointer container requirements</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">auto_type</span> <span class="pre">replace(</span> <span class="pre">size_type</span> <span class="pre">idx,</span> <span class="pre">T*</span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
@@ -142,6 +423,13 @@ of size least <tt class="docutils literal"><span class="pre">to_reserve</span></
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">template<</span> <span class="pre">class</span> <span class="pre">U</span> <span class="pre">></span> <span class="pre">auto_type</span> <span class="pre">replace(</span> <span class="pre">size_type</span> <span class="pre">idx,</span> <span class="pre">std::auto_ptr<U></span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
<li>Effects: <tt class="docutils literal"><span class="pre">return</span> <span class="pre">replace(</span> <span class="pre">idx,</span> <span class="pre">x.release()</span> <span class="pre">);</span></tt></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">bool</span> <span class="pre">is_null(</span> <span class="pre">size_type</span> <span class="pre">idx</span> <span class="pre">)</span> <span class="pre">const;</span></tt></p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
|
||||
@@ -59,7 +59,9 @@ to store the pointers.
|
||||
const T& at( size_type n ) const;
|
||||
|
||||
public: // `pointer container requirements`_
|
||||
auto_type replace( size_type idx, T* x );
|
||||
auto_type replace( size_type idx, T* x );
|
||||
template< class U >
|
||||
auto_type replace( size_type idx, std::auto_ptr<U> x );
|
||||
bool is_null( size_type idx ) const;
|
||||
};
|
||||
|
||||
@@ -122,7 +124,7 @@ Semantics: element access
|
||||
|
||||
- Effects: Returns a reference to the ``n``'th element
|
||||
|
||||
- Throws: ``bad_index`` if ``n >=size()``
|
||||
- Throws: ``bad_index`` if ``n >= size()``
|
||||
|
||||
|
||||
.. _`pointer container requirements`:
|
||||
@@ -140,6 +142,10 @@ Semantics: pointer container requirements
|
||||
|
||||
- Exception safety: Strong guarantee
|
||||
|
||||
- ``template< class U > auto_type replace( size_type idx, std::auto_ptr<U> x );``
|
||||
|
||||
- Effects: ``return replace( idx, x.release() );``
|
||||
|
||||
- ``bool is_null( size_type idx ) const;``
|
||||
|
||||
- Requirements: ``idx < size()``
|
||||
|
||||
@@ -3,9 +3,288 @@
|
||||
<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/" />
|
||||
<meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Pointer Container Library</title>
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:Date: $Date$
|
||||
:Revision: $Revision$
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* "! important" is used here to override other ``margin-top`` and
|
||||
``margin-bottom`` styles that are later in the stylesheet or
|
||||
more specific. See http://www.w3.org/TR/CSS1#the-cascade */
|
||||
.first {
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left {
|
||||
clear: left }
|
||||
|
||||
img.align-right {
|
||||
clear: right }
|
||||
|
||||
img.borderless {
|
||||
border: 0 }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
tt.docutils {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="boost-pointer-container-library">
|
||||
@@ -50,8 +329,8 @@ the <a class="reference" href="reference.html#the-clone-allocator-concept">Clone
|
||||
<li><a class="reference" href="#class-nullable">Class nullable</a></li>
|
||||
<li><a class="reference" href="#exception-classes">Exception classes</a></li>
|
||||
</ul>
|
||||
<div class="section" id="the-clonable-concept">
|
||||
<h1><a name="the-clonable-concept">The Clonable concept</a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="the-clonable-concept" name="the-clonable-concept">The Clonable concept</a></h1>
|
||||
<p><strong>Refinement of</strong></p>
|
||||
<ul class="simple">
|
||||
<li>Copy Constructible</li>
|
||||
@@ -105,8 +384,8 @@ the containers does not even require the stored type to be Clonable.</p>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="section" id="default-implementation">
|
||||
<h2><a name="default-implementation">Default implementation</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="default-implementation" name="default-implementation">Default implementation</a></h2>
|
||||
<p>In the <tt class="docutils literal"><span class="pre"><boost/ptr_container/clone_allocator.hpp></span></tt> header a default implementation
|
||||
of the two functions is given:</p>
|
||||
<pre class="literal-block">
|
||||
@@ -136,23 +415,23 @@ the rest of the interface of the class. If you are implementing a class
|
||||
inline in headers, remember to forward declare the functions.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="the-clone-allocator-concept">
|
||||
<h1><a name="the-clone-allocator-concept">The Clone Allocator concept</a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="the-clone-allocator-concept" name="the-clone-allocator-concept">The Clone Allocator concept</a></h1>
|
||||
<p>The Clone Allocator concept is introduced to formalize the way
|
||||
pointer containers controls memory of
|
||||
the stored objects (and not the pointers to the stored objects).
|
||||
The clone allocator allows
|
||||
users to apply custom allocators/deallocators for the cloned objects.</p>
|
||||
<p>More information can be found below:</p>
|
||||
<div class="contents topic" id="contents">
|
||||
<div class="contents local topic">
|
||||
<ul class="simple">
|
||||
<li><a class="reference" href="#clone-allocator-requirements" id="id14" name="id14">Clone Allocator requirements</a></li>
|
||||
<li><a class="reference" href="#class-heap-clone-allocator" id="id15" name="id15">Class <tt class="docutils literal"><span class="pre">heap_clone_allocator</span></tt></a></li>
|
||||
<li><a class="reference" href="#class-view-clone-allocator" id="id16" name="id16">Class <tt class="docutils literal"><span class="pre">view_clone_allocator</span></tt></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="clone-allocator-requirements">
|
||||
<h2><a class="toc-backref" href="#id14" name="clone-allocator-requirements">Clone Allocator requirements</a></h2>
|
||||
<div class="section">
|
||||
<h2><a class="toc-backref" href="#id14" id="clone-allocator-requirements" name="clone-allocator-requirements">Clone Allocator requirements</a></h2>
|
||||
<p><strong>Notation</strong></p>
|
||||
<table border="1" class="docutils">
|
||||
<colgroup>
|
||||
@@ -199,8 +478,8 @@ users to apply custom allocators/deallocators for the cloned objects.</p>
|
||||
</table>
|
||||
<p>The library comes with two predefined clone allocators.</p>
|
||||
</div>
|
||||
<div class="section" id="class-heap-clone-allocator">
|
||||
<h2><a class="toc-backref" href="#id15" name="class-heap-clone-allocator">Class <tt class="docutils literal docutils literal"><span class="pre">heap_clone_allocator</span></tt></a></h2>
|
||||
<div class="section">
|
||||
<h2><a class="toc-backref" href="#id15" id="class-heap-clone-allocator" name="class-heap-clone-allocator">Class <tt class="docutils literal docutils literal"><span class="pre">heap_clone_allocator</span></tt></a></h2>
|
||||
<p>This is the default clone allocator used by all pointer containers. For most
|
||||
purposes you will never have to change this default.</p>
|
||||
<p><strong>Definition</strong></p>
|
||||
@@ -226,8 +505,8 @@ namespace boost
|
||||
<p>Notice that the above definition allows you to support custom allocation
|
||||
schemes by relying on <tt class="docutils literal"><span class="pre">new_clone()</span></tt> and <tt class="docutils literal"><span class="pre">delete_clone()</span></tt>.</p>
|
||||
</div>
|
||||
<div class="section" id="class-view-clone-allocator">
|
||||
<h2><a class="toc-backref" href="#id16" name="class-view-clone-allocator">Class <tt class="docutils literal docutils literal"><span class="pre">view_clone_allocator</span></tt></a></h2>
|
||||
<div class="section">
|
||||
<h2><a class="toc-backref" href="#id16" id="class-view-clone-allocator" name="class-view-clone-allocator">Class <tt class="docutils literal docutils literal"><span class="pre">view_clone_allocator</span></tt></a></h2>
|
||||
<p>This class provides a way to remove ownership properties of the
|
||||
pointer containers. As its name implies, this means that you can
|
||||
instead use the pointer containers as a view into an existing
|
||||
@@ -258,8 +537,8 @@ namespace boost
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="pointer-container-adapters">
|
||||
<h1><a name="pointer-container-adapters">Pointer container adapters</a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="pointer-container-adapters" name="pointer-container-adapters">Pointer container adapters</a></h1>
|
||||
<p>The pointer container adapters are used when you
|
||||
want to make a pointer container starting from
|
||||
your own "normal" container. For example, you
|
||||
@@ -277,13 +556,13 @@ of standard container:</p>
|
||||
<li><a class="reference" href="ptr_multimap_adapter.html">ptr_multimap_adapter</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="pointer-containers">
|
||||
<h1><a name="pointer-containers">Pointer containers</a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="pointer-containers" name="pointer-containers">Pointer containers</a></h1>
|
||||
<p>The pointer containers of this library are all built using
|
||||
the <a class="reference" href="#pointer-container-adapters">pointer container adapters</a>. There is a pointer container
|
||||
for each type of "normal" standard container:</p>
|
||||
<div class="section" id="sequence-containers">
|
||||
<h2><a name="sequence-containers">Sequence containers</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="sequence-containers" name="sequence-containers">Sequence containers</a></h2>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
<li><a class="reference" href="ptr_vector.html">ptr_vector</a></li>
|
||||
@@ -293,8 +572,8 @@ for each type of "normal" standard container:</p>
|
||||
</ul>
|
||||
</blockquote>
|
||||
</div>
|
||||
<div class="section" id="associative-containers">
|
||||
<h2><a name="associative-containers">Associative containers</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="associative-containers" name="associative-containers">Associative containers</a></h2>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
<li><a class="reference" href="ptr_set.html">ptr_set</a></li>
|
||||
@@ -305,8 +584,8 @@ for each type of "normal" standard container:</p>
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="map-iterator-operations">
|
||||
<h1><a name="map-iterator-operations">Map iterator operations</a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="map-iterator-operations" name="map-iterator-operations">Map iterator operations</a></h1>
|
||||
<p>The map iterators are a bit different compared to the normal ones. The
|
||||
reason is that it is a bit clumsy to access the key and the mapped object
|
||||
through i->first and i->second, and one tends to forget what is what.
|
||||
@@ -330,8 +609,8 @@ for( map_t::iterator i = m.begin(); i != m.end(); ++i )
|
||||
<li>that the key can be accessed through the <tt class="docutils literal"><span class="pre">key()</span></tt> function.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="class-nullable">
|
||||
<h1><a name="class-nullable">Class <tt class="docutils literal"><span class="pre">nullable</span></tt></a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="class-nullable" name="class-nullable">Class <tt class="docutils literal"><span class="pre">nullable</span></tt></a></h1>
|
||||
<p>The purpose of the class is simply to tell the containers
|
||||
that null values should be allowed. Its definition is
|
||||
trivial:</p>
|
||||
@@ -354,8 +633,8 @@ vec.push_back( new boost::nullable<T> ); // no no
|
||||
boost::nullable<T>& ref = vec[0]; // also no no
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="exception-classes">
|
||||
<h1><a name="exception-classes">Exception classes</a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="exception-classes" name="exception-classes">Exception classes</a></h1>
|
||||
<p>There are three exceptions that are thrown by this library. The exception
|
||||
hierarchy looks as follows:</p>
|
||||
<pre class="literal-block">
|
||||
|
||||
@@ -3,15 +3,294 @@
|
||||
<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/" />
|
||||
<meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Pointer Container Library</title>
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:Date: $Date$
|
||||
:Revision: $Revision$
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* "! important" is used here to override other ``margin-top`` and
|
||||
``margin-bottom`` styles that are later in the stylesheet or
|
||||
more specific. See http://www.w3.org/TR/CSS1#the-cascade */
|
||||
.first {
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left {
|
||||
clear: left }
|
||||
|
||||
img.align-right {
|
||||
clear: right }
|
||||
|
||||
img.borderless {
|
||||
border: 0 }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
tt.docutils {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="boost-pointer-container-library">
|
||||
<h1 class="title"><img alt="Boost" src="boost.png" /> Pointer Container Library</h1>
|
||||
<div class="section" id="class-reversible-ptr-container">
|
||||
<h1><a name="class-reversible-ptr-container">Class <tt class="docutils literal"><span class="pre">reversible_ptr_container</span></tt></a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="class-reversible-ptr-container" name="class-reversible-ptr-container">Class <tt class="docutils literal"><span class="pre">reversible_ptr_container</span></tt></a></h1>
|
||||
<p>This class is not a real class that can be found in the library.
|
||||
Its purpose is to present the general interface of all the pointer containers.</p>
|
||||
<p><strong>Navigate:</strong></p>
|
||||
@@ -74,7 +353,9 @@ namespace boost
|
||||
|
||||
public: // <a class="reference" href="#pointer-container-requirements">pointer container requirements</a>
|
||||
|
||||
auto_type replace( iterator position, T* x );
|
||||
auto_type replace( iterator position, T* x );
|
||||
template< class U >
|
||||
auto_type replace( iterator position, std::auto_ptr<U> x );
|
||||
std::auto_ptr<reversible_ptr_container> clone() const;
|
||||
std::auto_ptr<reversible_ptr_container> release();
|
||||
auto_type release( iterator position );
|
||||
@@ -122,10 +403,10 @@ namespace boost
|
||||
} // namespace 'boost'
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="semantics">
|
||||
<h1><a name="semantics">Semantics</a></h1>
|
||||
<span id="typedefs"></span><div class="section" id="semantics-typedefs">
|
||||
<h2><a name="semantics-typedefs">Semantics: typedefs</a></h2>
|
||||
<div class="section">
|
||||
<h1><a id="semantics" name="semantics">Semantics</a></h1>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-typedefs" name="semantics-typedefs"><span id="typedefs"></span>Semantics: typedefs</a></h2>
|
||||
<p>Notice how these two types differ:</p>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">typedef</span> <span class="pre">T*</span> <span class="pre">value_type;</span></tt></p>
|
||||
@@ -175,8 +456,8 @@ T* release();
|
||||
<p>The destructor will delete the stored object. It might help to
|
||||
think it is just an <tt class="docutils literal"><span class="pre">std::auto_ptr<T></span></tt>.</p>
|
||||
</div>
|
||||
<span id="construct-copy-destroy"></span><div class="section" id="semantics-construct-copy-destroy">
|
||||
<h2><a name="semantics-construct-copy-destroy">Semantics: construct/copy/destroy</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-construct-copy-destroy" name="semantics-construct-copy-destroy"><span id="construct-copy-destroy"></span>Semantics: construct/copy/destroy</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">reversible_ptr_container();</span></tt></p>
|
||||
<blockquote>
|
||||
@@ -235,8 +516,8 @@ think it is just an <tt class="docutils literal"><span class="pre">std::auto_ptr
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span id="iterators"></span><div class="section" id="semantics-iterators">
|
||||
<h2><a name="semantics-iterators">Semantics: iterators</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-iterators" name="semantics-iterators"><span id="iterators"></span>Semantics: iterators</a></h2>
|
||||
<p><strong>See also:</strong> <a class="reference" href="conventions.html#iterators-are-invalidated-as-in-the-corresponding-standard-container">iterator invalidation</a></p>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">iterator</span> <span class="pre">begin();</span></tt></p>
|
||||
@@ -281,8 +562,8 @@ think it is just an <tt class="docutils literal"><span class="pre">std::auto_ptr
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span id="capacity"></span><div class="section" id="semantics-capacity">
|
||||
<h2><a name="semantics-capacity">Semantics: capacity</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-capacity" name="semantics-capacity"><span id="capacity"></span>Semantics: capacity</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">size_type</span> <span class="pre">size()</span> <span class="pre">const;</span></tt></p>
|
||||
<blockquote>
|
||||
@@ -310,8 +591,8 @@ think it is just an <tt class="docutils literal"><span class="pre">std::auto_ptr
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span id="modifiers"></span><div class="section" id="semantics-modifiers">
|
||||
<h2><a name="semantics-modifiers">Semantics: modifiers</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-modifiers" name="semantics-modifiers"><span id="modifiers"></span>Semantics: modifiers</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">void</span> <span class="pre">swap(</span> <span class="pre">reversible_ptr_container&</span> <span class="pre">r</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
@@ -332,8 +613,8 @@ think it is just an <tt class="docutils literal"><span class="pre">std::auto_ptr
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span id="pointer-container-requirements"></span><div class="section" id="semantics-pointer-container-requirements">
|
||||
<h2><a name="semantics-pointer-container-requirements">Semantics: pointer container requirements</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-pointer-container-requirements" name="semantics-pointer-container-requirements"><span id="pointer-container-requirements"></span>Semantics: pointer container requirements</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">auto_type</span> <span class="pre">replace(</span> <span class="pre">iterator</span> <span class="pre">position,</span> <span class="pre">T*</span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
@@ -345,6 +626,13 @@ think it is just an <tt class="docutils literal"><span class="pre">std::auto_ptr
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">template<class</span> <span class="pre">U></span> <span class="pre">auto_type</span> <span class="pre">replace(</span> <span class="pre">iterator</span> <span class="pre">position,</span> <span class="pre">std::auto_ptr<U></span> <span class="pre">x</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
<li>Effects: <tt class="docutils literal"><span class="pre">return</span> <span class="pre">replace(</span> <span class="pre">position,</span> <span class="pre">x.release()</span> <span class="pre">)</span></tt></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
</li>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">std::auto_ptr<</span> <span class="pre">reversible_ptr_container</span> <span class="pre">></span> <span class="pre">clone()</span> <span class="pre">const;</span></tt></p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
@@ -377,8 +665,8 @@ think it is just an <tt class="docutils literal"><span class="pre">std::auto_ptr
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span id="comparison"></span><div class="section" id="semantics-comparison">
|
||||
<h2><a name="semantics-comparison">Semantics: comparison</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-comparison" name="semantics-comparison"><span id="comparison"></span>Semantics: comparison</a></h2>
|
||||
<p>These functions compare the underlying range of objects.
|
||||
So</p>
|
||||
<pre class="literal-block">
|
||||
@@ -387,8 +675,8 @@ operation( const ptr_container& l, const ptr_container& r );
|
||||
<p>has the effect one would expect of normal standard containers. Hence
|
||||
objects are compared and not the pointers to objects.</p>
|
||||
</div>
|
||||
<span id="clonability"></span><div class="section" id="semantics-clonability">
|
||||
<h2><a name="semantics-clonability">Semantics: clonability</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-clonability" name="semantics-clonability"><span id="clonability"></span>Semantics: clonability</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">template<</span> <span class="pre">class</span> <span class="pre">T,</span> <span class="pre">class</span> <span class="pre">CloneAllocator</span> <span class="pre">></span>
|
||||
<span class="pre">reversible_ptr_container<T,CA,VPC>*</span>
|
||||
@@ -403,8 +691,8 @@ objects are compared and not the pointers to objects.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<span id="null-predicate"></span><div class="section" id="semantics-null-predicate">
|
||||
<h2><a name="semantics-null-predicate">Semantics: null predicate</a></h2>
|
||||
<div class="section">
|
||||
<h2><a id="semantics-null-predicate" name="semantics-null-predicate"><span id="null-predicate"></span>Semantics: null predicate</a></h2>
|
||||
<ul>
|
||||
<li><p class="first"><tt class="docutils literal"><span class="pre">template<</span> <span class="pre">class</span> <span class="pre">Iterator</span> <span class="pre">></span> <span class="pre">bool</span> <span class="pre">is_null(</span> <span class="pre">Iterator</span> <span class="pre">i</span> <span class="pre">);</span></tt></p>
|
||||
<blockquote>
|
||||
|
||||
@@ -72,7 +72,9 @@ Its purpose is to present the general interface of all the pointer containers.
|
||||
|
||||
public: // `pointer container requirements`_
|
||||
|
||||
auto_type replace( iterator position, T* x );
|
||||
auto_type replace( iterator position, T* x );
|
||||
template< class U >
|
||||
auto_type replace( iterator position, std::auto_ptr<U> x );
|
||||
std::auto_ptr<reversible_ptr_container> clone() const;
|
||||
std::auto_ptr<reversible_ptr_container> release();
|
||||
auto_type release( iterator position );
|
||||
@@ -319,6 +321,10 @@ Semantics: pointer container requirements
|
||||
- Throws: ``bad_ptr_container_operation`` if the container is empty and ``bad_pointer`` if ``x == 0``.
|
||||
|
||||
- Exception safety: Strong guarantee
|
||||
|
||||
- ``template< class U > auto_type replace( iterator position, std::auto_ptr<U> x );``
|
||||
|
||||
- Effects: ``return replace( position, x.release() );``
|
||||
|
||||
- ``std::auto_ptr< reversible_ptr_container > clone() const;``
|
||||
|
||||
|
||||
46
doc/todo.txt
46
doc/todo.txt
@@ -1,40 +1,34 @@
|
||||
Hi,
|
||||
|
||||
-------------------
|
||||
2. add new ptr_map typedefs
|
||||
|
||||
10) Specify difference between assignment from an input_iterator (basic exception safety guarantee)
|
||||
and any other iterator (strong exception safety guarantee). Provide a iterator wrapper
|
||||
which implement the input_iterator concept to achieve that particular performance characteristic:
|
||||
vector.assign( fast_copy_iterator( other.begin() ), other.end() );
|
||||
3. remove ptr_map iterators description
|
||||
|
||||
20) Add two sources and a discussion on defaults: http://www.gotw.ca/gotw/054.htm, http://www.codeproject.com/vcpp/stl/vector_vs_deque.asp
|
||||
4. ptr_map definition
|
||||
|
||||
45) update all functions with correct exception specs
|
||||
5. small usage exmaple with each class
|
||||
|
||||
46) add description to erase() which returns end in some circumstances
|
||||
7. update concept for clonable: typeid(x) == typeid(clone)
|
||||
|
||||
47) Consider if list implemetation of multi-insert can benefit
|
||||
from strong exception-safety.
|
||||
|
||||
74) consider simple static assert by nesting a typedef a la
|
||||
T::boost_indirect_container
|
||||
8. use static class hierarchy to ease navigation
|
||||
|
||||
74.5) a new function in map: auto_type replace( key&, T* );?
|
||||
9. guidelines on good OO programming:
|
||||
|
||||
75) toturial:
|
||||
1. base classes abstract
|
||||
|
||||
2. make virtuals private
|
||||
|
||||
ptr_map:
|
||||
3. derive from boost::copyable
|
||||
|
||||
add default constructor
|
||||
4. don't allow nulls if you can avoid it, Null Object
|
||||
|
||||
map[ "foo" ].set_data( "Bla bla", 6 );
|
||||
10. update tutorial to show boost::assign link
|
||||
|
||||
boost.assign -support:
|
||||
11. should find_key() be added to ptr_map?
|
||||
|
||||
ptr_insert( ptr_map )( "foo", "bla bla", 3 )
|
||||
( "bar", "foo", 3 );
|
||||
|
||||
|
||||
12. serialization
|
||||
|
||||
76) use boost::get_pointer() to retrieve
|
||||
the pointer withint dereferenceing.
|
||||
13. no exceptions
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,9 +3,288 @@
|
||||
<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/" />
|
||||
<meta name="generator" content="Docutils 0.3.10: http://docutils.sourceforge.net/" />
|
||||
<title>Boost Pointer Container Library</title>
|
||||
<link rel="stylesheet" href="default.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger
|
||||
:Contact: goodger@users.sourceforge.net
|
||||
:Date: $Date$
|
||||
:Revision: $Revision$
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* "! important" is used here to override other ``margin-top`` and
|
||||
``margin-bottom`` styles that are later in the stylesheet or
|
||||
more specific. See http://www.w3.org/TR/CSS1#the-cascade */
|
||||
.first {
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin-left: 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left {
|
||||
clear: left }
|
||||
|
||||
img.align-right {
|
||||
clear: right }
|
||||
|
||||
img.borderless {
|
||||
border: 0 }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.line-block {
|
||||
font-family: serif ;
|
||||
font-size: 100% }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em ;
|
||||
background-color: #eeeeee }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid thin gray }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid thin black }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
tt.docutils {
|
||||
background-color: #eeeeee }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="boost-pointer-container-library">
|
||||
@@ -26,8 +305,8 @@ that you read it all from top to bottom.</p>
|
||||
<li><a class="reference" href="#new-functions">New functions</a></li>
|
||||
<li><a class="reference" href="#algorithms">Algorithms</a></li>
|
||||
</ul>
|
||||
<div class="section" id="basic-usage">
|
||||
<h1><a name="basic-usage">Basic usage</a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="basic-usage" name="basic-usage">Basic usage</a></h1>
|
||||
<p>The most important aspect of a pointer container is that it manages
|
||||
memory for you. This means that you in most cases do not need to worry
|
||||
about deleting memory.</p>
|
||||
@@ -76,8 +355,8 @@ the_zoo.add_animal( new bird("dodo") );
|
||||
<p>Thus we heap-allocate all elements of the container
|
||||
and never rely on copy-semantics.</p>
|
||||
</div>
|
||||
<div class="section" id="indirected-interface">
|
||||
<h1><a name="indirected-interface">Indirected interface</a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="indirected-interface" name="indirected-interface">Indirected interface</a></h1>
|
||||
<p>As particular feature of the pointer containers is that
|
||||
the query interface is indirected. For example,</p>
|
||||
<pre class="literal-block">
|
||||
@@ -101,8 +380,8 @@ ptr_vec::iterator i = vec.begin();
|
||||
i->eat(); // no indirection needed
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="sequence-containers">
|
||||
<h1><a name="sequence-containers">Sequence containers</a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="sequence-containers" name="sequence-containers">Sequence containers</a></h1>
|
||||
<p>The sequence containers used when you do not need to
|
||||
keep an ordering on your elements. You can basically
|
||||
expect all operations of the normal standard containers
|
||||
@@ -129,8 +408,8 @@ boost::ptr_vector<animal> animals( 10u );
|
||||
</pre>
|
||||
<p>will reserve room for 10 animals.</p>
|
||||
</div>
|
||||
<div class="section" id="associative-containers">
|
||||
<h1><a name="associative-containers">Associative containers</a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="associative-containers" name="associative-containers">Associative containers</a></h1>
|
||||
<p>To keep an ordering on our animals, we could use a <tt class="docutils literal"><span class="pre">ptr_set</span></tt>:</p>
|
||||
<pre class="literal-block">
|
||||
boost::ptr_set<animal> set;
|
||||
@@ -176,8 +455,8 @@ animals["bobo"].set_name("bobo");
|
||||
<p>This requires a default constructor for animals and
|
||||
a function to do the initialization, in this case <tt class="docutils literal"><span class="pre">set_name()</span></tt>;</p>
|
||||
</div>
|
||||
<div class="section" id="null-values">
|
||||
<h1><a name="null-values">Null values</a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="null-values" name="null-values">Null values</a></h1>
|
||||
<p>By default, if you try to insert null into a container, an exception
|
||||
is thrown. If you want to allow nulls, then you must
|
||||
say so explicitly when declaring the container variable</p>
|
||||
@@ -210,8 +489,8 @@ for( animals_type::size_type i = 0u;
|
||||
<p>Note that it is meaningless to insert
|
||||
null into <tt class="docutils literal"><span class="pre">ptr_set</span></tt> and <tt class="docutils literal"><span class="pre">ptr_multiset</span></tt>.</p>
|
||||
</div>
|
||||
<div class="section" id="clonability">
|
||||
<h1><a name="clonability">Clonability</a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="clonability" name="clonability">Clonability</a></h1>
|
||||
<p>In OO programming it is typical to prohibit copying of objects; the
|
||||
objects may sometimes be allowed to be clonable; for example,:</p>
|
||||
<pre class="literal-block">
|
||||
@@ -249,8 +528,8 @@ another_zoo.insert( another_zoo.begin(), zoo.begin(), zoo.end() );
|
||||
zoo_type yet_another_zoo = zoo.clone();
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="new-functions">
|
||||
<h1><a name="new-functions">New functions</a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="new-functions" name="new-functions">New functions</a></h1>
|
||||
<p>Given that we know we are working with pointers, a few new functions
|
||||
make sense. For example, say you want to remove an
|
||||
animal from the zoo</p>
|
||||
@@ -321,8 +600,8 @@ catch( boost::bad_ptr_container_operation& e )
|
||||
}
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="algorithms">
|
||||
<h1><a name="algorithms">Algorithms</a></h1>
|
||||
<div class="section">
|
||||
<h1><a id="algorithms" name="algorithms">Algorithms</a></h1>
|
||||
<p>Unfortunately it is not possible to use pointer containers with
|
||||
mutating algorithms from the standard library. However,
|
||||
the most useful ones
|
||||
|
||||
Reference in New Issue
Block a user