#ifndef _FRONTEND_HPP_ #define _FRONTEND_HPP_ #include #include // Abstract entry-point interface every frontend (TUI, GUI, …) implements, so // one shared launcher (frontend_main) can drive any of them: parse argv, run // boot commands, optionally dump output (batch / docs) and enter the event // loop. Lives in the frontends layer — essim_core never depends on it. class Frontend { public: virtual ~Frontend() = default; // Dispatch one command synchronously, exactly as if the user typed it // (e.g. "restore foo.essim" or "source bring-up.essim"), before the event // loop starts — used to seed the system at boot. virtual void BootDispatch(const std::string &raw) = 0; // Write the command registry as Markdown (used for doc generation). virtual void DumpCommandsMd(std::ostream &out) const = 0; // Write the accumulated console output (batch mode: no event loop). virtual void DumpOutput(std::ostream &out) const = 0; // Enter the interactive event loop. virtual void Run() = 0; }; #endif // _FRONTEND_HPP_