#include "rpc_server.hpp" #include "vm_provider.hpp" #include namespace sliger::rpc::action { struct Action { virtual auto perform_action(std::unique_ptr writer, VmProvider& vm_provider) -> void = 0; virtual ~Action() = default; }; class Status : public Action { public: Status() { } auto perform_action(std::unique_ptr writer, VmProvider& vm_provider) -> void; }; class FlameGraph : public Action { public: FlameGraph() { } auto perform_action(std::unique_ptr writer, VmProvider& vm_provider) -> void; }; class CodeCoverage : public Action { public: CodeCoverage() { } auto perform_action(std::unique_ptr writer, VmProvider& vm_provider) -> void; }; class RunDebug : public Action { public: RunDebug(std::vector instructions) : instructions(instructions) { } auto perform_action(std::unique_ptr writer, VmProvider& vm_provider) -> void; private: std::vector instructions; }; auto action_from_json(const json::Value& value) -> std::unique_ptr; }