|
DuxReiNummariae 1.1.0-alpha.19
Simple and powerful budgeting application
|
Abstract base class requiring derived classes to implement deep-copy functionality. More...
#include <Mixins.hpp>
Public Member Functions | |
| virtual | ~RequireClonable ()=default |
| virtual std::unique_ptr< BaseType > | clone () const =0 |
| When implemented, creates a polymorphic deep copy of the object. | |
Abstract base class requiring derived classes to implement deep-copy functionality.
Provides an interface for creating polymorphic deep copies of objects. Classes that inherit from this must implement the clone method, enabling the creation of a unique pointer to a new copy of the object. This facilitates copying of instances while preserving their full dynamic type.
| BaseType | The base type of objects which can be cloned. |
|
virtualdefault |
|
nodiscardpure virtual |
When implemented, creates a polymorphic deep copy of the object.
Ensures the creation of a new instance of the derived type, preserving the object's dynamic type.
Implemented in drn::budgeting::Bill, drn::budgeting::Debt, drn::budgeting::Goal, drn::budgeting::Nontrack, and drn::budgeting::Wage.