diff --git a/DESIGN.md b/DESIGN.md index db33e52..afe33b1 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -61,10 +61,15 @@ src/ import_base.hpp / import_{mentor,altium,ods}.{hpp,cpp} / ods_writer.{hpp,cpp} app/ -- application operations (UI-independent use cases) export.{hpp,cpp} export_connections(System*, path, format) -> ExportResult + verify.{hpp,cpp} verify(System*) -> VerifyReport (the 7 verify passes) + connect.{hpp,cpp} connect_parts(System*, m1,p1, m2,p2) -> ConnectResult + load.{hpp,cpp} load_module(System*, name, path, ImportType) -> LoadResult frontends/ -- one directory per GUI/TUI engine; each links essim_core + frontend.hpp -- abstract Frontend interface (BootDispatch/Dump*/Run) + frontend_main.{hpp,cpp} -- frontend_main(argc,argv,Frontend&): argv + boot/batch/run tui/ -- FTXUI shell (builds libessim_tui + the `essim` binary) CMakeLists.txt fetches FTXUI; builds essim_tui + essim - main.cpp entry point (CLI flags -> Tui) + main.cpp entry point: construct Tui, call frontend_main tui.{hpp,cpp} class Tui (state + Run() + screen-mode event dispatch) tui_helpers.{hpp,cpp} ToLower, NaturalLess, RenderHelpPanel shell.cpp Print, Submit, Dispatch, Source / ProcessNextSourceLine @@ -93,8 +98,15 @@ The hard rule: **`src/core/` never depends on a frontend** — no `#include inside its lambda. The TUI command is now a thin wrapper — resolve args/dialog → call the core op → render the result.) - **Frontends** (`frontends//`) — thin: map UI events to core calls and - render results. Add one by creating `src/frontends//CMakeLists.txt` (build - `essim_` linking `essim_core`, produce the `essim` binary) and configuring + render results. Each implements the **`Frontend`** interface + (`frontends/frontend.hpp`: `BootDispatch`, `DumpCommandsMd`, `DumpOutput`, + `Run`). The process entry is shared and frontend-agnostic: + `frontend_main(argc, argv, Frontend&)` (`frontends/frontend_main.cpp`, built + into the toolkit-free `essim_frontend` lib) parses the CLI flags and drives the + boot → batch/run flow through the interface; a frontend's `main()` is just + *construct the concrete Frontend, call `frontend_main`*. Add one by creating + `src/frontends//CMakeLists.txt` (build `essim_` linking `essim_core`, + produce the `essim` binary linking `essim_frontend`) and configuring `-DESSIM_FRONTEND=`. Because the core links no toolkit, the suite links `essim_core` directly and