diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-08-18 02:25:24 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-08-18 08:51:12 +0200 |
commit | 96fdaebb5c8c8902c98c1fb43e755cf90fc15198 (patch) | |
tree | bb4e1ace6bb0800a5991884d5f07b41267699283 /logic/pathmatcher/MultiMatcher.h | |
parent | 4e3af265dad57a27af4051cb574fb90539d287d0 (diff) | |
download | PrismLauncher-96fdaebb5c8c8902c98c1fb43e755cf90fc15198.tar.gz PrismLauncher-96fdaebb5c8c8902c98c1fb43e755cf90fc15198.tar.bz2 PrismLauncher-96fdaebb5c8c8902c98c1fb43e755cf90fc15198.zip |
GH-926 implement log cleaning functionality
Also adds gzip compressed log support
Diffstat (limited to 'logic/pathmatcher/MultiMatcher.h')
-rw-r--r-- | logic/pathmatcher/MultiMatcher.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/logic/pathmatcher/MultiMatcher.h b/logic/pathmatcher/MultiMatcher.h new file mode 100644 index 00000000..e018967c --- /dev/null +++ b/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) override + { + for(auto iter: m_matchers) + { + if(iter->matches(string)) + { + return true; + } + } + return false; + } + + QList<Ptr> m_matchers; +}; |