#ifndef INVOKER_HPP #define INVOKER_HPP #include "steppable.hpp" #include class Invoker { public: virtual ~Invoker() = default; std::weak_ptr target; void set_target(std::shared_ptr t) { target = t; } void request() { if (auto sp = target.lock()) { sp->step(); } } }; #endif