|
LBANN
0.103.0
LivermoreBigArtificialNeuralNetworkToolkit
|
Inject polymorphic clone functions into hierarchies. More...
#include <cloneable.hpp>
Public Member Functions | |
| std::unique_ptr< T > | clone () const |
| Return an exception-safe, memory-safe copy of this object. More... | |
Private Member Functions | |
| virtual Cloneable * | do_clone_ () const override |
| Implement the covariant raw-pointer-based clone operation. More... | |
Inject polymorphic clone functions into hierarchies.
This class uses CRTP to inject the derived class's clone() function directly into the class and uses the Template Method to virtualize it.
| T | The concrete class to be cloned. |
| Base | The base class of T. |
Definition at line 94 of file cloneable.hpp.
|
inline |
Return an exception-safe, memory-safe copy of this object.
Definition at line 98 of file cloneable.hpp.
|
inlineoverrideprivatevirtual |
Implement the covariant raw-pointer-based clone operation.
Definition at line 105 of file cloneable.hpp.