File indexing completed on 2024-04-21 03:51:40
0001 /* 0002 This file is part of the KDE Baloo project. 0003 SPDX-FileCopyrightText: 2015 Vishesh Handa <vhanda@kde.org> 0004 0005 SPDX-License-Identifier: LGPL-2.1-or-later 0006 */ 0007 0008 #ifndef BALOO_PHRASEANDITERATOR_H 0009 #define BALOO_PHRASEANDITERATOR_H 0010 0011 #include "postingiterator.h" 0012 #include "vectorpositioninfoiterator.h" 0013 0014 #include <QVector> 0015 0016 namespace Baloo { 0017 0018 class BALOO_ENGINE_EXPORT PhraseAndIterator : public PostingIterator 0019 { 0020 public: 0021 explicit PhraseAndIterator(const QVector<VectorPositionInfoIterator*>& iterators); 0022 ~PhraseAndIterator(); 0023 0024 quint64 next() override; 0025 quint64 docId() const override; 0026 quint64 skipTo(quint64 docId) override; 0027 0028 private: 0029 QVector<VectorPositionInfoIterator*> m_iterators; 0030 quint64 m_docId; 0031 0032 BALOO_ENGINE_NO_EXPORT bool checkIfPositionsMatch(); 0033 }; 0034 } 0035 0036 #endif // BALOO_PHRASEANDITERATOR_H