class Committer { // interface
public:
virtual void commit() = 0;
virtual ~Committer() = default;
}
enum class ErrCode { OK, UNCLONEABLE, BAD_RECIPIENT };
struct CommitObj {
ErrCode errCode;
std::unique_ptr<Committer> action;
}
class UiObj {
public:
virtual CommitObj startClone(std::shared_ptr<UiObj> recipient) = 0;
}