3#include "elementa/license.inc"
4#include "elementa/checks.inc"
6#ifndef ELEMENTA_PATTERNS_CLONABLE_H
7#define ELEMENTA_PATTERNS_CLONABLE_H
113 virtual std::shared_ptr<C>
clone(
void)
const = 0;
virtual Clonable * clone(void) const =0
Derived classes must implement this method varying its return type.
virtual Clonable * emptyClone(void) const
Derived classes can override this to provide a clone that is "empty".
virtual std::shared_ptr< C > * emptyClone(void) const
Derived classes can override this to provide a clone that is "empty".
virtual std::shared_ptr< C > clone(void) const =0
Derived classes must implement this method, returning the same return.
Any class derived from this base class must be clonable.
Any class derived from this must be clonable.
#define ELE_CODE_UNIMPLEMENTED
To throw an unimplemented exception.