From c2670e9ab90bd657e87a1da2c5322e9007dce01f Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Mon, 17 Nov 2025 18:34:02 +0000 Subject: windowrules: rewrite completely (#12269) Reworks the window rule syntax completely --------- Co-authored-by: Mihai Fufezan --- src/desktop/rule/matchEngine/RegexMatchEngine.hpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/desktop/rule/matchEngine/RegexMatchEngine.hpp (limited to 'src/desktop/rule/matchEngine/RegexMatchEngine.hpp') diff --git a/src/desktop/rule/matchEngine/RegexMatchEngine.hpp b/src/desktop/rule/matchEngine/RegexMatchEngine.hpp new file mode 100644 index 00000000..e980ce70 --- /dev/null +++ b/src/desktop/rule/matchEngine/RegexMatchEngine.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "MatchEngine.hpp" +#include "../../../helpers/memory/Memory.hpp" + +//NOLINTNEXTLINE +namespace re2 { + class RE2; +}; + +namespace Desktop::Rule { + class CRegexMatchEngine : public IMatchEngine { + public: + CRegexMatchEngine(const std::string& regex); + virtual ~CRegexMatchEngine() = default; + + virtual bool match(const std::string& other); + + private: + UP m_regex; + bool m_negative = false; + }; +} \ No newline at end of file -- cgit v1.2.3