docs: DESIGN — Frontend interface + frontend_main, app/ ops, layout
Reflect the new shared frontends layer (frontend.hpp / frontend_main) in the Architecture section and layout tree, and list the verify/connect/load app ops alongside export. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
18
DESIGN.md
18
DESIGN.md
@@ -61,10 +61,15 @@ src/
|
|||||||
import_base.hpp / import_{mentor,altium,ods}.{hpp,cpp} / ods_writer.{hpp,cpp}
|
import_base.hpp / import_{mentor,altium,ods}.{hpp,cpp} / ods_writer.{hpp,cpp}
|
||||||
app/ -- application operations (UI-independent use cases)
|
app/ -- application operations (UI-independent use cases)
|
||||||
export.{hpp,cpp} export_connections(System*, path, format) -> ExportResult
|
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
|
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)
|
tui/ -- FTXUI shell (builds libessim_tui + the `essim` binary)
|
||||||
CMakeLists.txt fetches FTXUI; builds essim_tui + essim
|
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.{hpp,cpp} class Tui (state + Run() + screen-mode event dispatch)
|
||||||
tui_helpers.{hpp,cpp} ToLower, NaturalLess, RenderHelpPanel
|
tui_helpers.{hpp,cpp} ToLower, NaturalLess, RenderHelpPanel
|
||||||
shell.cpp Print, Submit, Dispatch, Source / ProcessNextSourceLine
|
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
|
inside its lambda. The TUI command is now a thin wrapper — resolve args/dialog
|
||||||
→ call the core op → render the result.)
|
→ call the core op → render the result.)
|
||||||
- **Frontends** (`frontends/<name>/`) — thin: map UI events to core calls and
|
- **Frontends** (`frontends/<name>/`) — thin: map UI events to core calls and
|
||||||
render results. Add one by creating `src/frontends/<name>/CMakeLists.txt` (build
|
render results. Each implements the **`Frontend`** interface
|
||||||
`essim_<name>` linking `essim_core`, produce the `essim` binary) and configuring
|
(`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/<name>/CMakeLists.txt` (build `essim_<name>` linking `essim_core`,
|
||||||
|
produce the `essim` binary linking `essim_frontend`) and configuring
|
||||||
`-DESSIM_FRONTEND=<name>`.
|
`-DESSIM_FRONTEND=<name>`.
|
||||||
|
|
||||||
Because the core links no toolkit, the suite links `essim_core` directly and
|
Because the core links no toolkit, the suite links `essim_core` directly and
|
||||||
|
|||||||
Reference in New Issue
Block a user