aboutsummaryrefslogtreecommitdiff
path: root/launcher/pathmatcher/FSTreeMatcher.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2021-07-25 19:11:59 +0200
committerPetr Mrázek <peterix@gmail.com>2021-07-25 19:50:44 +0200
commit20b9f2b42a3b58b6081af271774fbcc34025dccb (patch)
tree064fa59facb3357139b47bd4e60bfc8edb35ca11 /launcher/pathmatcher/FSTreeMatcher.h
parentdd133680858351e3e07690e286882327a4f42ba5 (diff)
downloadPrismLauncher-20b9f2b42a3b58b6081af271774fbcc34025dccb.tar.gz
PrismLauncher-20b9f2b42a3b58b6081af271774fbcc34025dccb.tar.bz2
PrismLauncher-20b9f2b42a3b58b6081af271774fbcc34025dccb.zip
NOISSUE Flatten gui and logic libraries into MultiMC
Diffstat (limited to 'launcher/pathmatcher/FSTreeMatcher.h')
-rw-r--r--launcher/pathmatcher/FSTreeMatcher.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/launcher/pathmatcher/FSTreeMatcher.h b/launcher/pathmatcher/FSTreeMatcher.h
new file mode 100644
index 00000000..361924af
--- /dev/null
+++ b/launcher/pathmatcher/FSTreeMatcher.h
@@ -0,0 +1,21 @@
+#pragma once
+
+#include "IPathMatcher.h"
+#include <SeparatorPrefixTree.h>
+#include <QRegularExpression>
+
+class FSTreeMatcher : public IPathMatcher
+{
+public:
+ virtual ~FSTreeMatcher() {};
+ FSTreeMatcher(SeparatorPrefixTree<'/'> & tree) : m_fsTree(tree)
+ {
+ }
+
+ virtual bool matches(const QString &string) const override
+ {
+ return m_fsTree.covers(string);
+ }
+
+ SeparatorPrefixTree<'/'> & m_fsTree;
+};