| 1 | /* |
| 2 | This file is part of the KDE Baloo project. |
| 3 | SPDX-FileCopyrightText: 2015 Vishesh Handa <vhanda@kde.org> |
| 4 | |
| 5 | SPDX-License-Identifier: LGPL-2.1-or-later |
| 6 | */ |
| 7 | |
| 8 | #ifndef BALOO_ORPOSTINGITERATOR_H |
| 9 | #define BALOO_ORPOSTINGITERATOR_H |
| 10 | |
| 11 | #include "postingiterator.h" |
| 12 | #include <QVector> |
| 13 | |
| 14 | namespace Baloo { |
| 15 | |
| 16 | class BALOO_ENGINE_EXPORT OrPostingIterator : public PostingIterator |
| 17 | { |
| 18 | public: |
| 19 | explicit OrPostingIterator(const QVector<PostingIterator*>& iterators); |
| 20 | ~OrPostingIterator() override; |
| 21 | |
| 22 | quint64 next() override; |
| 23 | quint64 docId() const override; |
| 24 | quint64 skipTo(quint64 docId) override; |
| 25 | |
| 26 | private: |
| 27 | QVector<PostingIterator*> m_iterators; |
| 28 | quint64 m_docId; |
| 29 | quint64 m_nextId; |
| 30 | }; |
| 31 | } |
| 32 | |
| 33 | #endif // BALOO_ORPOSTINGITERATOR_H |
| 34 | |