2015-08-18 05:55:24 +05:30
|
|
|
#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;
|
|
|
|
}
|
|
|
|
|
2015-10-10 09:25:55 +05:30
|
|
|
virtual bool matches(const QString &string) const override
|
2015-08-18 05:55:24 +05:30
|
|
|
{
|
|
|
|
for(auto iter: m_matchers)
|
|
|
|
{
|
|
|
|
if(iter->matches(string))
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
QList<Ptr> m_matchers;
|
|
|
|
};
|