/home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/external/stlplus/include/stlplus/clonable.hpp Source File

Ratpac-two: /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/external/stlplus/include/stlplus/clonable.hpp Source File
Ratpac-two
clonable.hpp
1 #ifndef CLONABLE_HPP
2 #define CLONABLE_HPP
3 /*------------------------------------------------------------------------------
4 
5  Author: Andy Rushton
6  Copyright: (c) Andy Rushton, 2004
7  License: BSD License, see ../docs/license.html
8 
9  This abstract class defines the clonable interface
10 
11  The clonable interface is used by smart_ptr_clone and by the persistence
12  functions for polymorphic types.
13 
14  If you make any class a subclass of clonable, then you must provide a
15  clone() method with the type profile specified here. This method must copy
16  the object (i.e. *this), returning a new-allocated object with the same
17  contents.
18 
19  If you provide this interface, all systems requiring a clonable object will
20  work correctly.
21 
22  ------------------------------------------------------------------------------*/
23 
24 class clonable {
25  public:
26  virtual clonable* clone(void) const = 0;
27 };
28 
29 #endif
Definition: clonable.hpp:24