File indexing completed on 2024-05-19 04:23:36
0001 /* SPDX-FileCopyrightText: 2003-2010 Jesper K. Pedersen <blackie@kde.org> 0002 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef NEGATIONCATEGORYMATCHER_H 0007 #define NEGATIONCATEGORYMATCHER_H 0008 0009 #include "CategoryMatcher.h" 0010 0011 namespace DB 0012 { 0013 0014 /** 0015 * NegationCategoryMatcher matches, if (and only if) its child matcher does not match. 0016 * 0017 * This is not a standard ContainerCategoryMatcher, because it always has exactly one child. 0018 */ 0019 class NegationCategoryMatcher : public CategoryMatcher 0020 { 0021 public: 0022 explicit NegationCategoryMatcher(CategoryMatcher *child); 0023 ~NegationCategoryMatcher() override; 0024 bool eval(ImageInfoPtr, QMap<QString, StringSet> &alreadyMatched) override; 0025 void debug(int level) const override; 0026 void setShouldCreateMatchedSet(bool b) override; 0027 0028 private: 0029 CategoryMatcher *m_child; 0030 }; 0031 } 0032 0033 #endif // NEGATIONCATEGORYMATCHER_H 0034 0035 // vi:expandtab:tabstop=4 shiftwidth=4: