2015-08-18 01:25:24 +01:00
|
|
|
#include <SeparatorPrefixTree.h>
|
|
|
|
#include <QRegularExpression>
|
2023-08-02 17:35:35 +01:00
|
|
|
#include "IPathMatcher.h"
|
2015-08-18 01:25:24 +01:00
|
|
|
|
2023-08-02 17:35:35 +01:00
|
|
|
class MultiMatcher : public IPathMatcher {
|
|
|
|
public:
|
|
|
|
virtual ~MultiMatcher(){};
|
|
|
|
MultiMatcher() {}
|
|
|
|
MultiMatcher& add(Ptr add)
|
2015-08-18 01:25:24 +01:00
|
|
|
{
|
|
|
|
m_matchers.append(add);
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2023-08-02 17:35:35 +01:00
|
|
|
virtual bool matches(const QString& string) const override
|
2015-08-18 01:25:24 +01:00
|
|
|
{
|
2023-08-02 17:35:35 +01:00
|
|
|
for (auto iter : m_matchers) {
|
|
|
|
if (iter->matches(string)) {
|
2015-08-18 01:25:24 +01:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
QList<Ptr> m_matchers;
|
|
|
|
};
|