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/<name>/ (own CMakeLists, toolkit, main.cpp) that links
essim_core, selected with -DESSIM_FRONTEND=<name> (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 <noreply@anthropic.com>
26 lines
865 B
C++
26 lines
865 B
C++
#ifndef _PIN_NAME_HPP_
|
|
#define _PIN_NAME_HPP_
|
|
|
|
#include <string>
|
|
|
|
// Canonical form of a pin name for cross-card matching: <leading non-digits>
|
|
// + <pure-digit suffix zero-padded to width 3>. Returns the original name
|
|
// unchanged when no digit suffix is present, or when the suffix mixes digits
|
|
// with other characters.
|
|
//
|
|
// Examples:
|
|
// "A1" -> "A001"
|
|
// "A001" -> "A001"
|
|
// "AB12" -> "AB012"
|
|
// "12" -> "012"
|
|
// "VCC" -> "VCC"
|
|
// "A1B" -> "A1B" (mixed suffix, not canonicalised)
|
|
// "P3.3V" -> "P3.3V" (mixed suffix)
|
|
//
|
|
// Used by IdentityTransform and CheckIdentityCompatible to match pin names
|
|
// that differ only in zero-padding. Pin::name itself is preserved as-imported
|
|
// so the original schematic notation survives in the UI and on disk.
|
|
std::string canonical_pin_name(const std::string &name);
|
|
|
|
#endif // _PIN_NAME_HPP_
|