summaryrefslogtreecommitdiffstats
path: root/libraries/logic/pathmatcher/MultiMatcher.h
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/logic/pathmatcher/MultiMatcher.h')
-rw-r--r--libraries/logic/pathmatcher/MultiMatcher.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/libraries/logic/pathmatcher/MultiMatcher.h b/libraries/logic/pathmatcher/MultiMatcher.h
new file mode 100644
index 00000000..91f70aa4
--- /dev/null
+++ b/libraries/logic/pathmatcher/MultiMatcher.h
@@ -0,0 +1,31 @@
+#include "IPathMatcher.h"
+#include <SeparatorPrefixTree.h>
+#include <QRegularExpression>
+
+class MultiMatcher : public IPathMatcher
+{
+public:
+ virtual ~MultiMatcher() {};
+ MultiMatcher()
+ {
+ }
+ MultiMatcher &add(Ptr add)
+ {
+ m_matchers.append(add);
+ return *this;
+ }
+
+ virtual bool matches(const QString &string) const override
+ {
+ for(auto iter: m_matchers)
+ {
+ if(iter->matches(string))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ QList<Ptr> m_matchers;
+};