From a63e7d65293c07e0567cfdafbce693a543bf2a0d Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Tue, 22 Sep 2026 17:01:36 +0200 Subject: lib: rename concept module files --- ttwhy/scanners/concepts.cppm | 27 +++++++++++++++++++++++++++ ttwhy/scanners/mod.cppm | 2 +- ttwhy/scanners/terminal_concepts.cppm | 27 --------------------------- ttwhy/scanners/terminal_policies.cppm | 2 +- ttwhy/scanners/terminal_scanner.cppm | 2 +- 5 files changed, 30 insertions(+), 30 deletions(-) create mode 100644 ttwhy/scanners/concepts.cppm delete mode 100644 ttwhy/scanners/terminal_concepts.cppm (limited to 'ttwhy/scanners') diff --git a/ttwhy/scanners/concepts.cppm b/ttwhy/scanners/concepts.cppm new file mode 100644 index 0000000..69d6459 --- /dev/null +++ b/ttwhy/scanners/concepts.cppm @@ -0,0 +1,27 @@ +module; + +#include +#include + +export module ttwhy.scanners:concepts; + +import :terminal_events; + +namespace ttwhy +{ + + export template + concept scanner = requires(Candidate a, std::span buffer) { + { a.process(buffer) } -> std::same_as; + { a.timeout() } -> std::same_as; + { a.is_pending() } -> std::same_as; + }; + + export template + concept ansi_sink = requires(Sink sink) { + { sink(std::declval()) } -> std::same_as; + { sink(std::declval()) } -> std::same_as; + { sink(std::declval()) } -> std::same_as; + }; + +} // namespace ttwhy diff --git a/ttwhy/scanners/mod.cppm b/ttwhy/scanners/mod.cppm index a1f45c1..b422a38 100644 --- a/ttwhy/scanners/mod.cppm +++ b/ttwhy/scanners/mod.cppm @@ -1,6 +1,6 @@ export module ttwhy.scanners; -export import :terminal_concepts; +export import :concepts; export import :terminal_events; export import :terminal_policies; export import :terminal_scanner; diff --git a/ttwhy/scanners/terminal_concepts.cppm b/ttwhy/scanners/terminal_concepts.cppm deleted file mode 100644 index e82a8d0..0000000 --- a/ttwhy/scanners/terminal_concepts.cppm +++ /dev/null @@ -1,27 +0,0 @@ -module; - -#include -#include - -export module ttwhy.scanners:terminal_concepts; - -import :terminal_events; - -namespace ttwhy -{ - - export template - concept scanner = requires(Candidate a, std::span buffer) { - { a.process(buffer) } -> std::same_as; - { a.timeout() } -> std::same_as; - { a.is_pending() } -> std::same_as; - }; - - export template - concept ansi_sink = requires(Sink sink) { - { sink(std::declval()) } -> std::same_as; - { sink(std::declval()) } -> std::same_as; - { sink(std::declval()) } -> std::same_as; - }; - -} // namespace ttwhy diff --git a/ttwhy/scanners/terminal_policies.cppm b/ttwhy/scanners/terminal_policies.cppm index bf7c126..7af0d66 100644 --- a/ttwhy/scanners/terminal_policies.cppm +++ b/ttwhy/scanners/terminal_policies.cppm @@ -5,8 +5,8 @@ module; export module ttwhy.scanners:terminal_policies; +import :concepts; import :terminal_events; -import :terminal_concepts; namespace ttwhy::scanners { diff --git a/ttwhy/scanners/terminal_scanner.cppm b/ttwhy/scanners/terminal_scanner.cppm index 510299c..ec4a1a6 100644 --- a/ttwhy/scanners/terminal_scanner.cppm +++ b/ttwhy/scanners/terminal_scanner.cppm @@ -9,7 +9,7 @@ module; export module ttwhy.scanners:terminal_scanner; -import :terminal_concepts; +import :concepts; import :terminal_events; import :terminal_policies; -- cgit v1.2.3