Changeset 54669


Ignore:
Timestamp:
Jul 5, 2009, 10:45:06 AM (9 years ago)
Author:
cschladetsch
Message:

updated

Location:
sandbox/cloneable/libs/cloneable/doc
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • sandbox/cloneable/libs/cloneable/doc/cloneable.qbk

    r54660 r54669  
    2828[def __docbook__    [@http://www.docbook.org/ DocBook]]
    2929
    30 [section:intro Introduction]
     30[h3 Motivation]
     31
     32We still use object type hierarchies, and we often use them with containers. However,
     33doing so often means that we lose value semantics for those containers, becuase they
     34typically contain base pointers. We would like to have the ability to copy containers
     35of base pointers and maintain value semantics, and also to safely clone and query
     36individual object instances.
     37
     38[h3 Description]
    3139
    3240The [*Boost.Cloneable] library provides a means for creating,
    3341duplicating, and querying instances of object types that are specified
    34 in class hierarchies, and a set of containers[1] for those objects.
     42in class hierarchies, and a set of containers for those objects.
    3543
    3644Cloneable objects can create clones of derived types from base types,
     
    6573in the Boost SVN respository [@http://svn.boost.org/svn/boost/sandbox/cloneable/ here].
    6674
    67 [1] Cloneable objects can be used in containers-of-pointers (based on a modified [*Boost.PtrContainer]
    68 implementation), producing a 'heterogenous' container system with value semantics for
    69 comparison and copying, and emplace semantics for insertion. These containers are currently
    70  a part of the proposal as well, however it is intended that they eventually form a
    71  distinct library. This proposal will focus mostly on the single-object aspect of the system.
    72 
    73 [endsect]
    7475
    7576[section:change_log Change Log]
     
    145146``
    146147
    147 __note__ we pass references to these functions rather than pointers, and these functions work for ['Cloneable] types and generally.
    148 We can also pass an allocator to these functions, but more on custom allocation later.
     148[note we pass references to these functions rather than pointers, and these functions work for ['Cloneable] types and generally.
     149We can also pass an allocator to these functions, but more on custom allocation later.]
    149150
    150151Although it is fine to use
     
    176177``
    177178
    178 __note__ `Animal` doesn't have to derive from anything, or have any special members or methods.
     179`Animal` doesn't have to derive from anything, or have any special members or methods.
     180
    179181Now let's use our base class to create a simple type hierarchy:
    180182
     
    218220``
    219221
    220 __note__ the `clone()` method returns
    221 a pointer to the base class of the type hierarchy - in this case, `Animal`. 
    222 We had to use a dynamic cast to down-cast to our derived type.
    223 
    224 If you know the derived type that you wish to be cloned, you can use the
     222[note the `clone()` method returns
     223a pointer to the base class of the type hierarchy - in this case, `Animal`.]
     224
     225We had to use a dynamic cast to down-cast to our derived type. If you know the derived
     226type that you wish to be cloned, you can use the
    225227`clone_as<T>()` method instead and save some typing:
    226228
     
    455457``
    456458
    457 __alert__ if a sub-type `S` in type `T` is not default-constructabe, an exception of type
     459[warning If a sub-type `S` in type `T` is not default-constructabe, an exception of type
    458460`no_default_construction` will be thrown if you attempt to default-create a new `S` instance
    459 from a `T` instance. 
     461from a `T` instance.]
    460462
    461463[endsect]
     
    554556or when not needed can create maintenance problems.
    555557
    556 __tip__ if your class contains pointers of any description, or references,
    557 then you will in general have to at least provide a sensible copy-constructor, or provide a custom clone override.
     558[note if your class contains pointers of any description, or references,
     559then you will in general have to at least provide a sensible copy-constructor, or provide a custom clone override.]
    558560
    559561In summary, there are three stages of customisation:
     
    562564* If your class has types that need explicit construction, making a copy-constructor for your class will suffice to make clones.
    563565* If your class has members that contain references, or require allocation, then you should override `make_copy` and construct the members in the copy instance, using the supplied abstract_allocator.
     566
     567[endsect]
     568
     569[ section Cloneable Instance]
     570
     571__alert__ ['subject to change -- CJS]
     572
     573A structure named `instance<>` is available within the library for storing instances of cloneable objects.
     574
     575This is used by the library to store a pointer to Cloneable objects, along with the allocator that made it. It can
     576be used, for example, to assign from a generalised base to an `instance<>` without the user needing to
     577manually cast.
     578
     579``
     580struct Base { virtual ~Base() { } };
     581
     582struct Foo : cloneable::base<Foo, Base> { };
     583
     584void test()
     585{
     586    typedef cloneable::list<Base> List;
     587    list.push_back<Foo>(1);
     588    List::instance<Foo> foo = list.front();
     589}
     590``
     591
     592The full signature of this type is:
     593
     594``
     595template <
     596        class Derived = any_derived_tag
     597        , class Base = any_base_tag
     598        , class Alloc = default_clone_allocator
     599        , class Ctor = default_construction_tag
     600        >
     601struct instance;
     602``
     603
     604But you will rarely need that when used as shown in the example.
     605
     606The next section cleans up some housework required for library maintainers, then we finally get to the
     607fun stuff with the containers.
    564608
    565609[endsect]
     
    603647* `deque<Base, Allocator>`
    604648* `chain<Base, LinkLength, Allocator>`
    605 * `map<Base, Predicate, Allocator>`
     649* `map<Key, Base, Predicate, Allocator>`
     650* `heterogenous_map<Base, Predicate, Allocator>`
    606651* `set<Base, Predicate, Allocator>`
    607 * `multimap<Base, Pred, Alloc>`
     652* `multimap<Key, Base, Pred, Alloc>`
     653* `heterogenous_multimap<Base, Pred, Alloc>`
    608654* `multiset<Base, Pred, Alloc>`
    609 * `hash_map<Base, Predicate, Hash, Allocator>`
     655* `hash_map<Key, Base, Predicate, Hash, Allocator>`
     656* `heterogenous_hash_map<Base, Predicate, Hash, Allocator>`
    610657* `hash_set<Base, Predicate, Hash, Allocator>`
    611 * `hash_multimap<Base, Pred, Hash, Alloc>`.
     658* `hash_multimap<Key, Base, Pred, Hash, Alloc>`.
     659* `heterogenous_hash_multimap<Base, Pred, Hash, Alloc>`.
    612660* `hash_multiset<Base, Pred, Hash, Alloc>`
    613661
     
    619667because they are intended to store base pointers.
    620668
    621 It may be surprising that `map<>` takes only one type - the `Base` type - of
     669It may be surprising that `heterogenous_map<>` takes only one type - the `Base` type - of
    622670objects to store, rather than the more familiar ['key] and ['mapped] types. This is because a heterogenous map provides
    623671an association between objects with the same base type.
     
    627675and construction is dealt with by the container, and, importantly, ['objects are not copied into the container]:
    628676
    629 ``
    630 container.add_method<Type>(construction args..);
    631 ``
     677`container.`['add_method]`<Type>(construction args..);`
    632678
    633679This means, for instance, that you can use non-default-constructable objects in heterogenous vectors.
     
    637683Basically, as long as you can construct the object at all, you can use it in a heterogenous container.
    638684
    639 Importantly, clones are guaranteed to be created using the same allocator as that used to make the original objects.
     685[note clones are guaranteed to be created using the same allocator as that used to make the original objects.]
    640686
    641687This is why it is
     
    881927int main()
    882928{
    883         typedef heterogenous::map<Animal> Map;
     929        typedef map<int, Animal> Map;
     930        Map map;
     931        map.insert<Cat>(1, "sam", 6);
     932        map.insert<Dog>(2, "spot", 6);
     933        map.insert<Lab>(3, "max", 6);
     934}
     935``
     936
     937TODO
     938
     939[endsect]
     940
     941[section Heterogenous Map]
     942
     943And also a map of Cloneable to Cloneable:
     944
     945``
     946int main()
     947{
     948        typedef heterogenous_map<Animal> Map;
    884949        Map map;
    885950        map.key<Dog>("spot", 12).value<Dog>("rover", 8);
  • sandbox/cloneable/libs/cloneable/doc/html/cloneable/change_log.html

    r54660 r54669  
    77<link rel="home" href="../index.html" title="Cloneable 0.1">
    88<link rel="up" href="../index.html" title="Cloneable 0.1">
    9 <link rel="prev" href="intro.html" title="Introduction">
     9<link rel="prev" href="../index.html" title="Cloneable 0.1">
    1010<link rel="next" href="tutorial.html" title="Tutorial">
    1111</head>
     
    2121<hr>
    2222<div class="spirit-nav">
    23 <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>
     23<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>
    2424</div>
    2525<div class="section" title="Change Log">
     
    2828</h2></div></div></div>
    2929<a name="cloneable.change_log.version_0_1"></a><h4>
    30 <a name="id684182"></a>
     30<a name="id663439"></a>
    3131      <a class="link" href="change_log.html#cloneable.change_log.version_0_1">Version 0.1</a>
    3232    </h4>
     
    5353<hr>
    5454<div class="spirit-nav">
    55 <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>
     55<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>
    5656</div>
    5757</body>
  • sandbox/cloneable/libs/cloneable/doc/html/cloneable/heterogenous_containers.html

    r54638 r54669  
    3636<dt><span class="section"><a href="heterogenous_containers/set.html">Set</a></span></dt>
    3737<dt><span class="section"><a href="heterogenous_containers/map.html">Map</a></span></dt>
     38<dt><span class="section"><a href="heterogenous_containers/heterogenous_map.html">Heterogenous
     39      Map</a></span></dt>
    3840<dt><span class="section"><a href="heterogenous_containers/hashmap_and_hashset.html">HashMap
    3941      and HashSet</a></span></dt>
     
    4850<li class="listitem"><code class="computeroutput"><span class="identifier">deque</span><span class="special">&lt;</span><span class="identifier">Base</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;</span></code></li>
    4951<li class="listitem"><code class="computeroutput"><span class="identifier">chain</span><span class="special">&lt;</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">&gt;</span></code></li>
    50 <li class="listitem"><code class="computeroutput"><span class="identifier">map</span><span class="special">&lt;</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">&gt;</span></code></li>
     52<li class="listitem"><code class="computeroutput"><span class="identifier">map</span><span class="special">&lt;</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">&gt;</span></code></li>
     53<li class="listitem"><code class="computeroutput"><span class="identifier">heterogenous_map</span><span class="special">&lt;</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">&gt;</span></code></li>
    5154<li class="listitem"><code class="computeroutput"><span class="identifier">set</span><span class="special">&lt;</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">&gt;</span></code></li>
    52 <li class="listitem"><code class="computeroutput"><span class="identifier">multimap</span><span class="special">&lt;</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">&gt;</span></code></li>
     55<li class="listitem"><code class="computeroutput"><span class="identifier">multimap</span><span class="special">&lt;</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">&gt;</span></code></li>
     56<li class="listitem"><code class="computeroutput"><span class="identifier">heterogenous_multimap</span><span class="special">&lt;</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">&gt;</span></code></li>
    5357<li class="listitem"><code class="computeroutput"><span class="identifier">multiset</span><span class="special">&lt;</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">&gt;</span></code></li>
    54 <li class="listitem"><code class="computeroutput"><span class="identifier">hash_map</span><span class="special">&lt;</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">&gt;</span></code></li>
     58<li class="listitem"><code class="computeroutput"><span class="identifier">hash_map</span><span class="special">&lt;</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">&gt;</span></code></li>
     59<li class="listitem"><code class="computeroutput"><span class="identifier">heterogenous_hash_map</span><span class="special">&lt;</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">&gt;</span></code></li>
    5560<li class="listitem"><code class="computeroutput"><span class="identifier">hash_set</span><span class="special">&lt;</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">&gt;</span></code></li>
    5661<li class="listitem">
    57 <code class="computeroutput"><span class="identifier">hash_multimap</span><span class="special">&lt;</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">&gt;</span></code>.
     62<code class="computeroutput"><span class="identifier">hash_multimap</span><span class="special">&lt;</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">&gt;</span></code>.
     63      </li>
     64<li class="listitem">
     65<code class="computeroutput"><span class="identifier">heterogenous_hash_multimap</span><span class="special">&lt;</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">&gt;</span></code>.
    5866      </li>
    5967<li class="listitem"><code class="computeroutput"><span class="identifier">hash_multiset</span><span class="special">&lt;</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">&gt;</span></code></li>
     
    6977    </p>
    7078<p>
    71       It may be surprising that <code class="computeroutput"><span class="identifier">map</span><span class="special">&lt;&gt;</span></code> takes only one type - the <code class="computeroutput"><span class="identifier">Base</span></code> type - of objects to store, rather than
     79      It may be surprising that <code class="computeroutput"><span class="identifier">heterogenous_map</span><span class="special">&lt;&gt;</span></code> takes only one type - the <code class="computeroutput"><span class="identifier">Base</span></code> type - of objects to store, rather than
    7280      the more familiar <span class="emphasis"><em>key</em></span> and <span class="emphasis"><em>mapped</em></span>
    7381      types. This is because a heterogenous map provides an association between objects
     
    8290    </p>
    8391<p>
    84      
    85 </p>
    86 <pre class="programlisting"><span class="identifier">container</span><span class="special">.</span><span class="identifier">add_method</span><span class="special">&lt;</span><span class="identifier">Type</span><span class="special">&gt;(</span><span class="identifier">construction</span> <span class="identifier">args</span><span class="special">..);</span>
    87 </pre>
    88 <p>
     92      <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">&lt;</span><span class="identifier">Type</span><span class="special">&gt;(</span><span class="identifier">construction</span>
     93      <span class="identifier">args</span><span class="special">..);</span></code>
    8994    </p>
    9095<p>
     
    100105      a heterogenous container.
    101106    </p>
    102 <p>
    103       Importantly, clones are guaranteed to be created using the same allocator as
    104       that used to make the original objects.
    105     </p>
     107<div class="note" title="Note"><table border="0" summary="Note">
     108<tr>
     109<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/html/images/note.png"></td>
     110<th align="left">Note</th>
     111</tr>
     112<tr><td align="left" valign="top"><p>
     113        clones are guaranteed to be created using the same allocator as that used
     114        to make the original objects.
     115      </p></td></tr>
     116</table></div>
    106117<p>
    107118      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>
  • sandbox/cloneable/libs/cloneable/doc/html/cloneable/heterogenous_containers/hashmap_and_hashset.html

    r54634 r54669  
    77<link rel="home" href="../../index.html" title="Cloneable 0.1">
    88<link rel="up" href="../heterogenous_containers.html" title="Heterogenous Containers">
    9 <link rel="prev" href="map.html" title="Map">
     9<link rel="prev" href="heterogenous_map.html" title="Heterogenous Map">
    1010</head>
    1111<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
     
    2020<hr>
    2121<div class="spirit-nav">
    22 <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>
     22<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>
    2323</div>
    2424<div class="section" title="HashMap and HashSet">
     
    4343<hr>
    4444<div class="spirit-nav">
    45 <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>
     45<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>
    4646</div>
    4747</body>
  • sandbox/cloneable/libs/cloneable/doc/html/cloneable/heterogenous_containers/map.html

    r54660 r54669  
    88<link rel="up" href="../heterogenous_containers.html" title="Heterogenous Containers">
    99<link rel="prev" href="set.html" title="Set">
    10 <link rel="next" href="hashmap_and_hashset.html" title="HashMap and HashSet">
     10<link rel="next" href="heterogenous_map.html" title="Heterogenous Map">
    1111</head>
    1212<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
     
    2121<hr>
    2222<div class="spirit-nav">
    23 <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>
     23<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>
    2424</div>
    2525<div class="section" title="Map">
     
    3535<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
    3636<span class="special">{</span>
    37         <span class="keyword">typedef</span> <span class="identifier">heterogenous</span><span class="special">::</span><span class="identifier">map</span><span class="special">&lt;</span><span class="identifier">Animal</span><span class="special">&gt;</span> <span class="identifier">Map</span><span class="special">;</span>
     37        <span class="keyword">typedef</span> <span class="identifier">map</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">Animal</span><span class="special">&gt;</span> <span class="identifier">Map</span><span class="special">;</span>
    3838        <span class="identifier">Map</span> <span class="identifier">map</span><span class="special">;</span>
    39         <span class="identifier">map</span><span class="special">.</span><span class="identifier">key</span><span class="special">&lt;</span><span class="identifier">Dog</span><span class="special">&gt;(</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">&lt;</span><span class="identifier">Dog</span><span class="special">&gt;(</span><span class="string">"rover"</span><span class="special">,</span> <span class="number">8</span><span class="special">);</span>
    40         <span class="identifier">map</span><span class="special">.</span><span class="identifier">key</span><span class="special">&lt;</span><span class="identifier">Cat</span><span class="special">&gt;(</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">&lt;</span><span class="identifier">Cat</span><span class="special">&gt;(</span><span class="string">"sooty"</span><span class="special">,</span> <span class="number">10</span><span class="special">);</span>
    41         <span class="identifier">map</span><span class="special">.</span><span class="identifier">key</span><span class="special">&lt;</span><span class="identifier">Cat</span><span class="special">&gt;(</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">&lt;</span><span class="identifier">Cat</span><span class="special">&gt;(</span><span class="string">"tigger"</span><span class="special">,</span> <span class="number">14</span><span class="special">);</span>
    42         <span class="identifier">map</span><span class="special">.</span><span class="identifier">key</span><span class="special">&lt;</span><span class="identifier">Labrador</span><span class="special">&gt;(</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">&lt;</span><span class="identifier">Cat</span><span class="special">&gt;(</span><span class="string">"sooty"</span><span class="special">,</span> <span class="number">3</span><span class="special">);</span>
    43        
    44         <span class="comment">// make a deep copy of both the keys and values in the map
    45 </span> <span class="identifier">Map</span> <span class="identifier">copy</span> <span class="special">=</span> <span class="identifier">map</span><span class="special">;</span>
    46        
    47         <span class="comment">// can search for any type of animal
    48 </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">&lt;</span><span class="identifier">Animal</span><span class="special">&gt;(</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>
    49         <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">&lt;</span><span class="identifier">Animal</span><span class="special">&gt;(</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>
    50        
    51         <span class="comment">// or, search for specific animal instances
    52 </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">&lt;</span><span class="identifier">Dog</span><span class="special">&gt;(</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>
    53         <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">&lt;</span><span class="identifier">Cat</span><span class="special">&gt;(</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>
    54         <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">&lt;</span><span class="identifier">Cat</span><span class="special">&gt;(</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>
    55         <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">&lt;</span><span class="identifier">Dog</span><span class="special">&gt;(</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>
    56         <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">&lt;</span><span class="identifier">Dog</span><span class="special">&gt;(</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>
    57        
    58         <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
     39        <span class="identifier">map</span><span class="special">.</span><span class="identifier">insert</span><span class="special">&lt;</span><span class="identifier">Cat</span><span class="special">&gt;(</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>
     40        <span class="identifier">map</span><span class="special">.</span><span class="identifier">insert</span><span class="special">&lt;</span><span class="identifier">Dog</span><span class="special">&gt;(</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>
     41        <span class="identifier">map</span><span class="special">.</span><span class="identifier">insert</span><span class="special">&lt;</span><span class="identifier">Lab</span><span class="special">&gt;(</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>
    5942<span class="special">}</span>
    6043</pre>
     
    7558<hr>
    7659<div class="spirit-nav">
    77 <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>
     60<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>
    7861</div>
    7962</body>
  • sandbox/cloneable/libs/cloneable/doc/html/cloneable/intro.html

    r54657 r54669  
    3030      The <span class="bold"><strong>Boost.Cloneable</strong></span> library provides a means
    3131      for creating, duplicating, and querying instances of object types that are
    32       specified in class hierarchies, and a set of containers[1] for those objects.
     32      specified in class hierarchies, and a set of containers for those objects.
    3333    </p>
    3434<p>
     
    8989      the Boost SVN respository <a href="http://svn.boost.org/svn/boost/sandbox/cloneable/" target="_top">here</a>.
    9090    </p>
    91 <p>
    92       [1] Cloneable objects can be used in containers-of-pointers (based on a modified
    93       <span class="bold"><strong>Boost.PtrContainer</strong></span> implementation), producing
    94       a 'heterogenous' container system with value semantics for comparison and copying,
    95       and emplace semantics for insertion. These containers are currently a part
    96       of the proposal as well, however it is intended that they eventually form a
    97       distinct library. This proposal will focus mostly on the single-object aspect
    98       of the system.
    99     </p>
    10091</div>
    10192<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
  • sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial.html

    r54658 r54669  
    4040<dt><span class="section"><a href="tutorial/using_custom_allocators.html">Using Custom
    4141      Allocators</a></span></dt>
     42<dt><span class="section"><a href="tutorial/cloneable_instance.html">Cloneable Instance</a></span></dt>
    4243<dt><span class="section"><a href="tutorial/cloneable_traits.html">Cloneable Traits</a></span></dt>
    4344</dl></div>
     
    127128<p>
    128129    </p>
    129 <p>
    130       <span class="inlinemediaobject"><img src="../images/note.png" alt="note"></span> we pass references to these functions rather than pointers,
    131       and these functions work for <span class="emphasis"><em>Cloneable</em></span> types and generally.
    132       We can also pass an allocator to these functions, but more on custom allocation
    133       later.
    134     </p>
     130<div class="note" title="Note"><table border="0" summary="Note">
     131<tr>
     132<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/html/images/note.png"></td>
     133<th align="left">Note</th>
     134</tr>
     135<tr><td align="left" valign="top"><p>
     136        we pass references to these functions rather than pointers, and these functions
     137        work for <span class="emphasis"><em>Cloneable</em></span> types and generally. We can also
     138        pass an allocator to these functions, but more on custom allocation later.
     139      </p></td></tr>
     140</table></div>
    135141<p>
    136142      Although it is fine to use the default base class in this example and other
  • sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial/cloneable_traits.html

    r54660 r54669  
    77<link rel="home" href="../../index.html" title="Cloneable 0.1">
    88<link rel="up" href="../tutorial.html" title="Tutorial">
    9 <link rel="prev" href="using_custom_allocators.html" title="Using Custom Allocators">
     9<link rel="prev" href="cloneable_instance.html" title="Cloneable Instance">
    1010<link rel="next" href="../heterogenous_containers.html" title="Heterogenous Containers">
    1111</head>
     
    2121<hr>
    2222<div class="spirit-nav">
    23 <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>
     23<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>
    2424</div>
    2525<div class="section" title="Cloneable Traits">
     
    6767<hr>
    6868<div class="spirit-nav">
    69 <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>
     69<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>
    7070</div>
    7171</body>
  • sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial/dealing_with_muliple_sub_objects.html

    r54658 r54669  
    7777<p>
    7878      </p>
    79 <p>
    80         <span class="inlinemediaobject"><img src="../../images/alert.png" alt="alert"></span> if a sub-type <code class="computeroutput"><span class="identifier">S</span></code>
    81         in type <code class="computeroutput"><span class="identifier">T</span></code> is not default-constructabe,
    82         an exception of type <code class="computeroutput"><span class="identifier">no_default_construction</span></code>
    83         will be thrown if you attempt to default-create a new <code class="computeroutput"><span class="identifier">S</span></code>
    84         instance from a <code class="computeroutput"><span class="identifier">T</span></code> instance.
    85       </p>
     79<div class="warning" title="Warning"><table border="0" summary="Warning">
     80<tr>
     81<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../../../../../../doc/html/images/warning.png"></td>
     82<th align="left">Warning</th>
     83</tr>
     84<tr><td align="left" valign="top"><p>
     85          If a sub-type <code class="computeroutput"><span class="identifier">S</span></code> in type
     86          <code class="computeroutput"><span class="identifier">T</span></code> is not default-constructabe,
     87          an exception of type <code class="computeroutput"><span class="identifier">no_default_construction</span></code>
     88          will be thrown if you attempt to default-create a new <code class="computeroutput"><span class="identifier">S</span></code>
     89          instance from a <code class="computeroutput"><span class="identifier">T</span></code> instance.
     90        </p></td></tr>
     91</table></div>
    8692</div>
    8793<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
  • sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial/simple_hierarchical_cloning.html

    r54658 r54669  
    5353      </p>
    5454<p>
    55         <span class="inlinemediaobject"><img src="../../images/note.png" alt="note"></span> <code class="computeroutput"><span class="identifier">Animal</span></code>
    56         doesn't have to derive from anything, or have any special members or methods.
     55        <code class="computeroutput"><span class="identifier">Animal</span></code> doesn't have to derive
     56        from anything, or have any special members or methods.
     57      </p>
     58<p>
    5759        Now let's use our base class to create a simple type hierarchy:
    5860      </p>
     
    107109<p>
    108110      </p>
    109 <p>
    110         <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
    111         of the type hierarchy - in this case, <code class="computeroutput"><span class="identifier">Animal</span></code>.
    112         We had to use a dynamic cast to down-cast to our derived type.
    113       </p>
    114 <p>
    115         If you know the derived type that you wish to be cloned, you can use the
    116         <code class="computeroutput"><span class="identifier">clone_as</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;()</span></code>
     111<div class="note" title="Note"><table border="0" summary="Note">
     112<tr>
     113<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
     114<th align="left">Note</th>
     115</tr>
     116<tr><td align="left" valign="top"><p>
     117          the <code class="computeroutput"><span class="identifier">clone</span><span class="special">()</span></code>
     118          method returns a pointer to the base class of the type hierarchy - in this
     119          case, <code class="computeroutput"><span class="identifier">Animal</span></code>.
     120        </p></td></tr>
     121</table></div>
     122<p>
     123        We had to use a dynamic cast to down-cast to our derived type. If you know
     124        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">&lt;</span><span class="identifier">T</span><span class="special">&gt;()</span></code>
    117125        method instead and save some typing:
    118126      </p>
  • sandbox/cloneable/libs/cloneable/doc/html/cloneable/tutorial/using_custom_allocators.html

    r54658 r54669  
    88<link rel="up" href="../tutorial.html" title="Tutorial">
    99<link rel="prev" href="customising_the_cloning_process.html" title="Customising the Cloning Process">
    10 <link rel="next" href="cloneable_traits.html" title="Cloneable Traits">
     10<link rel="next" href="cloneable_instance.html" title="Cloneable Instance">
    1111</head>
    1212<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
     
    2121<hr>
    2222<div class="spirit-nav">
    23 <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>
     23<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>
    2424</div>
    2525<div class="section" title="Using Custom Allocators">
     
    9191        create maintenance problems.
    9292      </p>
    93 <p>
    94         <span class="inlinemediaobject"><img src="../../images/tip.png" alt="tip"></span> if your class contains pointers of any description,
    95         or references, then you will in general have to at least provide a sensible
    96         copy-constructor, or provide a custom clone override.
    97       </p>
     93<div class="note" title="Note"><table border="0" summary="Note">
     94<tr>
     95<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/html/images/note.png"></td>
     96<th align="left">Note</th>
     97</tr>
     98<tr><td align="left" valign="top"><p>
     99          if your class contains pointers of any description, or references, then
     100          you will in general have to at least provide a sensible copy-constructor,
     101          or provide a custom clone override.
     102        </p></td></tr>
     103</table></div>
    98104<p>
    99105        In summary, there are three stages of customisation:
     
    125131<hr>
    126132<div class="spirit-nav">
    127 <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>
     133<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>
    128134</div>
    129135</body>
  • sandbox/cloneable/libs/cloneable/doc/html/index.html

    r54660 r54669  
    66<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
    77<link rel="home" href="index.html" title="Cloneable 0.1">
    8 <link rel="next" href="cloneable/intro.html" title="Introduction">
     8<link rel="next" href="cloneable/change_log.html" title="Change Log">
    99</head>
    1010<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
     
    1818</tr></table>
    1919<hr>
    20 <div class="spirit-nav"><a accesskey="n" href="cloneable/intro.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a></div>
     20<div class="spirit-nav"><a accesskey="n" href="cloneable/change_log.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a></div>
    2121<div class="article" title="Cloneable 0.1">
    2222<div class="titlepage">
     
    2929<div><p class="copyright">Copyright © 2009 Christian Schladetsch</p></div>
    3030<div><div class="legalnotice" title="Legal Notice">
    31 <a name="id684042"></a><p>
     31<a name="id663289"></a><p>
    3232        Distributed under the Boost Software License, Version 1.0. (See accompanying
    3333        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
     
    4040<p><b>Table of Contents</b></p>
    4141<dl>
    42 <dt><span class="section"><a href="cloneable/intro.html"> Introduction</a></span></dt>
    4342<dt><span class="section"><a href="cloneable/change_log.html"> Change Log</a></span></dt>
    4443<dt><span class="section"><a href="cloneable/tutorial.html"> Tutorial</a></span></dt>
     
    5655<dt><span class="section"><a href="cloneable/tutorial/using_custom_allocators.html">Using Custom
    5756      Allocators</a></span></dt>
     57<dt><span class="section"><a href="cloneable/tutorial/cloneable_instance.html">Cloneable Instance</a></span></dt>
    5858<dt><span class="section"><a href="cloneable/tutorial/cloneable_traits.html">Cloneable Traits</a></span></dt>
    5959</dl></dd>
     
    6868<dt><span class="section"><a href="cloneable/heterogenous_containers/set.html">Set</a></span></dt>
    6969<dt><span class="section"><a href="cloneable/heterogenous_containers/map.html">Map</a></span></dt>
     70<dt><span class="section"><a href="cloneable/heterogenous_containers/heterogenous_map.html">Heterogenous
     71      Map</a></span></dt>
    7072<dt><span class="section"><a href="cloneable/heterogenous_containers/hashmap_and_hashset.html">HashMap
    7173      and HashSet</a></span></dt>
     
    7375</dl>
    7476</div>
     77<a name="cloneable..motivation"></a><h4>
     78<a name="id663315"></a>
     79    <a class="link" href="index.html#cloneable..motivation">Motivation</a>
     80  </h4>
     81<p>
     82    We still use object type hierarchies, and we often use them with containers.
     83    However, doing so often means that we lose value semantics for those containers,
     84    becuase they typically contain base pointers. We would like to have the ability
     85    to copy containers of base pointers and maintain value semantics, and also to
     86    safely clone and query individual object instances.
     87  </p>
     88<a name="cloneable..description"></a><h4>
     89<a name="id663331"></a>
     90    <a class="link" href="index.html#cloneable..description">Description</a>
     91  </h4>
     92<p>
     93    The <span class="bold"><strong>Boost.Cloneable</strong></span> library provides a means
     94    for creating, duplicating, and querying instances of object types that are specified
     95    in class hierarchies, and a set of containers for those objects.
     96  </p>
     97<p>
     98    Cloneable objects can create clones of derived types from base types, can do
     99    so given any STL-compliant allocator, and supports multiple clone type targets.
     100  </p>
     101<p>
     102    The user of the library is able to override the default cloning process, and
     103    may supply custom allocators. Cloneable types can derive from other cloneable
     104    types, in which case the user can specify which subobject type to duplicate or
     105    create when making a new clone or new object from an existing instance.
     106  </p>
     107<p>
     108    You can use <span class="bold"><strong>Boost.Cloneable</strong></span> with existing, external
     109    types without modification to those types by using the supplied <span class="emphasis"><em>adaptor</em></span>
     110    mechanism. <span class="bold"><strong>Boost.Cloneable</strong></span> also supports types
     111    that are not default-constructable.
     112  </p>
     113<p>
     114    There is a fundamental requirement that a common base class type is shared for
     115    each type in a given class hierarchy. The user can supply their own base classes,
     116    or sensible defaults are generated.
     117  </p>
     118<p>
     119    Key features of the library:
     120  </p>
     121<div class="itemizedlist"><ul class="itemizedlist" type="disc">
     122<li class="listitem">
     123      Can make any class-type Cloneable with or without modification to its definition
     124    </li>
     125<li class="listitem">
     126      Optional user-supplied base classes
     127    </li>
     128<li class="listitem">
     129      Base types can be queried for the interfaces they support
     130    </li>
     131<li class="listitem">
     132      Clones can be created from base types
     133    </li>
     134<li class="listitem">
     135      Supports multiple inheritance, cloning of sub-objects
     136    </li>
     137<li class="listitem">
     138      Supports types with no default constructors
     139    </li>
     140<li class="listitem">
     141      Customisation of the cloning process
     142    </li>
     143<li class="listitem">
     144      Support for custom allocators
     145    </li>
     146<li class="listitem">
     147      A set of heterogenous containers with emplace semantics for object insertion
     148    </li>
     149</ul></div>
     150<p>
     151    The complete source code for the library, with unit-tests, are available in the
     152    Boost SVN respository <a href="http://svn.boost.org/svn/boost/sandbox/cloneable/" target="_top">here</a>.
     153  </p>
    75154</div>
    76155<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
    77 <td align="left"><p><small>Last revised: July 05, 2009 at 00:14:51 GMT</small></p></td>
     156<td align="left"><p><small>Last revised: July 05, 2009 at 10:42:31 GMT</small></p></td>
    78157<td align="right"><div class="copyright-footer"></div></td>
    79158</tr></table>
    80159<hr>
    81 <div class="spirit-nav"><a accesskey="n" href="cloneable/intro.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a></div>
     160<div class="spirit-nav"><a accesskey="n" href="cloneable/change_log.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a></div>
    82161</body>
    83162</html>
  • sandbox/cloneable/libs/cloneable/doc/html/standalone_HTML.manifest

    r54634 r54669  
    11index.html
    2 cloneable/intro.html
    32cloneable/change_log.html
    43cloneable/tutorial.html
     
    98cloneable/tutorial/customising_the_cloning_process.html
    109cloneable/tutorial/using_custom_allocators.html
     10cloneable/tutorial/cloneable_instance.html
    1111cloneable/tutorial/cloneable_traits.html
    1212cloneable/heterogenous_containers.html
     
    1717cloneable/heterogenous_containers/set.html
    1818cloneable/heterogenous_containers/map.html
     19cloneable/heterogenous_containers/heterogenous_map.html
    1920cloneable/heterogenous_containers/hashmap_and_hashset.html
Note: See TracChangeset for help on using the changeset viewer.