From 63ca17d04896b03a5331a94b1106f54174831d9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Wed, 3 Jun 2026 19:33:06 +0200 Subject: [PATCH] build: split core/ from frontends/; prepare for multiple GUI/TUI targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reorganise the tree into business vs frontend as separate directories: src/core/{domain,imports,app} (was system/, imports/, app/) src/frontends/tui/ (was tui/ + main.cpp) tests/tui/ (the FTXUI-coupled helper test) All cross-dir #include paths rewritten; same-dir includes untouched. CMake: essim_core is the frontend-agnostic business library — links libzip, pugixml and bsdl, NO GUI toolkit. Each frontend is a self-contained src/frontends// (own CMakeLists, toolkit, main.cpp) that links essim_core, selected with -DESSIM_FRONTEND= (default tui; 'none' = core + tests only, no toolkit fetched). FTXUI moved into the tui frontend. Tests are split: essim_tests links essim_core (no FTXUI), essim_tui_tests links essim_tui. Verified: default tui build green (ctest 2/2); ESSIM_FRONTEND=none builds the core + tests with FTXUI never fetched and no `essim` binary. Co-Authored-By: Claude Opus 4.8 --- CMakeLists.txt | 95 +++++++++++-------- src/{ => core}/app/export.cpp | 18 ++-- src/{ => core}/app/export.hpp | 0 src/{system => core/domain}/analysis.cpp | 0 src/{system => core/domain}/analysis.hpp | 0 src/{system => core/domain}/bsdl_check.cpp | 0 src/{system => core/domain}/bsdl_check.hpp | 0 src/{system => core/domain}/bsdl_model.cpp | 0 src/{system => core/domain}/bsdl_model.hpp | 0 .../domain}/component_kind.cpp | 2 +- .../domain}/component_kind.hpp | 0 src/{system => core/domain}/connect.cpp | 0 src/{system => core/domain}/connect.hpp | 0 src/{system => core/domain}/modules.cpp | 0 src/{system => core/domain}/modules.hpp | 0 src/{system => core/domain}/nets.cpp | 14 +-- src/{system => core/domain}/nets.hpp | 0 src/{system => core/domain}/parts.cpp | 0 src/{system => core/domain}/parts.hpp | 0 src/{system => core/domain}/persist.cpp | 0 src/{system => core/domain}/persist.hpp | 0 src/{system => core/domain}/pin_model.cpp | 0 src/{system => core/domain}/pin_model.hpp | 0 src/{system => core/domain}/pin_name.cpp | 2 +- src/{system => core/domain}/pin_name.hpp | 0 src/{system => core/domain}/pin_role.cpp | 0 src/{system => core/domain}/pin_role.hpp | 0 src/{system => core/domain}/pin_spec.hpp | 0 src/{system => core/domain}/pins.cpp | 0 src/{system => core/domain}/pins.hpp | 0 src/{system => core/domain}/signal_type.hpp | 0 src/{system => core/domain}/signals.cpp | 0 src/{system => core/domain}/signals.hpp | 0 src/{system => core/domain}/syselmts.hpp | 0 src/{system => core/domain}/system.cpp | 6 +- src/{system => core/domain}/system.hpp | 2 +- src/{system => core/domain}/transform.cpp | 0 src/{system => core/domain}/transform.hpp | 0 src/{system => core/domain}/transform_vpx.cpp | 0 src/{system => core/domain}/transform_vpx.hpp | 0 src/{ => core}/imports/import_altium.cpp | 6 +- src/{ => core}/imports/import_altium.hpp | 0 src/{ => core}/imports/import_base.hpp | 4 +- src/{ => core}/imports/import_mentor.cpp | 4 +- src/{ => core}/imports/import_mentor.hpp | 0 src/{ => core}/imports/import_ods.cpp | 6 +- src/{ => core}/imports/import_ods.hpp | 0 src/{ => core}/imports/ods_writer.cpp | 0 src/{ => core}/imports/ods_writer.hpp | 0 src/frontends/tui/CMakeLists.txt | 35 +++++++ src/{ => frontends}/tui/commands.cpp | 34 +++---- src/{ => frontends}/tui/commands_export.cpp | 8 +- src/{ => frontends}/tui/completion.cpp | 4 +- src/{ => frontends/tui}/main.cpp | 2 +- src/{ => frontends}/tui/screen_analyze.cpp | 22 ++--- src/{ => frontends}/tui/screen_confirm.cpp | 2 +- src/{ => frontends}/tui/screen_connect.cpp | 14 +-- src/{ => frontends}/tui/screen_dashboard.cpp | 22 ++--- src/{ => frontends}/tui/screen_error.cpp | 2 +- src/{ => frontends}/tui/screen_explore.cpp | 18 ++-- src/{ => frontends}/tui/screen_filedialog.cpp | 4 +- src/{ => frontends}/tui/screen_help.cpp | 4 +- src/{ => frontends}/tui/screen_main.cpp | 4 +- src/{ => frontends}/tui/screen_palette.cpp | 10 +- src/{ => frontends}/tui/screen_settype.cpp | 18 ++-- .../tui/screen_sigtype_modal.cpp | 8 +- src/{ => frontends}/tui/shell.cpp | 10 +- src/{ => frontends}/tui/tui.cpp | 4 +- src/{ => frontends}/tui/tui.hpp | 0 src/{ => frontends}/tui/tui_helpers.cpp | 2 +- src/{ => frontends}/tui/tui_helpers.hpp | 0 tests/test_analysis.cpp | 12 +-- tests/test_bsdl_apply.cpp | 18 ++-- tests/test_bsdl_check.cpp | 16 ++-- tests/test_component_kind.cpp | 4 +- tests/test_export.cpp | 14 +-- tests/test_nc_origin.cpp | 12 +-- tests/test_persist.cpp | 14 +-- tests/test_pin_model.cpp | 8 +- tests/test_pin_name.cpp | 8 +- tests/test_signal_type.cpp | 2 +- tests/test_vpx_transform.cpp | 14 +-- tests/{ => tui}/test_helpers.cpp | 2 +- 83 files changed, 282 insertions(+), 228 deletions(-) rename src/{ => core}/app/export.cpp (95%) rename src/{ => core}/app/export.hpp (100%) rename src/{system => core/domain}/analysis.cpp (100%) rename src/{system => core/domain}/analysis.hpp (100%) rename src/{system => core/domain}/bsdl_check.cpp (100%) rename src/{system => core/domain}/bsdl_check.hpp (100%) rename src/{system => core/domain}/bsdl_model.cpp (100%) rename src/{system => core/domain}/bsdl_model.hpp (100%) rename src/{system => core/domain}/component_kind.cpp (98%) rename src/{system => core/domain}/component_kind.hpp (100%) rename src/{system => core/domain}/connect.cpp (100%) rename src/{system => core/domain}/connect.hpp (100%) rename src/{system => core/domain}/modules.cpp (100%) rename src/{system => core/domain}/modules.hpp (100%) rename src/{system => core/domain}/nets.cpp (93%) rename src/{system => core/domain}/nets.hpp (100%) rename src/{system => core/domain}/parts.cpp (100%) rename src/{system => core/domain}/parts.hpp (100%) rename src/{system => core/domain}/persist.cpp (100%) rename src/{system => core/domain}/persist.hpp (100%) rename src/{system => core/domain}/pin_model.cpp (100%) rename src/{system => core/domain}/pin_model.hpp (100%) rename src/{system => core/domain}/pin_name.cpp (94%) rename src/{system => core/domain}/pin_name.hpp (100%) rename src/{system => core/domain}/pin_role.cpp (100%) rename src/{system => core/domain}/pin_role.hpp (100%) rename src/{system => core/domain}/pin_spec.hpp (100%) rename src/{system => core/domain}/pins.cpp (100%) rename src/{system => core/domain}/pins.hpp (100%) rename src/{system => core/domain}/signal_type.hpp (100%) rename src/{system => core/domain}/signals.cpp (100%) rename src/{system => core/domain}/signals.hpp (100%) rename src/{system => core/domain}/syselmts.hpp (100%) rename src/{system => core/domain}/system.cpp (88%) rename src/{system => core/domain}/system.hpp (93%) rename src/{system => core/domain}/transform.cpp (100%) rename src/{system => core/domain}/transform.hpp (100%) rename src/{system => core/domain}/transform_vpx.cpp (100%) rename src/{system => core/domain}/transform_vpx.hpp (100%) rename src/{ => core}/imports/import_altium.cpp (96%) rename src/{ => core}/imports/import_altium.hpp (100%) rename src/{ => core}/imports/import_base.hpp (95%) rename src/{ => core}/imports/import_mentor.cpp (98%) rename src/{ => core}/imports/import_mentor.hpp (100%) rename src/{ => core}/imports/import_ods.cpp (97%) rename src/{ => core}/imports/import_ods.hpp (100%) rename src/{ => core}/imports/ods_writer.cpp (100%) rename src/{ => core}/imports/ods_writer.hpp (100%) create mode 100644 src/frontends/tui/CMakeLists.txt rename src/{ => frontends}/tui/commands.cpp (98%) rename src/{ => frontends}/tui/commands_export.cpp (95%) rename src/{ => frontends}/tui/completion.cpp (97%) rename src/{ => frontends/tui}/main.cpp (99%) rename src/{ => frontends}/tui/screen_analyze.cpp (97%) rename src/{ => frontends}/tui/screen_confirm.cpp (98%) rename src/{ => frontends}/tui/screen_connect.cpp (96%) rename src/{ => frontends}/tui/screen_dashboard.cpp (97%) rename src/{ => frontends}/tui/screen_error.cpp (97%) rename src/{ => frontends}/tui/screen_explore.cpp (98%) rename src/{ => frontends}/tui/screen_filedialog.cpp (99%) rename src/{ => frontends}/tui/screen_help.cpp (99%) rename src/{ => frontends}/tui/screen_main.cpp (97%) rename src/{ => frontends}/tui/screen_palette.cpp (97%) rename src/{ => frontends}/tui/screen_settype.cpp (94%) rename src/{ => frontends}/tui/screen_sigtype_modal.cpp (95%) rename src/{ => frontends}/tui/shell.cpp (98%) rename src/{ => frontends}/tui/tui.cpp (99%) rename src/{ => frontends}/tui/tui.hpp (100%) rename src/{ => frontends}/tui/tui_helpers.cpp (98%) rename src/{ => frontends}/tui/tui_helpers.hpp (100%) rename tests/{ => tui}/test_helpers.cpp (98%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 04cc668..bbdc32b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,49 +11,54 @@ project(essim include(FetchContent) -set(FTXUI_BUILD_DOCS OFF CACHE INTERNAL "") -set(FTXUI_BUILD_EXAMPLES OFF CACHE INTERNAL "") -set(FTXUI_BUILD_TESTS OFF CACHE INTERNAL "") -set(FTXUI_ENABLE_INSTALL OFF CACHE INTERNAL "") - -FetchContent_Declare(ftxui - GIT_REPOSITORY https://github.com/ArthurSonzogni/FTXUI.git - GIT_TAG v6.1.9 - GIT_SHALLOW TRUE -) -FetchContent_MakeAvailable(ftxui) - -find_package(libzip REQUIRED) -find_package(pugixml REQUIRED) - -# libbsdl — standalone BSDL parser (LGPL-2.1), dynamically linked from essim -# (EUPL-1.2, which the LGPL permits). Path overridable via -DBSDL_DIR=...; -# its CLI and tests are not needed inside essim's build. +# ----------------------------------------------------------------- core deps +# libbsdl — standalone BSDL parser (LGPL-2.1), dynamically linked (EUPL-1.2, +# which the LGPL permits). Override its path with -DBSDL_DIR=... set(BSDL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../libbsdl" CACHE PATH "libbsdl source tree") set(BSDL_BUILD_CLI OFF CACHE BOOL "" FORCE) set(BSDL_BUILD_TESTS OFF CACHE BOOL "" FORCE) add_subdirectory(${BSDL_DIR} ${CMAKE_BINARY_DIR}/libbsdl) -# Library target = everything except main.cpp; reused by `essim` and `essim_tests`. -file(GLOB_RECURSE LIB_SOURCES "src/*.cpp") -list(REMOVE_ITEM LIB_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp") +find_package(libzip REQUIRED) +find_package(pugixml REQUIRED) -add_library(essim_lib STATIC ${LIB_SOURCES}) -target_include_directories(essim_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src) -target_link_libraries(essim_lib +# =============================================================== essim_core +# All business logic — domain model, importers, application operations +# (src/core/{domain,imports,app}). Frontend-agnostic: it links NO GUI/TUI +# toolkit, so every frontend and the test suite share the exact same core. +file(GLOB_RECURSE CORE_SOURCES "src/core/*.cpp") +add_library(essim_core STATIC ${CORE_SOURCES}) +target_include_directories(essim_core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src) +target_link_libraries(essim_core PUBLIC - ftxui::screen - ftxui::dom - ftxui::component libzip::zip pugixml::pugixml bsdl::bsdl ) -add_executable(essim src/main.cpp) -target_link_libraries(essim PRIVATE essim_lib) +# =============================================================== frontend(s) +# Pick the GUI/TUI frontend to build the `essim` binary against. Each frontend +# is a self-contained src/frontends// (own CMakeLists, GUI toolkit, and +# main.cpp) that links essim_core. "none" builds the core + tests only — no GUI +# toolkit is fetched. To add a frontend (e.g. a Qt GUI), create +# src/frontends/gui/ and configure with -DESSIM_FRONTEND=gui. +set(ESSIM_FRONTEND "tui" CACHE STRING + "Frontend to build: a directory name under src/frontends/, or 'none'") +set_property(CACHE ESSIM_FRONTEND PROPERTY STRINGS tui none) -# Tests +if(ESSIM_FRONTEND STREQUAL "none") + message(STATUS "essim: ESSIM_FRONTEND=none — core + tests only (no frontend, no GUI toolkit)") +elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/frontends/${ESSIM_FRONTEND}/CMakeLists.txt") + message(STATUS "essim: building frontend '${ESSIM_FRONTEND}'") + add_subdirectory(src/frontends/${ESSIM_FRONTEND}) +else() + message(FATAL_ERROR + "Unknown ESSIM_FRONTEND '${ESSIM_FRONTEND}' — expected " + "src/frontends/${ESSIM_FRONTEND}/CMakeLists.txt, or 'none'.") +endif() + +# =============================================================== tests (core) +# The suite exercises essim_core only — no frontend, no GUI toolkit. include(CTest) if(BUILD_TESTING) set(CMAKE_POLICY_VERSION_MINIMUM 3.5) @@ -65,20 +70,35 @@ if(BUILD_TESTING) FetchContent_MakeAvailable(doctest) unset(CMAKE_POLICY_VERSION_MINIMUM) + # Core tests — exercise essim_core only (tests/*.cpp, non-recursive, so the + # per-frontend tests under tests// are not pulled in here). file(GLOB TEST_SOURCES "tests/*.cpp") if(TEST_SOURCES) add_executable(essim_tests ${TEST_SOURCES}) - target_link_libraries(essim_tests PRIVATE essim_lib doctest::doctest) + target_link_libraries(essim_tests PRIVATE essim_core doctest::doctest) add_test(NAME essim_tests COMMAND essim_tests) endif() + + # Per-frontend tests — tests//*.cpp, built and linked against that + # frontend's library only when the frontend itself is built. + if(TARGET essim_tui) + file(GLOB TUI_TEST_SOURCES "tests/tui/*.cpp") + if(TUI_TEST_SOURCES) + add_executable(essim_tui_tests + "${CMAKE_CURRENT_SOURCE_DIR}/tests/doctest_main.cpp" ${TUI_TEST_SOURCES}) + target_link_libraries(essim_tui_tests PRIVATE essim_tui doctest::doctest) + add_test(NAME essim_tui_tests COMMAND essim_tui_tests) + endif() + endif() endif() -# Documentation: Doxygen → XML → custom Python script → doc/api/ (Markdown rendered by gitea). -# Optional — `doc` target is only created if Doxygen and Python 3 are present. +# =============================================================== documentation +# Doxygen → XML → gen_api_md.py → doc/api/, plus `essim --commands-md`. Needs the +# `essim` binary, so it's only wired when a frontend that provides one is built. find_package(Doxygen COMPONENTS doxygen) find_package(Python3 COMPONENTS Interpreter) -if(DOXYGEN_FOUND AND Python3_Interpreter_FOUND) +if(TARGET essim AND DOXYGEN_FOUND AND Python3_Interpreter_FOUND) set(DOXYGEN_OUTPUT_DIR "${CMAKE_BINARY_DIR}/doc") file(MAKE_DIRECTORY "${DOXYGEN_OUTPUT_DIR}") configure_file( @@ -103,11 +123,10 @@ if(DOXYGEN_FOUND AND Python3_Interpreter_FOUND) WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" COMMENT "Generating documentation (doxygen → gen_api_md.py → doc/api/, essim --commands-md → doc/user/commands.md)" VERBATIM) -elseif(NOT DOXYGEN_FOUND AND NOT Python3_Interpreter_FOUND) - message(STATUS "doc: Doxygen and Python 3 not found — `doc` target disabled.") +elseif(NOT TARGET essim) + message(STATUS "doc: no `essim` binary (ESSIM_FRONTEND=none) — `doc` target disabled.") elseif(NOT DOXYGEN_FOUND) - message(STATUS "doc: Doxygen not found — `doc` target disabled " - "(install via `pacman -S doxygen`).") + message(STATUS "doc: Doxygen not found — `doc` target disabled.") else() message(STATUS "doc: Python 3 interpreter not found — `doc` target disabled.") endif() diff --git a/src/app/export.cpp b/src/core/app/export.cpp similarity index 95% rename from src/app/export.cpp rename to src/core/app/export.cpp index c828b6d..257b073 100644 --- a/src/app/export.cpp +++ b/src/core/app/export.cpp @@ -1,13 +1,13 @@ -#include "app/export.hpp" +#include "core/app/export.hpp" -#include "imports/ods_writer.hpp" -#include "system/connect.hpp" -#include "system/modules.hpp" -#include "system/parts.hpp" -#include "system/pins.hpp" -#include "system/signal_type.hpp" -#include "system/signals.hpp" -#include "system/system.hpp" +#include "core/imports/ods_writer.hpp" +#include "core/domain/connect.hpp" +#include "core/domain/modules.hpp" +#include "core/domain/parts.hpp" +#include "core/domain/pins.hpp" +#include "core/domain/signal_type.hpp" +#include "core/domain/signals.hpp" +#include "core/domain/system.hpp" #include #include diff --git a/src/app/export.hpp b/src/core/app/export.hpp similarity index 100% rename from src/app/export.hpp rename to src/core/app/export.hpp diff --git a/src/system/analysis.cpp b/src/core/domain/analysis.cpp similarity index 100% rename from src/system/analysis.cpp rename to src/core/domain/analysis.cpp diff --git a/src/system/analysis.hpp b/src/core/domain/analysis.hpp similarity index 100% rename from src/system/analysis.hpp rename to src/core/domain/analysis.hpp diff --git a/src/system/bsdl_check.cpp b/src/core/domain/bsdl_check.cpp similarity index 100% rename from src/system/bsdl_check.cpp rename to src/core/domain/bsdl_check.cpp diff --git a/src/system/bsdl_check.hpp b/src/core/domain/bsdl_check.hpp similarity index 100% rename from src/system/bsdl_check.hpp rename to src/core/domain/bsdl_check.hpp diff --git a/src/system/bsdl_model.cpp b/src/core/domain/bsdl_model.cpp similarity index 100% rename from src/system/bsdl_model.cpp rename to src/core/domain/bsdl_model.cpp diff --git a/src/system/bsdl_model.hpp b/src/core/domain/bsdl_model.hpp similarity index 100% rename from src/system/bsdl_model.hpp rename to src/core/domain/bsdl_model.hpp diff --git a/src/system/component_kind.cpp b/src/core/domain/component_kind.cpp similarity index 98% rename from src/system/component_kind.cpp rename to src/core/domain/component_kind.cpp index e35da3c..b4a28e3 100644 --- a/src/system/component_kind.cpp +++ b/src/core/domain/component_kind.cpp @@ -1,4 +1,4 @@ -#include "system/component_kind.hpp" +#include "core/domain/component_kind.hpp" #include #include diff --git a/src/system/component_kind.hpp b/src/core/domain/component_kind.hpp similarity index 100% rename from src/system/component_kind.hpp rename to src/core/domain/component_kind.hpp diff --git a/src/system/connect.cpp b/src/core/domain/connect.cpp similarity index 100% rename from src/system/connect.cpp rename to src/core/domain/connect.cpp diff --git a/src/system/connect.hpp b/src/core/domain/connect.hpp similarity index 100% rename from src/system/connect.hpp rename to src/core/domain/connect.hpp diff --git a/src/system/modules.cpp b/src/core/domain/modules.cpp similarity index 100% rename from src/system/modules.cpp rename to src/core/domain/modules.cpp diff --git a/src/system/modules.hpp b/src/core/domain/modules.hpp similarity index 100% rename from src/system/modules.hpp rename to src/core/domain/modules.hpp diff --git a/src/system/nets.cpp b/src/core/domain/nets.cpp similarity index 93% rename from src/system/nets.cpp rename to src/core/domain/nets.cpp index f43d1e9..56a0eb2 100644 --- a/src/system/nets.cpp +++ b/src/core/domain/nets.cpp @@ -1,11 +1,11 @@ -#include "system/nets.hpp" +#include "core/domain/nets.hpp" -#include "system/connect.hpp" -#include "system/modules.hpp" -#include "system/parts.hpp" -#include "system/pins.hpp" -#include "system/signals.hpp" -#include "system/system.hpp" +#include "core/domain/connect.hpp" +#include "core/domain/modules.hpp" +#include "core/domain/parts.hpp" +#include "core/domain/pins.hpp" +#include "core/domain/signals.hpp" +#include "core/domain/system.hpp" #include #include diff --git a/src/system/nets.hpp b/src/core/domain/nets.hpp similarity index 100% rename from src/system/nets.hpp rename to src/core/domain/nets.hpp diff --git a/src/system/parts.cpp b/src/core/domain/parts.cpp similarity index 100% rename from src/system/parts.cpp rename to src/core/domain/parts.cpp diff --git a/src/system/parts.hpp b/src/core/domain/parts.hpp similarity index 100% rename from src/system/parts.hpp rename to src/core/domain/parts.hpp diff --git a/src/system/persist.cpp b/src/core/domain/persist.cpp similarity index 100% rename from src/system/persist.cpp rename to src/core/domain/persist.cpp diff --git a/src/system/persist.hpp b/src/core/domain/persist.hpp similarity index 100% rename from src/system/persist.hpp rename to src/core/domain/persist.hpp diff --git a/src/system/pin_model.cpp b/src/core/domain/pin_model.cpp similarity index 100% rename from src/system/pin_model.cpp rename to src/core/domain/pin_model.cpp diff --git a/src/system/pin_model.hpp b/src/core/domain/pin_model.hpp similarity index 100% rename from src/system/pin_model.hpp rename to src/core/domain/pin_model.hpp diff --git a/src/system/pin_name.cpp b/src/core/domain/pin_name.cpp similarity index 94% rename from src/system/pin_name.cpp rename to src/core/domain/pin_name.cpp index d50da1b..6d83e59 100644 --- a/src/system/pin_name.cpp +++ b/src/core/domain/pin_name.cpp @@ -1,4 +1,4 @@ -#include "system/pin_name.hpp" +#include "core/domain/pin_name.hpp" #include #include diff --git a/src/system/pin_name.hpp b/src/core/domain/pin_name.hpp similarity index 100% rename from src/system/pin_name.hpp rename to src/core/domain/pin_name.hpp diff --git a/src/system/pin_role.cpp b/src/core/domain/pin_role.cpp similarity index 100% rename from src/system/pin_role.cpp rename to src/core/domain/pin_role.cpp diff --git a/src/system/pin_role.hpp b/src/core/domain/pin_role.hpp similarity index 100% rename from src/system/pin_role.hpp rename to src/core/domain/pin_role.hpp diff --git a/src/system/pin_spec.hpp b/src/core/domain/pin_spec.hpp similarity index 100% rename from src/system/pin_spec.hpp rename to src/core/domain/pin_spec.hpp diff --git a/src/system/pins.cpp b/src/core/domain/pins.cpp similarity index 100% rename from src/system/pins.cpp rename to src/core/domain/pins.cpp diff --git a/src/system/pins.hpp b/src/core/domain/pins.hpp similarity index 100% rename from src/system/pins.hpp rename to src/core/domain/pins.hpp diff --git a/src/system/signal_type.hpp b/src/core/domain/signal_type.hpp similarity index 100% rename from src/system/signal_type.hpp rename to src/core/domain/signal_type.hpp diff --git a/src/system/signals.cpp b/src/core/domain/signals.cpp similarity index 100% rename from src/system/signals.cpp rename to src/core/domain/signals.cpp diff --git a/src/system/signals.hpp b/src/core/domain/signals.hpp similarity index 100% rename from src/system/signals.hpp rename to src/core/domain/signals.hpp diff --git a/src/system/syselmts.hpp b/src/core/domain/syselmts.hpp similarity index 100% rename from src/system/syselmts.hpp rename to src/core/domain/syselmts.hpp diff --git a/src/system/system.cpp b/src/core/domain/system.cpp similarity index 88% rename from src/system/system.cpp rename to src/core/domain/system.cpp index 923f01f..6f29f97 100644 --- a/src/system/system.cpp +++ b/src/core/domain/system.cpp @@ -3,9 +3,9 @@ #include "connect.hpp" #include "modules.hpp" -#include "imports/import_altium.hpp" -#include "imports/import_mentor.hpp" -#include "imports/import_ods.hpp" +#include "core/imports/import_altium.hpp" +#include "core/imports/import_mentor.hpp" +#include "core/imports/import_ods.hpp" System::System() : mods(nullptr), conns(nullptr) { diff --git a/src/system/system.hpp b/src/core/domain/system.hpp similarity index 93% rename from src/system/system.hpp rename to src/core/domain/system.hpp index 6d8f955..e0c3864 100644 --- a/src/system/system.hpp +++ b/src/core/domain/system.hpp @@ -1,7 +1,7 @@ #ifndef _SYSTEM_HPP_ #define _SYSTEM_HPP_ -#include "imports/import_base.hpp" +#include "core/imports/import_base.hpp" #pragma once class Modules; ///< Forward declaration of the Modules class. diff --git a/src/system/transform.cpp b/src/core/domain/transform.cpp similarity index 100% rename from src/system/transform.cpp rename to src/core/domain/transform.cpp diff --git a/src/system/transform.hpp b/src/core/domain/transform.hpp similarity index 100% rename from src/system/transform.hpp rename to src/core/domain/transform.hpp diff --git a/src/system/transform_vpx.cpp b/src/core/domain/transform_vpx.cpp similarity index 100% rename from src/system/transform_vpx.cpp rename to src/core/domain/transform_vpx.cpp diff --git a/src/system/transform_vpx.hpp b/src/core/domain/transform_vpx.hpp similarity index 100% rename from src/system/transform_vpx.hpp rename to src/core/domain/transform_vpx.hpp diff --git a/src/imports/import_altium.cpp b/src/core/imports/import_altium.cpp similarity index 96% rename from src/imports/import_altium.cpp rename to src/core/imports/import_altium.cpp index f8f7521..41046e8 100644 --- a/src/imports/import_altium.cpp +++ b/src/core/imports/import_altium.cpp @@ -1,8 +1,8 @@ #include "import_altium.hpp" -#include "system/parts.hpp" -#include "system/pins.hpp" -#include "system/signals.hpp" +#include "core/domain/parts.hpp" +#include "core/domain/pins.hpp" +#include "core/domain/signals.hpp" #include #include diff --git a/src/imports/import_altium.hpp b/src/core/imports/import_altium.hpp similarity index 100% rename from src/imports/import_altium.hpp rename to src/core/imports/import_altium.hpp diff --git a/src/imports/import_base.hpp b/src/core/imports/import_base.hpp similarity index 95% rename from src/imports/import_base.hpp rename to src/core/imports/import_base.hpp index 44b6241..b63a947 100644 --- a/src/imports/import_base.hpp +++ b/src/core/imports/import_base.hpp @@ -4,8 +4,8 @@ #include #include -#include "system/parts.hpp" -#include "system/signals.hpp" +#include "core/domain/parts.hpp" +#include "core/domain/signals.hpp" /** * @brief Base class for importing data from a file. diff --git a/src/imports/import_mentor.cpp b/src/core/imports/import_mentor.cpp similarity index 98% rename from src/imports/import_mentor.cpp rename to src/core/imports/import_mentor.cpp index 90cf460..5795c4c 100644 --- a/src/imports/import_mentor.cpp +++ b/src/core/imports/import_mentor.cpp @@ -1,6 +1,6 @@ #include "import_mentor.hpp" -#include "system/pins.hpp" -#include "system/parts.hpp" +#include "core/domain/pins.hpp" +#include "core/domain/parts.hpp" #include #include diff --git a/src/imports/import_mentor.hpp b/src/core/imports/import_mentor.hpp similarity index 100% rename from src/imports/import_mentor.hpp rename to src/core/imports/import_mentor.hpp diff --git a/src/imports/import_ods.cpp b/src/core/imports/import_ods.cpp similarity index 97% rename from src/imports/import_ods.cpp rename to src/core/imports/import_ods.cpp index 1270db8..2bcb65a 100644 --- a/src/imports/import_ods.cpp +++ b/src/core/imports/import_ods.cpp @@ -1,8 +1,8 @@ #include "import_ods.hpp" -#include "system/parts.hpp" -#include "system/pins.hpp" -#include "system/signals.hpp" +#include "core/domain/parts.hpp" +#include "core/domain/pins.hpp" +#include "core/domain/signals.hpp" #include #include diff --git a/src/imports/import_ods.hpp b/src/core/imports/import_ods.hpp similarity index 100% rename from src/imports/import_ods.hpp rename to src/core/imports/import_ods.hpp diff --git a/src/imports/ods_writer.cpp b/src/core/imports/ods_writer.cpp similarity index 100% rename from src/imports/ods_writer.cpp rename to src/core/imports/ods_writer.cpp diff --git a/src/imports/ods_writer.hpp b/src/core/imports/ods_writer.hpp similarity index 100% rename from src/imports/ods_writer.hpp rename to src/core/imports/ods_writer.hpp diff --git a/src/frontends/tui/CMakeLists.txt b/src/frontends/tui/CMakeLists.txt new file mode 100644 index 0000000..ea58b21 --- /dev/null +++ b/src/frontends/tui/CMakeLists.txt @@ -0,0 +1,35 @@ +# TUI frontend (FTXUI). Builds the `essim` executable against essim_core. +# +# A frontend is self-contained here: it pulls its own GUI toolkit, compiles its +# sources into a library that links essim_core, and produces the `essim` binary +# from its own entry point (main.cpp). To add another frontend, create a sibling +# src/frontends// with the same shape and select it with +# -DESSIM_FRONTEND=. + +set(FTXUI_BUILD_DOCS OFF CACHE INTERNAL "") +set(FTXUI_BUILD_EXAMPLES OFF CACHE INTERNAL "") +set(FTXUI_BUILD_TESTS OFF CACHE INTERNAL "") +set(FTXUI_ENABLE_INSTALL OFF CACHE INTERNAL "") + +FetchContent_Declare(ftxui + GIT_REPOSITORY https://github.com/ArthurSonzogni/FTXUI.git + GIT_TAG v6.1.9 + GIT_SHALLOW TRUE +) +FetchContent_MakeAvailable(ftxui) + +# Frontend library = every .cpp here except the entry point. +file(GLOB TUI_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp") +list(REMOVE_ITEM TUI_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp") + +add_library(essim_tui STATIC ${TUI_SOURCES}) +target_link_libraries(essim_tui + PUBLIC + essim_core + ftxui::screen + ftxui::dom + ftxui::component +) + +add_executable(essim "${CMAKE_CURRENT_SOURCE_DIR}/main.cpp") +target_link_libraries(essim PRIVATE essim_tui) diff --git a/src/tui/commands.cpp b/src/frontends/tui/commands.cpp similarity index 98% rename from src/tui/commands.cpp rename to src/frontends/tui/commands.cpp index 036458d..0906856 100644 --- a/src/tui/commands.cpp +++ b/src/frontends/tui/commands.cpp @@ -1,21 +1,21 @@ -#include "tui/tui.hpp" -#include "tui/tui_helpers.hpp" +#include "frontends/tui/tui.hpp" +#include "frontends/tui/tui_helpers.hpp" -#include "system/analysis.hpp" -#include "system/connect.hpp" -#include "system/modules.hpp" -#include "system/nets.hpp" -#include "system/parts.hpp" -#include "system/persist.hpp" -#include "system/pin_role.hpp" -#include "system/pin_model.hpp" -#include "system/bsdl_model.hpp" -#include "system/bsdl_check.hpp" -#include "system/pins.hpp" -#include "system/signals.hpp" -#include "system/system.hpp" -#include "system/transform.hpp" -#include "system/transform_vpx.hpp" +#include "core/domain/analysis.hpp" +#include "core/domain/connect.hpp" +#include "core/domain/modules.hpp" +#include "core/domain/nets.hpp" +#include "core/domain/parts.hpp" +#include "core/domain/persist.hpp" +#include "core/domain/pin_role.hpp" +#include "core/domain/pin_model.hpp" +#include "core/domain/bsdl_model.hpp" +#include "core/domain/bsdl_check.hpp" +#include "core/domain/pins.hpp" +#include "core/domain/signals.hpp" +#include "core/domain/system.hpp" +#include "core/domain/transform.hpp" +#include "core/domain/transform_vpx.hpp" #include #include diff --git a/src/tui/commands_export.cpp b/src/frontends/tui/commands_export.cpp similarity index 95% rename from src/tui/commands_export.cpp rename to src/frontends/tui/commands_export.cpp index 75cf1b2..063f6ad 100644 --- a/src/tui/commands_export.cpp +++ b/src/frontends/tui/commands_export.cpp @@ -1,8 +1,8 @@ -#include "tui/tui.hpp" +#include "frontends/tui/tui.hpp" -#include "app/export.hpp" -#include "system/connect.hpp" -#include "system/system.hpp" +#include "core/app/export.hpp" +#include "core/domain/connect.hpp" +#include "core/domain/system.hpp" #include #include diff --git a/src/tui/completion.cpp b/src/frontends/tui/completion.cpp similarity index 97% rename from src/tui/completion.cpp rename to src/frontends/tui/completion.cpp index e2bd547..721bc00 100644 --- a/src/tui/completion.cpp +++ b/src/frontends/tui/completion.cpp @@ -1,5 +1,5 @@ -#include "tui/tui.hpp" -#include "tui/tui_helpers.hpp" +#include "frontends/tui/tui.hpp" +#include "frontends/tui/tui_helpers.hpp" #include #include diff --git a/src/main.cpp b/src/frontends/tui/main.cpp similarity index 99% rename from src/main.cpp rename to src/frontends/tui/main.cpp index f288cdd..d3011f2 100644 --- a/src/main.cpp +++ b/src/frontends/tui/main.cpp @@ -1,4 +1,4 @@ -#include "tui/tui.hpp" +#include "frontends/tui/tui.hpp" #include #include diff --git a/src/tui/screen_analyze.cpp b/src/frontends/tui/screen_analyze.cpp similarity index 97% rename from src/tui/screen_analyze.cpp rename to src/frontends/tui/screen_analyze.cpp index 9a8518b..2f5f425 100644 --- a/src/tui/screen_analyze.cpp +++ b/src/frontends/tui/screen_analyze.cpp @@ -1,15 +1,15 @@ -#include "tui/tui.hpp" -#include "tui/tui_helpers.hpp" +#include "frontends/tui/tui.hpp" +#include "frontends/tui/tui_helpers.hpp" -#include "system/analysis.hpp" -#include "system/bsdl_check.hpp" -#include "system/connect.hpp" -#include "system/modules.hpp" -#include "system/nets.hpp" -#include "system/parts.hpp" -#include "system/pins.hpp" -#include "system/signals.hpp" -#include "system/system.hpp" +#include "core/domain/analysis.hpp" +#include "core/domain/bsdl_check.hpp" +#include "core/domain/connect.hpp" +#include "core/domain/modules.hpp" +#include "core/domain/nets.hpp" +#include "core/domain/parts.hpp" +#include "core/domain/pins.hpp" +#include "core/domain/signals.hpp" +#include "core/domain/system.hpp" #include #include diff --git a/src/tui/screen_confirm.cpp b/src/frontends/tui/screen_confirm.cpp similarity index 98% rename from src/tui/screen_confirm.cpp rename to src/frontends/tui/screen_confirm.cpp index 5a3931a..111bcfe 100644 --- a/src/tui/screen_confirm.cpp +++ b/src/frontends/tui/screen_confirm.cpp @@ -1,4 +1,4 @@ -#include "tui/tui.hpp" +#include "frontends/tui/tui.hpp" #include #include diff --git a/src/tui/screen_connect.cpp b/src/frontends/tui/screen_connect.cpp similarity index 96% rename from src/tui/screen_connect.cpp rename to src/frontends/tui/screen_connect.cpp index d88865f..bb01b4a 100644 --- a/src/tui/screen_connect.cpp +++ b/src/frontends/tui/screen_connect.cpp @@ -1,11 +1,11 @@ -#include "tui/tui.hpp" -#include "tui/tui_helpers.hpp" +#include "frontends/tui/tui.hpp" +#include "frontends/tui/tui_helpers.hpp" -#include "system/connect.hpp" -#include "system/modules.hpp" -#include "system/parts.hpp" -#include "system/system.hpp" -#include "system/transform.hpp" +#include "core/domain/connect.hpp" +#include "core/domain/modules.hpp" +#include "core/domain/parts.hpp" +#include "core/domain/system.hpp" +#include "core/domain/transform.hpp" #include #include diff --git a/src/tui/screen_dashboard.cpp b/src/frontends/tui/screen_dashboard.cpp similarity index 97% rename from src/tui/screen_dashboard.cpp rename to src/frontends/tui/screen_dashboard.cpp index 124d99a..27f4dfd 100644 --- a/src/tui/screen_dashboard.cpp +++ b/src/frontends/tui/screen_dashboard.cpp @@ -1,15 +1,15 @@ -#include "tui/tui.hpp" -#include "tui/tui_helpers.hpp" +#include "frontends/tui/tui.hpp" +#include "frontends/tui/tui_helpers.hpp" -#include "system/analysis.hpp" -#include "system/bsdl_check.hpp" -#include "system/connect.hpp" -#include "system/modules.hpp" -#include "system/nets.hpp" -#include "system/parts.hpp" -#include "system/pins.hpp" -#include "system/signals.hpp" -#include "system/system.hpp" +#include "core/domain/analysis.hpp" +#include "core/domain/bsdl_check.hpp" +#include "core/domain/connect.hpp" +#include "core/domain/modules.hpp" +#include "core/domain/nets.hpp" +#include "core/domain/parts.hpp" +#include "core/domain/pins.hpp" +#include "core/domain/signals.hpp" +#include "core/domain/system.hpp" #include #include diff --git a/src/tui/screen_error.cpp b/src/frontends/tui/screen_error.cpp similarity index 97% rename from src/tui/screen_error.cpp rename to src/frontends/tui/screen_error.cpp index 2774d49..52f0750 100644 --- a/src/tui/screen_error.cpp +++ b/src/frontends/tui/screen_error.cpp @@ -1,4 +1,4 @@ -#include "tui/tui.hpp" +#include "frontends/tui/tui.hpp" #include #include diff --git a/src/tui/screen_explore.cpp b/src/frontends/tui/screen_explore.cpp similarity index 98% rename from src/tui/screen_explore.cpp rename to src/frontends/tui/screen_explore.cpp index 1552ac5..0ca4afd 100644 --- a/src/tui/screen_explore.cpp +++ b/src/frontends/tui/screen_explore.cpp @@ -1,13 +1,13 @@ -#include "tui/tui.hpp" -#include "tui/tui_helpers.hpp" +#include "frontends/tui/tui.hpp" +#include "frontends/tui/tui_helpers.hpp" -#include "system/connect.hpp" -#include "system/modules.hpp" -#include "system/nets.hpp" -#include "system/parts.hpp" -#include "system/pins.hpp" -#include "system/signals.hpp" -#include "system/system.hpp" +#include "core/domain/connect.hpp" +#include "core/domain/modules.hpp" +#include "core/domain/nets.hpp" +#include "core/domain/parts.hpp" +#include "core/domain/pins.hpp" +#include "core/domain/signals.hpp" +#include "core/domain/system.hpp" #include #include diff --git a/src/tui/screen_filedialog.cpp b/src/frontends/tui/screen_filedialog.cpp similarity index 99% rename from src/tui/screen_filedialog.cpp rename to src/frontends/tui/screen_filedialog.cpp index 57d91f7..34a8886 100644 --- a/src/tui/screen_filedialog.cpp +++ b/src/frontends/tui/screen_filedialog.cpp @@ -1,5 +1,5 @@ -#include "tui/tui.hpp" -#include "tui/tui_helpers.hpp" +#include "frontends/tui/tui.hpp" +#include "frontends/tui/tui_helpers.hpp" #include #include diff --git a/src/tui/screen_help.cpp b/src/frontends/tui/screen_help.cpp similarity index 99% rename from src/tui/screen_help.cpp rename to src/frontends/tui/screen_help.cpp index 4042e24..4578c96 100644 --- a/src/tui/screen_help.cpp +++ b/src/frontends/tui/screen_help.cpp @@ -1,5 +1,5 @@ -#include "tui/tui.hpp" -#include "tui/tui_helpers.hpp" +#include "frontends/tui/tui.hpp" +#include "frontends/tui/tui_helpers.hpp" #include #include diff --git a/src/tui/screen_main.cpp b/src/frontends/tui/screen_main.cpp similarity index 97% rename from src/tui/screen_main.cpp rename to src/frontends/tui/screen_main.cpp index b7db6d8..bada2a9 100644 --- a/src/tui/screen_main.cpp +++ b/src/frontends/tui/screen_main.cpp @@ -1,5 +1,5 @@ -#include "tui/tui.hpp" -#include "tui/tui_helpers.hpp" +#include "frontends/tui/tui.hpp" +#include "frontends/tui/tui_helpers.hpp" #include #include diff --git a/src/tui/screen_palette.cpp b/src/frontends/tui/screen_palette.cpp similarity index 97% rename from src/tui/screen_palette.cpp rename to src/frontends/tui/screen_palette.cpp index 2869ba2..d322fd1 100644 --- a/src/tui/screen_palette.cpp +++ b/src/frontends/tui/screen_palette.cpp @@ -1,9 +1,9 @@ -#include "tui/tui.hpp" -#include "tui/tui_helpers.hpp" +#include "frontends/tui/tui.hpp" +#include "frontends/tui/tui_helpers.hpp" -#include "system/modules.hpp" -#include "system/signals.hpp" -#include "system/system.hpp" +#include "core/domain/modules.hpp" +#include "core/domain/signals.hpp" +#include "core/domain/system.hpp" #include #include diff --git a/src/tui/screen_settype.cpp b/src/frontends/tui/screen_settype.cpp similarity index 94% rename from src/tui/screen_settype.cpp rename to src/frontends/tui/screen_settype.cpp index deb897e..1f45125 100644 --- a/src/tui/screen_settype.cpp +++ b/src/frontends/tui/screen_settype.cpp @@ -1,13 +1,13 @@ -#include "tui/tui.hpp" -#include "tui/tui_helpers.hpp" +#include "frontends/tui/tui.hpp" +#include "frontends/tui/tui_helpers.hpp" -#include "system/modules.hpp" -#include "system/parts.hpp" -#include "system/pin_model.hpp" -#include "system/pin_role.hpp" -#include "system/pins.hpp" -#include "system/system.hpp" -#include "system/transform_vpx.hpp" +#include "core/domain/modules.hpp" +#include "core/domain/parts.hpp" +#include "core/domain/pin_model.hpp" +#include "core/domain/pin_role.hpp" +#include "core/domain/pins.hpp" +#include "core/domain/system.hpp" +#include "core/domain/transform_vpx.hpp" #include #include diff --git a/src/tui/screen_sigtype_modal.cpp b/src/frontends/tui/screen_sigtype_modal.cpp similarity index 95% rename from src/tui/screen_sigtype_modal.cpp rename to src/frontends/tui/screen_sigtype_modal.cpp index 3319532..b00f216 100644 --- a/src/tui/screen_sigtype_modal.cpp +++ b/src/frontends/tui/screen_sigtype_modal.cpp @@ -1,8 +1,8 @@ -#include "tui/tui.hpp" +#include "frontends/tui/tui.hpp" -#include "system/modules.hpp" -#include "system/signals.hpp" -#include "system/system.hpp" +#include "core/domain/modules.hpp" +#include "core/domain/signals.hpp" +#include "core/domain/system.hpp" #include #include diff --git a/src/tui/shell.cpp b/src/frontends/tui/shell.cpp similarity index 98% rename from src/tui/shell.cpp rename to src/frontends/tui/shell.cpp index 2f70afa..1ca4bc5 100644 --- a/src/tui/shell.cpp +++ b/src/frontends/tui/shell.cpp @@ -1,9 +1,9 @@ -#include "tui/tui.hpp" -#include "tui/tui_helpers.hpp" +#include "frontends/tui/tui.hpp" +#include "frontends/tui/tui_helpers.hpp" -#include "system/modules.hpp" -#include "system/signals.hpp" -#include "system/system.hpp" +#include "core/domain/modules.hpp" +#include "core/domain/signals.hpp" +#include "core/domain/system.hpp" #include #include diff --git a/src/tui/tui.cpp b/src/frontends/tui/tui.cpp similarity index 99% rename from src/tui/tui.cpp rename to src/frontends/tui/tui.cpp index df209fc..408bd46 100644 --- a/src/tui/tui.cpp +++ b/src/frontends/tui/tui.cpp @@ -1,6 +1,6 @@ -#include "tui/tui.hpp" +#include "frontends/tui/tui.hpp" -#include "system/system.hpp" +#include "core/domain/system.hpp" #include #include diff --git a/src/tui/tui.hpp b/src/frontends/tui/tui.hpp similarity index 100% rename from src/tui/tui.hpp rename to src/frontends/tui/tui.hpp diff --git a/src/tui/tui_helpers.cpp b/src/frontends/tui/tui_helpers.cpp similarity index 98% rename from src/tui/tui_helpers.cpp rename to src/frontends/tui/tui_helpers.cpp index 6fcd475..eb85d87 100644 --- a/src/tui/tui_helpers.cpp +++ b/src/frontends/tui/tui_helpers.cpp @@ -1,4 +1,4 @@ -#include "tui/tui_helpers.hpp" +#include "frontends/tui/tui_helpers.hpp" #include diff --git a/src/tui/tui_helpers.hpp b/src/frontends/tui/tui_helpers.hpp similarity index 100% rename from src/tui/tui_helpers.hpp rename to src/frontends/tui/tui_helpers.hpp diff --git a/tests/test_analysis.cpp b/tests/test_analysis.cpp index e4b10f5..6a0cbae 100644 --- a/tests/test_analysis.cpp +++ b/tests/test_analysis.cpp @@ -1,11 +1,11 @@ #include -#include "system/analysis.hpp" -#include "system/modules.hpp" -#include "system/parts.hpp" -#include "system/pins.hpp" -#include "system/signals.hpp" -#include "system/system.hpp" +#include "core/domain/analysis.hpp" +#include "core/domain/modules.hpp" +#include "core/domain/parts.hpp" +#include "core/domain/pins.hpp" +#include "core/domain/signals.hpp" +#include "core/domain/system.hpp" #include #include diff --git a/tests/test_bsdl_apply.cpp b/tests/test_bsdl_apply.cpp index 34a9de9..39e6465 100644 --- a/tests/test_bsdl_apply.cpp +++ b/tests/test_bsdl_apply.cpp @@ -1,14 +1,14 @@ #include -#include "system/analysis.hpp" -#include "system/bsdl_check.hpp" -#include "system/bsdl_model.hpp" -#include "system/parts.hpp" -#include "system/pins.hpp" -#include "system/pin_spec.hpp" -#include "system/system.hpp" -#include "system/modules.hpp" -#include "system/persist.hpp" +#include "core/domain/analysis.hpp" +#include "core/domain/bsdl_check.hpp" +#include "core/domain/bsdl_model.hpp" +#include "core/domain/parts.hpp" +#include "core/domain/pins.hpp" +#include "core/domain/pin_spec.hpp" +#include "core/domain/system.hpp" +#include "core/domain/modules.hpp" +#include "core/domain/persist.hpp" #include #include diff --git a/tests/test_bsdl_check.cpp b/tests/test_bsdl_check.cpp index 51e949b..ec8a344 100644 --- a/tests/test_bsdl_check.cpp +++ b/tests/test_bsdl_check.cpp @@ -1,13 +1,13 @@ #include -#include "system/analysis.hpp" -#include "system/bsdl_check.hpp" -#include "system/modules.hpp" -#include "system/parts.hpp" -#include "system/pin_spec.hpp" -#include "system/pins.hpp" -#include "system/signals.hpp" -#include "system/system.hpp" +#include "core/domain/analysis.hpp" +#include "core/domain/bsdl_check.hpp" +#include "core/domain/modules.hpp" +#include "core/domain/parts.hpp" +#include "core/domain/pin_spec.hpp" +#include "core/domain/pins.hpp" +#include "core/domain/signals.hpp" +#include "core/domain/system.hpp" #include #include diff --git a/tests/test_component_kind.cpp b/tests/test_component_kind.cpp index 70779aa..e293565 100644 --- a/tests/test_component_kind.cpp +++ b/tests/test_component_kind.cpp @@ -1,7 +1,7 @@ #include -#include "system/component_kind.hpp" -#include "system/parts.hpp" +#include "core/domain/component_kind.hpp" +#include "core/domain/parts.hpp" #include diff --git a/tests/test_export.cpp b/tests/test_export.cpp index 549fccc..d126c0b 100644 --- a/tests/test_export.cpp +++ b/tests/test_export.cpp @@ -1,12 +1,12 @@ #include -#include "app/export.hpp" -#include "system/connect.hpp" -#include "system/modules.hpp" -#include "system/parts.hpp" -#include "system/pins.hpp" -#include "system/signals.hpp" -#include "system/system.hpp" +#include "core/app/export.hpp" +#include "core/domain/connect.hpp" +#include "core/domain/modules.hpp" +#include "core/domain/parts.hpp" +#include "core/domain/pins.hpp" +#include "core/domain/signals.hpp" +#include "core/domain/system.hpp" #include #include diff --git a/tests/test_nc_origin.cpp b/tests/test_nc_origin.cpp index cb769c0..1aee1dc 100644 --- a/tests/test_nc_origin.cpp +++ b/tests/test_nc_origin.cpp @@ -1,11 +1,11 @@ #include -#include "system/modules.hpp" -#include "system/parts.hpp" -#include "system/persist.hpp" -#include "system/pins.hpp" -#include "system/signals.hpp" -#include "system/system.hpp" +#include "core/domain/modules.hpp" +#include "core/domain/parts.hpp" +#include "core/domain/persist.hpp" +#include "core/domain/pins.hpp" +#include "core/domain/signals.hpp" +#include "core/domain/system.hpp" #include #include diff --git a/tests/test_persist.cpp b/tests/test_persist.cpp index 21aaf89..d7d87b5 100644 --- a/tests/test_persist.cpp +++ b/tests/test_persist.cpp @@ -1,12 +1,12 @@ #include -#include "system/connect.hpp" -#include "system/modules.hpp" -#include "system/parts.hpp" -#include "system/persist.hpp" -#include "system/pins.hpp" -#include "system/signals.hpp" -#include "system/system.hpp" +#include "core/domain/connect.hpp" +#include "core/domain/modules.hpp" +#include "core/domain/parts.hpp" +#include "core/domain/persist.hpp" +#include "core/domain/pins.hpp" +#include "core/domain/signals.hpp" +#include "core/domain/system.hpp" #include #include diff --git a/tests/test_pin_model.cpp b/tests/test_pin_model.cpp index 23569b3..76f7af4 100644 --- a/tests/test_pin_model.cpp +++ b/tests/test_pin_model.cpp @@ -1,9 +1,9 @@ #include -#include "system/parts.hpp" -#include "system/pin_model.hpp" -#include "system/pin_spec.hpp" -#include "system/pins.hpp" +#include "core/domain/parts.hpp" +#include "core/domain/pin_model.hpp" +#include "core/domain/pin_spec.hpp" +#include "core/domain/pins.hpp" #include #include diff --git a/tests/test_pin_name.cpp b/tests/test_pin_name.cpp index 9be5099..1f1b1f2 100644 --- a/tests/test_pin_name.cpp +++ b/tests/test_pin_name.cpp @@ -1,9 +1,9 @@ #include -#include "system/parts.hpp" -#include "system/pin_name.hpp" -#include "system/pins.hpp" -#include "system/transform.hpp" +#include "core/domain/parts.hpp" +#include "core/domain/pin_name.hpp" +#include "core/domain/pins.hpp" +#include "core/domain/transform.hpp" #include diff --git a/tests/test_signal_type.cpp b/tests/test_signal_type.cpp index 59c12a8..0d62e50 100644 --- a/tests/test_signal_type.cpp +++ b/tests/test_signal_type.cpp @@ -1,6 +1,6 @@ #include -#include "system/signal_type.hpp" +#include "core/domain/signal_type.hpp" TEST_CASE("signal_type_name round-trips with from_name") { SignalType t; diff --git a/tests/test_vpx_transform.cpp b/tests/test_vpx_transform.cpp index 9d1adf5..b646f01 100644 --- a/tests/test_vpx_transform.cpp +++ b/tests/test_vpx_transform.cpp @@ -1,12 +1,12 @@ #include -#include "system/modules.hpp" -#include "system/parts.hpp" -#include "system/pins.hpp" -#include "system/signals.hpp" -#include "system/system.hpp" -#include "system/transform.hpp" -#include "system/transform_vpx.hpp" +#include "core/domain/modules.hpp" +#include "core/domain/parts.hpp" +#include "core/domain/pins.hpp" +#include "core/domain/signals.hpp" +#include "core/domain/system.hpp" +#include "core/domain/transform.hpp" +#include "core/domain/transform_vpx.hpp" #include #include diff --git a/tests/test_helpers.cpp b/tests/tui/test_helpers.cpp similarity index 98% rename from tests/test_helpers.cpp rename to tests/tui/test_helpers.cpp index 18098ac..b14b723 100644 --- a/tests/test_helpers.cpp +++ b/tests/tui/test_helpers.cpp @@ -1,6 +1,6 @@ #include -#include "tui/tui_helpers.hpp" +#include "frontends/tui/tui_helpers.hpp" #include #include