Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JClonable.hh
Go to the documentation of this file.
1 #ifndef __JLANG__JCLONABLE__
2 #define __JLANG__JCLONABLE__
3 
4 
5 /**
6  * \author mdejong
7  */
8 
9 namespace JLANG {}
10 namespace JPP { using namespace JLANG; }
11 
12 namespace JLANG {
13 
14 
15  /**
16  * Template interface class for object cloning.
17  */
18  template<class JClass_t>
19  class JClonable {
20  public:
21 
22  /**
23  * Type definition of return value of method clone().
24  */
25  typedef JClass_t* clone_type;
26 
27 
28  /**
29  * Virtual destructor.
30  */
31  virtual ~JClonable()
32  {}
33 
34 
35  /**
36  * Get clone of this object.
37  *
38  * \return pointer to newly created object
39  */
40  virtual clone_type clone() const = 0;
41  };
42 }
43 
44 
45 #endif
virtual clone_type clone() const =0
Get clone of this object.
virtual ~JClonable()
Virtual destructor.
Definition: JClonable.hh:31
Template interface class for object cloning.
Definition: JClonable.hh:19
JClass_t * clone_type
Type definition of return value of method clone().
Definition: JClonable.hh:25