ShatteredPrism/launcher/pathmatcher/MultiMatcher.h
Evan Goode 5e93cff2d0 clang-format
Signed-off-by: Evan Goode <mail@evangoo.de>
2024-08-11 22:06:38 -04:00

27 lines
557 B
C++

#include <SeparatorPrefixTree.h>
#include <QRegularExpression>
#include "IPathMatcher.h"
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;
};