File indexing completed on 2024-05-19 09:38:09

0001 // clang-format off
0002 /*
0003  * This file is part of KDiff3
0004  *
0005  * SPDX-FileCopyrightText: 2021-2021 David Hallas, david@davidhallas.dk
0006  * SPDX-License-Identifier: GPL-2.0-or-later
0007 */
0008 // clang-format on
0009 
0010 #ifndef COMPOSITEIGNORELIST_H
0011 #define COMPOSITEIGNORELIST_H
0012 
0013 #include "IgnoreList.h"
0014 #include "DirectoryList.h"
0015 
0016 #include <memory>
0017 #include <vector>
0018 
0019 #include <QString>
0020 
0021 class CompositeIgnoreList : public IgnoreList
0022 {
0023   public:
0024     ~CompositeIgnoreList() override = default;
0025     void enterDir(const QString& dir, const DirectoryList& directoryList) override;
0026     [[nodiscard]] bool matches(const QString& dir, const QString& text, bool bCaseSensitive) const override;
0027     void addIgnoreList(std::unique_ptr<IgnoreList> ignoreList);
0028 
0029   private:
0030     std::vector<std::unique_ptr<IgnoreList>> m_ignoreLists;
0031 };
0032 
0033 #endif