Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Member Functions | Static Public Member Functions | List of all members
datatools::i_cloneable Class Referenceabstract

A pure abstract class (interface) for inherited cloneable classes. More...

#include <bayeux/datatools/i_cloneable.h>

Inheritance diagram for datatools::i_cloneable:
datatools::multi_properties datatools::properties mctools::signal::multi_signal_shape mctools::signal::triangle_gate_signal_shape mctools::signal::triangle_signal_shape mygsl::gate_function mygsl::gaussian_function mygsl::gompertz_function mygsl::heaviside_function mygsl::logistic_function mygsl::polynomial mygsl::rectangular_function mygsl::tabulated_function mygsl::triangle_function

Public Member Functions

virtual i_cloneableclone (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)

Detailed Description

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.


Header file (my_data.h):

class my_data : public datatools::i_cloneable {

Implementation file (

#include <my_data.h>

The my_data class must have a copy constructor (or a default copy constructor provided by the compiler).

Constructor & Destructor Documentation

◆ ~i_cloneable()

virtual datatools::i_cloneable::~i_cloneable ( )

The virtual destructor

Member Function Documentation

◆ clone()

virtual i_cloneable* datatools::i_cloneable::clone ( void  ) const
pure virtual

A pure virtual member.

a pointer to a new instance of a cloneable class.

◆ clone_it()

template<class Copyable >
static Copyable* datatools::i_cloneable::clone_it ( const Copyable &  a_copyable)

Templatized static method for cloning copyable objects.

◆ is_cloneable()

template<class CandidateType >
bool datatools::i_cloneable::is_cloneable ( const CandidateType &  candidate_)

The documentation for this class was generated from the following file: