pollymc/launcher/pathmatcher/MultiMatcher.h

32 lines
580 B
C
Raw Normal View History

#include "IPathMatcher.h"
#include <SeparatorPrefixTree.h>
#include <QRegularExpression>
class MultiMatcher : public IPathMatcher
{
public:
2018-07-15 18:21:05 +05:30
virtual ~MultiMatcher() {};
MultiMatcher()
{
}
MultiMatcher &add(Ptr add)
{
m_matchers.append(add);
return *this;
}
2018-07-15 18:21:05 +05:30
virtual bool matches(const QString &string) const override
{
for(auto iter: m_matchers)
{
if(iter->matches(string))
{
return true;
}
}
return false;
}
2018-07-15 18:21:05 +05:30
QList<Ptr> m_matchers;
};