1 | /* |
2 | SPDX-FileCopyrightText: 2015 Vishesh Handa <vhanda@kde.org> |
3 | |
4 | SPDX-License-Identifier: LGPL-2.1-or-later |
5 | */ |
6 | |
7 | #ifndef BALOO_POSTINGITERATOR_H |
8 | #define BALOO_POSTINGITERATOR_H |
9 | |
10 | #include <QVector> |
11 | #include "engine_export.h" |
12 | |
13 | namespace Baloo { |
14 | |
15 | /** |
16 | * A PostingIterator is an abstract base class which can be used to iterate |
17 | * over all the "postings" or "documents" which are particular term appears. |
18 | * |
19 | * All PostingIterators should iterate over a list of non-decreasing document ids. |
20 | */ |
21 | class BALOO_ENGINE_EXPORT PostingIterator |
22 | { |
23 | public: |
24 | virtual ~PostingIterator(); |
25 | |
26 | virtual quint64 next() = 0; |
27 | virtual quint64 docId() const = 0; |
28 | virtual quint64 skipTo(quint64 docId); |
29 | }; |
30 | } |
31 | |
32 | #endif // BALOO_POSTINGITERATOR_H |
33 | |