|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r54669 - in sandbox/cloneable/libs/cloneable/doc: . html html/cloneable html/cloneable/heterogenous_containers html/cloneable/tutorial
From: christian.schladetsch_at_[hidden]
Date: 2009-07-05 06:45:07
Author: cschladetsch
Date: 2009-07-05 06:45:06 EDT (Sun, 05 Jul 2009)
New Revision: 54669
URL: http://svn.boost.org/trac/boost/changeset/54669
Log:
updated
Text files modified:
sandbox/cloneable/libs/cloneable/doc/cloneable.qbk | 125 ++++++++++++++++++++++++++++++---------
sandbox/cloneable/libs/cloneable/doc/html/cloneable/change_log.html | 8 +-
sandbox/cloneable/libs/cloneable/doc/html/cloneable/heterogenous_containers.html | 39 ++++++++----
sandbox/cloneable/libs/cloneable/doc/html/cloneable/heterogenous_containers/hashmap_and_hashset.html | 6
sandbox/cloneable/libs/cloneable/doc/html/cloneable/heterogenous_containers/map.html | 31 ++-------
sandbox/cloneable/libs/cloneable/doc/html/cloneable/intro.html | 11 ---
sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial.html | 18 +++-
sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial/cloneable_traits.html | 6
sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial/dealing_with_muliple_sub_objects.html | 20 ++++--
sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial/simple_hierarchical_cloning.html | 26 +++++--
sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial/using_custom_allocators.html | 22 ++++--
sandbox/cloneable/libs/cloneable/doc/html/index.html | 91 +++++++++++++++++++++++++++-
sandbox/cloneable/libs/cloneable/doc/html/standalone_HTML.manifest | 3
13 files changed, 281 insertions(+), 125 deletions(-)
Modified: sandbox/cloneable/libs/cloneable/doc/cloneable.qbk
==============================================================================
--- sandbox/cloneable/libs/cloneable/doc/cloneable.qbk (original)
+++ sandbox/cloneable/libs/cloneable/doc/cloneable.qbk 2009-07-05 06:45:06 EDT (Sun, 05 Jul 2009)
@@ -27,11 +27,19 @@
[def __boostbook__ [@http://www.boost.org/doc/html/boostbook.html BoostBook]]
[def __docbook__ [@http://www.docbook.org/ DocBook]]
-[section:intro Introduction]
+[h3 Motivation]
+
+We still use object type hierarchies, and we often use them with containers. However,
+doing so often means that we lose value semantics for those containers, becuase they
+typically contain base pointers. We would like to have the ability to copy containers
+of base pointers and maintain value semantics, and also to safely clone and query
+individual object instances.
+
+[h3 Description]
The [*Boost.Cloneable] library provides a means for creating,
duplicating, and querying instances of object types that are specified
-in class hierarchies, and a set of containers[1] for those objects.
+in class hierarchies, and a set of containers for those objects.
Cloneable objects can create clones of derived types from base types,
can do so given any STL-compliant allocator, and supports multiple clone type targets.
@@ -64,13 +72,6 @@
The complete source code for the library, with unit-tests, are available
in the Boost SVN respository [@http://svn.boost.org/svn/boost/sandbox/cloneable/ here].
-[1] Cloneable objects can be used in containers-of-pointers (based on a modified [*Boost.PtrContainer]
-implementation), producing a 'heterogenous' container system with value semantics for
-comparison and copying, and emplace semantics for insertion. These containers are currently
- a part of the proposal as well, however it is intended that they eventually form a
- distinct library. This proposal will focus mostly on the single-object aspect of the system.
-
-[endsect]
[section:change_log Change Log]
@@ -144,8 +145,8 @@
}
``
-__note__ we pass references to these functions rather than pointers, and these functions work for ['Cloneable] types and generally.
-We can also pass an allocator to these functions, but more on custom allocation later.
+[note we pass references to these functions rather than pointers, and these functions work for ['Cloneable] types and generally.
+We can also pass an allocator to these functions, but more on custom allocation later.]
Although it is fine to use
the default base class in this example and other similar cases, we shall see that in general it is better to provide
@@ -175,7 +176,8 @@
};
``
-__note__ `Animal` doesn't have to derive from anything, or have any special members or methods.
+`Animal` doesn't have to derive from anything, or have any special members or methods.
+
Now let's use our base class to create a simple type hierarchy:
``
@@ -217,11 +219,11 @@
};
``
-__note__ the `clone()` method returns
-a pointer to the base class of the type hierarchy - in this case, `Animal`.
-We had to use a dynamic cast to down-cast to our derived type.
+[note the `clone()` method returns
+a pointer to the base class of the type hierarchy - in this case, `Animal`.]
-If you know the derived type that you wish to be cloned, you can use the
+We had to use a dynamic cast to down-cast to our derived type. If you know the derived
+type that you wish to be cloned, you can use the
`clone_as<T>()` method instead and save some typing:
``
@@ -454,9 +456,9 @@
}
``
-__alert__ if a sub-type `S` in type `T` is not default-constructabe, an exception of type
+[warning If a sub-type `S` in type `T` is not default-constructabe, an exception of type
`no_default_construction` will be thrown if you attempt to default-create a new `S` instance
-from a `T` instance.
+from a `T` instance.]
[endsect]
@@ -553,8 +555,8 @@
First, check your class to see if it is actually needed. Introducing a `make_copy()` method too early
or when not needed can create maintenance problems.
-__tip__ if your class contains pointers of any description, or references,
-then you will in general have to at least provide a sensible copy-constructor, or provide a custom clone override.
+[note if your class contains pointers of any description, or references,
+then you will in general have to at least provide a sensible copy-constructor, or provide a custom clone override.]
In summary, there are three stages of customisation:
@@ -564,6 +566,48 @@
[endsect]
+[ section Cloneable Instance]
+
+__alert__ ['subject to change -- CJS]
+
+A structure named `instance<>` is available within the library for storing instances of cloneable objects.
+
+This is used by the library to store a pointer to Cloneable objects, along with the allocator that made it. It can
+be used, for example, to assign from a generalised base to an `instance<>` without the user needing to
+manually cast.
+
+``
+struct Base { virtual ~Base() { } };
+
+struct Foo : cloneable::base<Foo, Base> { };
+
+void test()
+{
+ typedef cloneable::list<Base> List;
+ list.push_back<Foo>(1);
+ List::instance<Foo> foo = list.front();
+}
+``
+
+The full signature of this type is:
+
+``
+template <
+ class Derived = any_derived_tag
+ , class Base = any_base_tag
+ , class Alloc = default_clone_allocator
+ , class Ctor = default_construction_tag
+ >
+struct instance;
+``
+
+But you will rarely need that when used as shown in the example.
+
+The next section cleans up some housework required for library maintainers, then we finally get to the
+fun stuff with the containers.
+
+[endsect]
+
[section Cloneable Traits]
This is mostly relevant to library maintainers and is not important otherwise.
@@ -602,13 +646,17 @@
* `vector<Base, Allocator>`
* `deque<Base, Allocator>`
* `chain<Base, LinkLength, Allocator>`
-* `map<Base, Predicate, Allocator>`
+* `map<Key, Base, Predicate, Allocator>`
+* `heterogenous_map<Base, Predicate, Allocator>`
* `set<Base, Predicate, Allocator>`
-* `multimap<Base, Pred, Alloc>`
+* `multimap<Key, Base, Pred, Alloc>`
+* `heterogenous_multimap<Base, Pred, Alloc>`
* `multiset<Base, Pred, Alloc>`
-* `hash_map<Base, Predicate, Hash, Allocator>`
+* `hash_map<Key, Base, Predicate, Hash, Allocator>`
+* `heterogenous_hash_map<Base, Predicate, Hash, Allocator>`
* `hash_set<Base, Predicate, Hash, Allocator>`
-* `hash_multimap<Base, Pred, Hash, Alloc>`.
+* `hash_multimap<Key, Base, Pred, Hash, Alloc>`.
+* `heterogenous_hash_multimap<Base, Pred, Hash, Alloc>`.
* `hash_multiset<Base, Pred, Hash, Alloc>`
All of these containers store pointers to objects. However, they each expose their contained objects using value semantics.
@@ -618,7 +666,7 @@
You will have noted that each container is specialised over a `Base` type, rather than a concrete derived type. This is
because they are intended to store base pointers.
-It may be surprising that `map<>` takes only one type - the `Base` type - of
+It may be surprising that `heterogenous_map<>` takes only one type - the `Base` type - of
objects to store, rather than the more familiar ['key] and ['mapped] types. This is because a heterogenous map provides
an association between objects with the same base type.
@@ -626,9 +674,7 @@
As such, to add a new object to a heterogenous container, you provide the type and the construction arguments. Allocation
and construction is dealt with by the container, and, importantly, ['objects are not copied into the container]:
-``
-container.add_method<Type>(construction args..);
-``
+`container.`['add_method]`<Type>(construction args..);`
This means, for instance, that you can use non-default-constructable objects in heterogenous vectors.
@@ -636,7 +682,7 @@
Basically, as long as you can construct the object at all, you can use it in a heterogenous container.
-Importantly, clones are guaranteed to be created using the same allocator as that used to make the original objects.
+[note clones are guaranteed to be created using the same allocator as that used to make the original objects.]
This is why it is
important that you overload `make_copy(abstract_allocator &) const`, rather than the `make_copy() const` method that
@@ -880,7 +926,26 @@
``
int main()
{
- typedef heterogenous::map<Animal> Map;
+ typedef map<int, Animal> Map;
+ Map map;
+ map.insert<Cat>(1, "sam", 6);
+ map.insert<Dog>(2, "spot", 6);
+ map.insert<Lab>(3, "max", 6);
+}
+``
+
+TODO
+
+[endsect]
+
+[section Heterogenous Map]
+
+And also a map of Cloneable to Cloneable:
+
+``
+int main()
+{
+ typedef heterogenous_map<Animal> Map;
Map map;
map.key<Dog>("spot", 12).value<Dog>("rover", 8);
map.key<Cat>("sam", 6).value<Cat>("sooty", 10);
Modified: sandbox/cloneable/libs/cloneable/doc/html/cloneable/change_log.html
==============================================================================
--- sandbox/cloneable/libs/cloneable/doc/html/cloneable/change_log.html (original)
+++ sandbox/cloneable/libs/cloneable/doc/html/cloneable/change_log.html 2009-07-05 06:45:06 EDT (Sun, 05 Jul 2009)
@@ -6,7 +6,7 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
<link rel="home" href="../index.html" title="Cloneable 0.1">
<link rel="up" href="../index.html" title="Cloneable 0.1">
-<link rel="prev" href="intro.html" title="Introduction">
+<link rel="prev" href="../index.html" title="Cloneable 0.1">
<link rel="next" href="tutorial.html" title="Tutorial">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -20,14 +20,14 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="intro.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="tutorial.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../index.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="tutorial.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="Change Log">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="cloneable.change_log"></a><a class="link" href="change_log.html" title="Change Log"> Change Log</a>
</h2></div></div></div>
<a name="cloneable.change_log.version_0_1"></a><h4>
-<a name="id684182"></a>
+<a name="id663439"></a>
<a class="link" href="change_log.html#cloneable.change_log.version_0_1">Version 0.1</a>
</h4>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
@@ -52,7 +52,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="intro.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="tutorial.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../index.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="tutorial.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: sandbox/cloneable/libs/cloneable/doc/html/cloneable/heterogenous_containers.html
==============================================================================
--- sandbox/cloneable/libs/cloneable/doc/html/cloneable/heterogenous_containers.html (original)
+++ sandbox/cloneable/libs/cloneable/doc/html/cloneable/heterogenous_containers.html 2009-07-05 06:45:06 EDT (Sun, 05 Jul 2009)
@@ -35,6 +35,8 @@
<dt><span class="section">Vector</span></dt>
<dt><span class="section">Set</span></dt>
<dt><span class="section">Map</span></dt>
+<dt><span class="section"><a href="heterogenous_containers/heterogenous_map.html">Heterogenous
+ Map</a></span></dt>
<dt><span class="section"><a href="heterogenous_containers/hashmap_and_hashset.html">HashMap
and HashSet</a></span></dt>
</dl></div>
@@ -47,14 +49,20 @@
<li class="listitem"><code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">></span></code></li>
<li class="listitem"><code class="computeroutput"><span class="identifier">deque</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">></span></code></li>
<li class="listitem"><code class="computeroutput"><span class="identifier">chain</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">LinkLength</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">></span></code></li>
-<li class="listitem"><code class="computeroutput"><span class="identifier">map</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Predicate</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">></span></code></li>
+<li class="listitem"><code class="computeroutput"><span class="identifier">map</span><span class="special"><</span><span class="identifier">Key</span><span class="special">,</span> <span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Predicate</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">></span></code></li>
+<li class="listitem"><code class="computeroutput"><span class="identifier">heterogenous_map</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Predicate</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">></span></code></li>
<li class="listitem"><code class="computeroutput"><span class="identifier">set</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Predicate</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">></span></code></li>
-<li class="listitem"><code class="computeroutput"><span class="identifier">multimap</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">,</span> <span class="identifier">Alloc</span><span class="special">></span></code></li>
+<li class="listitem"><code class="computeroutput"><span class="identifier">multimap</span><span class="special"><</span><span class="identifier">Key</span><span class="special">,</span> <span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">,</span> <span class="identifier">Alloc</span><span class="special">></span></code></li>
+<li class="listitem"><code class="computeroutput"><span class="identifier">heterogenous_multimap</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">,</span> <span class="identifier">Alloc</span><span class="special">></span></code></li>
<li class="listitem"><code class="computeroutput"><span class="identifier">multiset</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">,</span> <span class="identifier">Alloc</span><span class="special">></span></code></li>
-<li class="listitem"><code class="computeroutput"><span class="identifier">hash_map</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Predicate</span><span class="special">,</span> <span class="identifier">Hash</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">></span></code></li>
+<li class="listitem"><code class="computeroutput"><span class="identifier">hash_map</span><span class="special"><</span><span class="identifier">Key</span><span class="special">,</span> <span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Predicate</span><span class="special">,</span> <span class="identifier">Hash</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">></span></code></li>
+<li class="listitem"><code class="computeroutput"><span class="identifier">heterogenous_hash_map</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Predicate</span><span class="special">,</span> <span class="identifier">Hash</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">></span></code></li>
<li class="listitem"><code class="computeroutput"><span class="identifier">hash_set</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Predicate</span><span class="special">,</span> <span class="identifier">Hash</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">></span></code></li>
<li class="listitem">
-<code class="computeroutput"><span class="identifier">hash_multimap</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">,</span> <span class="identifier">Hash</span><span class="special">,</span> <span class="identifier">Alloc</span><span class="special">></span></code>.
+<code class="computeroutput"><span class="identifier">hash_multimap</span><span class="special"><</span><span class="identifier">Key</span><span class="special">,</span> <span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">,</span> <span class="identifier">Hash</span><span class="special">,</span> <span class="identifier">Alloc</span><span class="special">></span></code>.
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">heterogenous_hash_multimap</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">,</span> <span class="identifier">Hash</span><span class="special">,</span> <span class="identifier">Alloc</span><span class="special">></span></code>.
</li>
<li class="listitem"><code class="computeroutput"><span class="identifier">hash_multiset</span><span class="special"><</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Pred</span><span class="special">,</span> <span class="identifier">Hash</span><span class="special">,</span> <span class="identifier">Alloc</span><span class="special">></span></code></li>
</ul></div>
@@ -68,7 +76,7 @@
type. This is because they are intended to store base pointers.
</p>
<p>
- It may be surprising that <code class="computeroutput"><span class="identifier">map</span><span class="special"><></span></code> takes only one type - the <code class="computeroutput"><span class="identifier">Base</span></code> type - of objects to store, rather than
+ It may be surprising that <code class="computeroutput"><span class="identifier">heterogenous_map</span><span class="special"><></span></code> takes only one type - the <code class="computeroutput"><span class="identifier">Base</span></code> type - of objects to store, rather than
the more familiar <span class="emphasis"><em>key</em></span> and <span class="emphasis"><em>mapped</em></span>
types. This is because a heterogenous map provides an association between objects
with the same base type.
@@ -81,11 +89,8 @@
are not copied into the container</em></span>:
</p>
<p>
-
-</p>
-<pre class="programlisting"><span class="identifier">container</span><span class="special">.</span><span class="identifier">add_method</span><span class="special"><</span><span class="identifier">Type</span><span class="special">>(</span><span class="identifier">construction</span> <span class="identifier">args</span><span class="special">..);</span>
-</pre>
-<p>
+ <code class="computeroutput"><span class="identifier">container</span><span class="special">.</span></code><span class="emphasis"><em>add_method</em></span><code class="computeroutput"><span class="special"><</span><span class="identifier">Type</span><span class="special">>(</span><span class="identifier">construction</span>
+ <span class="identifier">args</span><span class="special">..);</span></code>
</p>
<p>
This means, for instance, that you can use non-default-constructable objects
@@ -99,10 +104,16 @@
Basically, as long as you can construct the object at all, you can use it in
a heterogenous container.
</p>
-<p>
- Importantly, clones are guaranteed to be created using the same allocator as
- that used to make the original objects.
- </p>
+<div class="note" title="Note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/html/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ clones are guaranteed to be created using the same allocator as that used
+ to make the original objects.
+ </p></td></tr>
+</table></div>
<p>
This is why it is important that you overload <code class="computeroutput"><span class="identifier">make_copy</span><span class="special">(</span><span class="identifier">abstract_allocator</span>
<span class="special">&)</span> <span class="keyword">const</span></code>,
Modified: sandbox/cloneable/libs/cloneable/doc/html/cloneable/heterogenous_containers/hashmap_and_hashset.html
==============================================================================
--- sandbox/cloneable/libs/cloneable/doc/html/cloneable/heterogenous_containers/hashmap_and_hashset.html (original)
+++ sandbox/cloneable/libs/cloneable/doc/html/cloneable/heterogenous_containers/hashmap_and_hashset.html 2009-07-05 06:45:06 EDT (Sun, 05 Jul 2009)
@@ -6,7 +6,7 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
<link rel="home" href="../../index.html" title="Cloneable 0.1">
<link rel="up" href="../heterogenous_containers.html" title="Heterogenous Containers">
-<link rel="prev" href="map.html" title="Map">
+<link rel="prev" href="heterogenous_map.html" title="Heterogenous Map">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -19,7 +19,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="map.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../heterogenous_containers.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a>
+<a accesskey="p" href="heterogenous_map.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../heterogenous_containers.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a>
</div>
<div class="section" title="HashMap and HashSet">
<div class="titlepage"><div><div><h3 class="title">
@@ -42,7 +42,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="map.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../heterogenous_containers.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a>
+<a accesskey="p" href="heterogenous_map.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../heterogenous_containers.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a>
</div>
</body>
</html>
Modified: sandbox/cloneable/libs/cloneable/doc/html/cloneable/heterogenous_containers/map.html
==============================================================================
--- sandbox/cloneable/libs/cloneable/doc/html/cloneable/heterogenous_containers/map.html (original)
+++ sandbox/cloneable/libs/cloneable/doc/html/cloneable/heterogenous_containers/map.html 2009-07-05 06:45:06 EDT (Sun, 05 Jul 2009)
@@ -7,7 +7,7 @@
<link rel="home" href="../../index.html" title="Cloneable 0.1">
<link rel="up" href="../heterogenous_containers.html" title="Heterogenous Containers">
<link rel="prev" href="set.html" title="Set">
-<link rel="next" href="hashmap_and_hashset.html" title="HashMap and HashSet">
+<link rel="next" href="heterogenous_map.html" title="Heterogenous Map">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -20,7 +20,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="set.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../heterogenous_containers.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="hashmap_and_hashset.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="set.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../heterogenous_containers.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="heterogenous_map.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="Map">
<div class="titlepage"><div><div><h3 class="title">
@@ -34,28 +34,11 @@
</p>
<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
<span class="special">{</span>
- <span class="keyword">typedef</span> <span class="identifier">heterogenous</span><span class="special">::</span><span class="identifier">map</span><span class="special"><</span><span class="identifier">Animal</span><span class="special">></span> <span class="identifier">Map</span><span class="special">;</span>
+ <span class="keyword">typedef</span> <span class="identifier">map</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">Animal</span><span class="special">></span> <span class="identifier">Map</span><span class="special">;</span>
<span class="identifier">Map</span> <span class="identifier">map</span><span class="special">;</span>
- <span class="identifier">map</span><span class="special">.</span><span class="identifier">key</span><span class="special"><</span><span class="identifier">Dog</span><span class="special">>(</span><span class="string">"spot"</span><span class="special">,</span> <span class="number">12</span><span class="special">).</span><span class="identifier">value</span><span class="special"><</span><span class="identifier">Dog</span><span class="special">>(</span><span class="string">"rover"</span><span class="special">,</span> <span class="number">8</span><span class="special">);</span>
- <span class="identifier">map</span><span class="special">.</span><span class="identifier">key</span><span class="special"><</span><span class="identifier">Cat</span><span class="special">>(</span><span class="string">"sam"</span><span class="special">,</span> <span class="number">6</span><span class="special">).</span><span class="identifier">value</span><span class="special"><</span><span class="identifier">Cat</span><span class="special">>(</span><span class="string">"sooty"</span><span class="special">,</span> <span class="number">10</span><span class="special">);</span>
- <span class="identifier">map</span><span class="special">.</span><span class="identifier">key</span><span class="special"><</span><span class="identifier">Cat</span><span class="special">>(</span><span class="string">"fluffy"</span><span class="special">,</span> <span class="number">10</span><span class="special">).</span><span class="identifier">value</span><span class="special"><</span><span class="identifier">Cat</span><span class="special">>(</span><span class="string">"tigger"</span><span class="special">,</span> <span class="number">14</span><span class="special">);</span>
- <span class="identifier">map</span><span class="special">.</span><span class="identifier">key</span><span class="special"><</span><span class="identifier">Labrador</span><span class="special">>(</span><span class="string">"max"</span><span class="special">,</span> <span class="number">12</span><span class="special">).</span><span class="identifier">value</span><span class="special"><</span><span class="identifier">Cat</span><span class="special">>(</span><span class="string">"sooty"</span><span class="special">,</span> <span class="number">3</span><span class="special">);</span>
-
- <span class="comment">// make a deep copy of both the keys and values in the map
-</span> <span class="identifier">Map</span> <span class="identifier">copy</span> <span class="special">=</span> <span class="identifier">map</span><span class="special">;</span>
-
- <span class="comment">// can search for any type of animal
-</span> <span class="identifier">assert</span><span class="special">(</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">find</span><span class="special"><</span><span class="identifier">Animal</span><span class="special">>(</span><span class="string">"spot"</span><span class="special">,</span> <span class="number">12</span><span class="special">)</span> <span class="special">!=</span> <span class="identifier">copy</span><span class="special">.</span><span class="identifier">end</span><span class="special">());</span>
- <span class="identifier">assert</span><span class="special">(</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">find</span><span class="special"><</span><span class="identifier">Animal</span><span class="special">>(</span><span class="string">"sam"</span><span class="special">,</span> <span class="number">6</span><span class="special">)</span> <span class="special">!=</span> <span class="identifier">copy</span><span class="special">.</span><span class="identifier">end</span><span class="special">());</span>
-
- <span class="comment">// or, search for specific animal instances
-</span> <span class="identifier">assert</span><span class="special">(</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">find</span><span class="special"><</span><span class="identifier">Dog</span><span class="special">>(</span><span class="string">"spot"</span><span class="special">,</span> <span class="number">12</span><span class="special">)</span> <span class="special">!=</span> <span class="identifier">copy</span><span class="special">.</span><span class="identifier">end</span><span class="special">());</span>
- <span class="identifier">assert</span><span class="special">(</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">find</span><span class="special"><</span><span class="identifier">Cat</span><span class="special">>(</span><span class="string">"spot"</span><span class="special">,</span> <span class="number">12</span><span class="special">)</span> <span class="special">==</span> <span class="identifier">copy</span><span class="special">.</span><span class="identifier">end</span><span class="special">());</span>
- <span class="identifier">assert</span><span class="special">(</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">find</span><span class="special"><</span><span class="identifier">Cat</span><span class="special">>(</span><span class="string">"sam"</span><span class="special">,</span> <span class="number">6</span><span class="special">)</span> <span class="special">!=</span> <span class="identifier">copy</span><span class="special">.</span><span class="identifier">end</span><span class="special">());</span>
- <span class="identifier">assert</span><span class="special">(</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">find</span><span class="special"><</span><span class="identifier">Dog</span><span class="special">>(</span><span class="string">"max"</span><span class="special">,</span> <span class="number">12</span><span class="special">)</span> <span class="special">!=</span> <span class="identifier">copy</span><span class="special">.</span><span class="identifier">end</span><span class="special">());</span>
- <span class="identifier">assert</span><span class="special">(</span><span class="identifier">copy</span><span class="special">.</span><span class="identifier">find</span><span class="special"><</span><span class="identifier">Dog</span><span class="special">>(</span><span class="string">"fluffy"</span><span class="special">,</span> <span class="number">10</span><span class="special">)</span> <span class="special">==</span> <span class="identifier">copy</span><span class="special">.</span><span class="identifier">end</span><span class="special">());</span>
-
- <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+ <span class="identifier">map</span><span class="special">.</span><span class="identifier">insert</span><span class="special"><</span><span class="identifier">Cat</span><span class="special">>(</span><span class="number">1</span><span class="special">,</span> <span class="string">"sam"</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span>
+ <span class="identifier">map</span><span class="special">.</span><span class="identifier">insert</span><span class="special"><</span><span class="identifier">Dog</span><span class="special">>(</span><span class="number">2</span><span class="special">,</span> <span class="string">"spot"</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span>
+ <span class="identifier">map</span><span class="special">.</span><span class="identifier">insert</span><span class="special"><</span><span class="identifier">Lab</span><span class="special">>(</span><span class="number">3</span><span class="special">,</span> <span class="string">"max"</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span>
<span class="special">}</span>
</pre>
<p>
@@ -74,7 +57,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="set.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../heterogenous_containers.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="hashmap_and_hashset.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="set.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../heterogenous_containers.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="heterogenous_map.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: sandbox/cloneable/libs/cloneable/doc/html/cloneable/intro.html
==============================================================================
--- sandbox/cloneable/libs/cloneable/doc/html/cloneable/intro.html (original)
+++ sandbox/cloneable/libs/cloneable/doc/html/cloneable/intro.html 2009-07-05 06:45:06 EDT (Sun, 05 Jul 2009)
@@ -29,7 +29,7 @@
<p>
The <span class="bold"><strong>Boost.Cloneable</strong></span> library provides a means
for creating, duplicating, and querying instances of object types that are
- specified in class hierarchies, and a set of containers[1] for those objects.
+ specified in class hierarchies, and a set of containers for those objects.
</p>
<p>
Cloneable objects can create clones of derived types from base types, can do
@@ -88,15 +88,6 @@
The complete source code for the library, with unit-tests, are available in
the Boost SVN respository here.
</p>
-<p>
- [1] Cloneable objects can be used in containers-of-pointers (based on a modified
- <span class="bold"><strong>Boost.PtrContainer</strong></span> implementation), producing
- a 'heterogenous' container system with value semantics for comparison and copying,
- and emplace semantics for insertion. These containers are currently a part
- of the proposal as well, however it is intended that they eventually form a
- distinct library. This proposal will focus mostly on the single-object aspect
- of the system.
- </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
Modified: sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial.html
==============================================================================
--- sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial.html (original)
+++ sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial.html 2009-07-05 06:45:06 EDT (Sun, 05 Jul 2009)
@@ -39,6 +39,7 @@
the Cloning Process</a></span></dt>
<dt><span class="section"><a href="tutorial/using_custom_allocators.html">Using Custom
Allocators</a></span></dt>
+<dt><span class="section">Cloneable Instance</span></dt>
<dt><span class="section">Cloneable Traits</span></dt>
</dl></div>
<p>
@@ -126,12 +127,17 @@
</pre>
<p>
</p>
-<p>
- <span class="inlinemediaobject"><img src="../images/note.png" alt="note"></span> we pass references to these functions rather than pointers,
- and these functions work for <span class="emphasis"><em>Cloneable</em></span> types and generally.
- We can also pass an allocator to these functions, but more on custom allocation
- later.
- </p>
+<div class="note" title="Note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/html/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ we pass references to these functions rather than pointers, and these functions
+ work for <span class="emphasis"><em>Cloneable</em></span> types and generally. We can also
+ pass an allocator to these functions, but more on custom allocation later.
+ </p></td></tr>
+</table></div>
<p>
Although it is fine to use the default base class in this example and other
similar cases, we shall see that in general it is better to provide our own
Modified: sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial/cloneable_traits.html
==============================================================================
--- sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial/cloneable_traits.html (original)
+++ sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial/cloneable_traits.html 2009-07-05 06:45:06 EDT (Sun, 05 Jul 2009)
@@ -6,7 +6,7 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
<link rel="home" href="../../index.html" title="Cloneable 0.1">
<link rel="up" href="../tutorial.html" title="Tutorial">
-<link rel="prev" href="using_custom_allocators.html" title="Using Custom Allocators">
+<link rel="prev" href="cloneable_instance.html" title="Cloneable Instance">
<link rel="next" href="../heterogenous_containers.html" title="Heterogenous Containers">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -20,7 +20,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="using_custom_allocators.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../heterogenous_containers.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="cloneable_instance.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../heterogenous_containers.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="Cloneable Traits">
<div class="titlepage"><div><div><h3 class="title">
@@ -66,7 +66,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="using_custom_allocators.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../heterogenous_containers.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="cloneable_instance.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../heterogenous_containers.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial/dealing_with_muliple_sub_objects.html
==============================================================================
--- sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial/dealing_with_muliple_sub_objects.html (original)
+++ sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial/dealing_with_muliple_sub_objects.html 2009-07-05 06:45:06 EDT (Sun, 05 Jul 2009)
@@ -76,13 +76,19 @@
</pre>
<p>
</p>
-<p>
- <span class="inlinemediaobject"><img src="../../images/alert.png" alt="alert"></span> if a sub-type <code class="computeroutput"><span class="identifier">S</span></code>
- in type <code class="computeroutput"><span class="identifier">T</span></code> is not default-constructabe,
- an exception of type <code class="computeroutput"><span class="identifier">no_default_construction</span></code>
- will be thrown if you attempt to default-create a new <code class="computeroutput"><span class="identifier">S</span></code>
- instance from a <code class="computeroutput"><span class="identifier">T</span></code> instance.
- </p>
+<div class="warning" title="Warning"><table border="0" summary="Warning">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../../../../doc/html/images/warning.png"></td>
+<th align="left">Warning</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ If a sub-type <code class="computeroutput"><span class="identifier">S</span></code> in type
+ <code class="computeroutput"><span class="identifier">T</span></code> is not default-constructabe,
+ an exception of type <code class="computeroutput"><span class="identifier">no_default_construction</span></code>
+ will be thrown if you attempt to default-create a new <code class="computeroutput"><span class="identifier">S</span></code>
+ instance from a <code class="computeroutput"><span class="identifier">T</span></code> instance.
+ </p></td></tr>
+</table></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
Modified: sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial/simple_hierarchical_cloning.html
==============================================================================
--- sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial/simple_hierarchical_cloning.html (original)
+++ sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial/simple_hierarchical_cloning.html 2009-07-05 06:45:06 EDT (Sun, 05 Jul 2009)
@@ -52,8 +52,10 @@
<p>
</p>
<p>
- <span class="inlinemediaobject"><img src="../../images/note.png" alt="note"></span> <code class="computeroutput"><span class="identifier">Animal</span></code>
- doesn't have to derive from anything, or have any special members or methods.
+ <code class="computeroutput"><span class="identifier">Animal</span></code> doesn't have to derive
+ from anything, or have any special members or methods.
+ </p>
+<p>
Now let's use our base class to create a simple type hierarchy:
</p>
<p>
@@ -106,14 +108,20 @@
</pre>
<p>
</p>
+<div class="note" title="Note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ the <code class="computeroutput"><span class="identifier">clone</span><span class="special">()</span></code>
+ method returns a pointer to the base class of the type hierarchy - in this
+ case, <code class="computeroutput"><span class="identifier">Animal</span></code>.
+ </p></td></tr>
+</table></div>
<p>
- <span class="inlinemediaobject"><img src="../../images/note.png" alt="note"></span> the <code class="computeroutput"><span class="identifier">clone</span><span class="special">()</span></code> method returns a pointer to the base class
- of the type hierarchy - in this case, <code class="computeroutput"><span class="identifier">Animal</span></code>.
- We had to use a dynamic cast to down-cast to our derived type.
- </p>
-<p>
- If you know the derived type that you wish to be cloned, you can use the
- <code class="computeroutput"><span class="identifier">clone_as</span><span class="special"><</span><span class="identifier">T</span><span class="special">>()</span></code>
+ We had to use a dynamic cast to down-cast to our derived type. If you know
+ the derived type that you wish to be cloned, you can use the <code class="computeroutput"><span class="identifier">clone_as</span><span class="special"><</span><span class="identifier">T</span><span class="special">>()</span></code>
method instead and save some typing:
</p>
<p>
Modified: sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial/using_custom_allocators.html
==============================================================================
--- sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial/using_custom_allocators.html (original)
+++ sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial/using_custom_allocators.html 2009-07-05 06:45:06 EDT (Sun, 05 Jul 2009)
@@ -7,7 +7,7 @@
<link rel="home" href="../../index.html" title="Cloneable 0.1">
<link rel="up" href="../tutorial.html" title="Tutorial">
<link rel="prev" href="customising_the_cloning_process.html" title="Customising the Cloning Process">
-<link rel="next" href="cloneable_traits.html" title="Cloneable Traits">
+<link rel="next" href="cloneable_instance.html" title="Cloneable Instance">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -20,7 +20,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="customising_the_cloning_process.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="cloneable_traits.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="customising_the_cloning_process.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="cloneable_instance.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="Using Custom Allocators">
<div class="titlepage"><div><div><h3 class="title">
@@ -90,11 +90,17 @@
class to see if it is actually needed. Introducing a <code class="computeroutput"><span class="identifier">make_copy</span><span class="special">()</span></code> method too early or when not needed can
create maintenance problems.
</p>
-<p>
- <span class="inlinemediaobject"><img src="../../images/tip.png" alt="tip"></span> if your class contains pointers of any description,
- or references, then you will in general have to at least provide a sensible
- copy-constructor, or provide a custom clone override.
- </p>
+<div class="note" title="Note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ if your class contains pointers of any description, or references, then
+ you will in general have to at least provide a sensible copy-constructor,
+ or provide a custom clone override.
+ </p></td></tr>
+</table></div>
<p>
In summary, there are three stages of customisation:
</p>
@@ -124,7 +130,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="customising_the_cloning_process.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="cloneable_traits.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="customising_the_cloning_process.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="cloneable_instance.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: sandbox/cloneable/libs/cloneable/doc/html/index.html
==============================================================================
--- sandbox/cloneable/libs/cloneable/doc/html/index.html (original)
+++ sandbox/cloneable/libs/cloneable/doc/html/index.html 2009-07-05 06:45:06 EDT (Sun, 05 Jul 2009)
@@ -5,7 +5,7 @@
<link rel="stylesheet" href="boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
<link rel="home" href="index.html" title="Cloneable 0.1">
-<link rel="next" href="cloneable/intro.html" title="Introduction">
+<link rel="next" href="cloneable/change_log.html" title="Change Log">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -17,7 +17,7 @@
<td align="center">More</td>
</tr></table>
<hr>
-<div class="spirit-nav"><a accesskey="n" href="cloneable/intro.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a></div>
+<div class="spirit-nav"><a accesskey="n" href="cloneable/change_log.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a></div>
<div class="article" title="Cloneable 0.1">
<div class="titlepage">
<div>
@@ -28,7 +28,7 @@
</h3></div></div></div>
<div><p class="copyright">Copyright © 2009 Christian Schladetsch</p></div>
<div><div class="legalnotice" title="Legal Notice">
-<a name="id684042"></a><p>
+<a name="id663289"></a><p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</p>
@@ -39,7 +39,6 @@
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
-<dt><span class="section"> Introduction</span></dt>
<dt><span class="section"> Change Log</span></dt>
<dt><span class="section"> Tutorial</span></dt>
<dd><dl>
@@ -55,6 +54,7 @@
the Cloning Process</a></span></dt>
<dt><span class="section"><a href="cloneable/tutorial/using_custom_allocators.html">Using Custom
Allocators</a></span></dt>
+<dt><span class="section">Cloneable Instance</span></dt>
<dt><span class="section">Cloneable Traits</span></dt>
</dl></dd>
<dt><span class="section">Heterogenous Containers</span></dt>
@@ -67,17 +67,96 @@
<dt><span class="section">Vector</span></dt>
<dt><span class="section">Set</span></dt>
<dt><span class="section">Map</span></dt>
+<dt><span class="section"><a href="cloneable/heterogenous_containers/heterogenous_map.html">Heterogenous
+ Map</a></span></dt>
<dt><span class="section"><a href="cloneable/heterogenous_containers/hashmap_and_hashset.html">HashMap
and HashSet</a></span></dt>
</dl></dd>
</dl>
</div>
+<a name="cloneable..motivation"></a><h4>
+<a name="id663315"></a>
+ <a class="link" href="index.html#cloneable..motivation">Motivation</a>
+ </h4>
+<p>
+ We still use object type hierarchies, and we often use them with containers.
+ However, doing so often means that we lose value semantics for those containers,
+ becuase they typically contain base pointers. We would like to have the ability
+ to copy containers of base pointers and maintain value semantics, and also to
+ safely clone and query individual object instances.
+ </p>
+<a name="cloneable..description"></a><h4>
+<a name="id663331"></a>
+ <a class="link" href="index.html#cloneable..description">Description</a>
+ </h4>
+<p>
+ The <span class="bold"><strong>Boost.Cloneable</strong></span> library provides a means
+ for creating, duplicating, and querying instances of object types that are specified
+ in class hierarchies, and a set of containers for those objects.
+ </p>
+<p>
+ Cloneable objects can create clones of derived types from base types, can do
+ so given any STL-compliant allocator, and supports multiple clone type targets.
+ </p>
+<p>
+ The user of the library is able to override the default cloning process, and
+ may supply custom allocators. Cloneable types can derive from other cloneable
+ types, in which case the user can specify which subobject type to duplicate or
+ create when making a new clone or new object from an existing instance.
+ </p>
+<p>
+ You can use <span class="bold"><strong>Boost.Cloneable</strong></span> with existing, external
+ types without modification to those types by using the supplied <span class="emphasis"><em>adaptor</em></span>
+ mechanism. <span class="bold"><strong>Boost.Cloneable</strong></span> also supports types
+ that are not default-constructable.
+ </p>
+<p>
+ There is a fundamental requirement that a common base class type is shared for
+ each type in a given class hierarchy. The user can supply their own base classes,
+ or sensible defaults are generated.
+ </p>
+<p>
+ Key features of the library:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ Can make any class-type Cloneable with or without modification to its definition
+ </li>
+<li class="listitem">
+ Optional user-supplied base classes
+ </li>
+<li class="listitem">
+ Base types can be queried for the interfaces they support
+ </li>
+<li class="listitem">
+ Clones can be created from base types
+ </li>
+<li class="listitem">
+ Supports multiple inheritance, cloning of sub-objects
+ </li>
+<li class="listitem">
+ Supports types with no default constructors
+ </li>
+<li class="listitem">
+ Customisation of the cloning process
+ </li>
+<li class="listitem">
+ Support for custom allocators
+ </li>
+<li class="listitem">
+ A set of heterogenous containers with emplace semantics for object insertion
+ </li>
+</ul></div>
+<p>
+ The complete source code for the library, with unit-tests, are available in the
+ Boost SVN respository here.
+ </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: July 05, 2009 at 00:14:51 GMT</small></p></td>
+<td align="left"><p><small>Last revised: July 05, 2009 at 10:42:31 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
-<div class="spirit-nav"><a accesskey="n" href="cloneable/intro.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a></div>
+<div class="spirit-nav"><a accesskey="n" href="cloneable/change_log.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a></div>
</body>
</html>
Modified: sandbox/cloneable/libs/cloneable/doc/html/standalone_HTML.manifest
==============================================================================
--- sandbox/cloneable/libs/cloneable/doc/html/standalone_HTML.manifest (original)
+++ sandbox/cloneable/libs/cloneable/doc/html/standalone_HTML.manifest 2009-07-05 06:45:06 EDT (Sun, 05 Jul 2009)
@@ -1,5 +1,4 @@
index.html
-cloneable/intro.html
cloneable/change_log.html
cloneable/tutorial.html
cloneable/tutorial/simple_hierarchical_cloning.html
@@ -8,6 +7,7 @@
cloneable/tutorial/dealing_with_muliple_sub_objects.html
cloneable/tutorial/customising_the_cloning_process.html
cloneable/tutorial/using_custom_allocators.html
+cloneable/tutorial/cloneable_instance.html
cloneable/tutorial/cloneable_traits.html
cloneable/heterogenous_containers.html
cloneable/heterogenous_containers/extended_object_hierarhcy.html
@@ -16,4 +16,5 @@
cloneable/heterogenous_containers/vector.html
cloneable/heterogenous_containers/set.html
cloneable/heterogenous_containers/map.html
+cloneable/heterogenous_containers/heterogenous_map.html
cloneable/heterogenous_containers/hashmap_and_hashset.html
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk