Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
A pure abstract class (interface) for inherited cloneable classes. More...
#include <bayeux/datatools/i_cloneable.h>
Public Member Functions | |
virtual i_cloneable * | clone (void) const =0 |
virtual | ~i_cloneable () |
template<class CandidateType > | |
bool | is_cloneable (const CandidateType &candidate_) |
Static Public Member Functions | |
template<class Copyable > | |
static Copyable * | clone_it (const Copyable &a_copyable) |
A pure abstract class (interface) for inherited cloneable classes.
This is a pure abstract class that can be inherited for class cloning service (only for copyable objects).
Some macros are provided for declaration and definition of a clone method within a class. Should be in public scope.
Example:
Header file (my_data.h):
Implementation file (my_data.cc):
The my_data class must have a copy constructor (or a default copy constructor provided by the compiler).
|
inlinevirtual |
The virtual destructor
|
pure virtual |
A pure virtual member.
|
inlinestatic |
Templatized static method for cloning copyable objects.
|
inline |