| 234 | |
| 235 | --------------------------------------------------------------------------------------------------- |
| 236 | == Boost.Cloneable == |
| 237 | |
| 238 | * '''Author(s):''' Christian Schladetsch |
| 239 | * '''Version:''' 0.1 |
| 240 | * '''State:''' |
| 241 | * '''Last upload:''' 2009 July 08 |
| 242 | * '''Links:''' [https://svn.boost.org/svn/boost/sandbox/cloneable Boost Sandbox] |
| 243 | * '''Categories:''' [#Containers Containers] [#!DataStructures Data Structures] [#Utilities Utilities] |
| 244 | * '''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 for those objects. |
| 245 | |
| 246 | 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. |
| 247 | |
| 248 | 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. |
| 249 | |
| 250 | You can use Boost.Cloneable with existing, external types without modification to those types by using the supplied adaptor mechanism. Boost.Cloneable also supports types that are not default-constructable. |
| 251 | |
| 252 | 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. |
| 253 | |
| 254 | Key features of the library: |
| 255 | |
| 256 | * Can make any class-type Cloneable with or without modification to its definition |
| 257 | * Optional user-supplied base classes |
| 258 | * Base types can be queried for the interfaces they support |
| 259 | * Clones can be created from base types |
| 260 | * Supports multiple inheritance, cloning of sub-objects |
| 261 | * Supports types with no default constructors |
| 262 | * Customisation of the cloning process |
| 263 | * Support for custom allocators |
| 264 | * A set of heterogenous containers with emplace semantics for object insertion |
| 265 | |