Changeset View
Changeset View
Standalone View
Standalone View
src/file/regexpcache.h
Show All 17 Lines | 1 | /* | |||
---|---|---|---|---|---|
18 | You should have received a copy of the GNU Lesser General Public | 18 | You should have received a copy of the GNU Lesser General Public | ||
19 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | 19 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | #ifndef REGEXP_CACHE_H_ | 22 | #ifndef REGEXP_CACHE_H_ | ||
23 | #define REGEXP_CACHE_H_ | 23 | #define REGEXP_CACHE_H_ | ||
24 | 24 | | |||
25 | #include <QList> | 25 | #include <QList> | ||
26 | #include <QSet> | ||||
26 | #include <QRegularExpression> | 27 | #include <QRegularExpression> | ||
27 | 28 | | |||
28 | class RegExpCache | 29 | class RegExpCache | ||
29 | { | 30 | { | ||
30 | public: | 31 | public: | ||
31 | RegExpCache(); | 32 | RegExpCache(); | ||
32 | ~RegExpCache(); | 33 | ~RegExpCache(); | ||
33 | 34 | | |||
34 | bool exactMatch(const QString& s) const; | 35 | bool exactMatch(const QString& s) const; | ||
35 | 36 | | |||
36 | void rebuildCacheFromFilterList(const QStringList& filters); | 37 | void rebuildCacheFromFilterList(const QStringList& filters); | ||
37 | 38 | | |||
38 | private: | 39 | private: | ||
39 | QList<QRegularExpression> m_regexpCache; | 40 | QList<QRegularExpression> m_regexpCache; | ||
41 | QSet<QString> m_exactMatches; | ||||
40 | }; | 42 | }; | ||
41 | 43 | | |||
42 | #endif | 44 | #endif | ||
43 | 45 | |