X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/df2bb45e41303b5132feb6b264caaa01c31b8bb5..d625e80d62fc8b98c18a95c65e6fa329b7fcc85b:/projects/sgconf/action.h diff --git a/projects/sgconf/action.h b/projects/sgconf/action.h index 469d7460..64d7c1e8 100644 --- a/projects/sgconf/action.h +++ b/projects/sgconf/action.h @@ -35,6 +35,7 @@ class ACTION public: virtual ~ACTION() {} + virtual ACTION * Clone() const = 0; virtual std::string ParamDescription() const = 0; virtual std::string DefaultDescription() const = 0; virtual OPTION_BLOCK & Suboptions() = 0; @@ -48,6 +49,13 @@ class ACTION }; }; +template +class ACTION_CLONE_MIXIN : public ACTION +{ + public: + virtual ACTION * Clone() const { return new T(*this); } +}; + } // namespace SGCONF #endif