File indexing completed on 2024-04-21 03:51:46
0001 /* 0002 This file is part of the KDE Baloo project. 0003 SPDX-FileCopyrightText: 2010 Sebastian Trueg <trueg@kde.org> 0004 0005 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0006 */ 0007 0008 #ifndef REGEXP_CACHE_H_ 0009 #define REGEXP_CACHE_H_ 0010 0011 #include <QList> 0012 #include <QSet> 0013 #include <QRegularExpression> 0014 0015 class RegExpCache 0016 { 0017 public: 0018 RegExpCache(); 0019 ~RegExpCache(); 0020 0021 bool exactMatch(const QString& s) const; 0022 0023 void rebuildCacheFromFilterList(const QStringList& filters); 0024 0025 private: 0026 QList<QRegularExpression> m_regexpCache; 0027 QSet<QString> m_exactMatches; 0028 }; 0029 0030 #endif