Changeset View
Changeset View
Standalone View
Standalone View
src/engine/phraseanditerator.h
Show All 16 Lines | |||||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
18 | * | 18 | * | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | #ifndef BALOO_PHRASEANDITERATOR_H | 21 | #ifndef BALOO_PHRASEANDITERATOR_H | ||
22 | #define BALOO_PHRASEANDITERATOR_H | 22 | #define BALOO_PHRASEANDITERATOR_H | ||
23 | 23 | | |||
24 | #include "postingiterator.h" | 24 | #include "postingiterator.h" | ||
25 | #include "vectorpositioninfoiterator.h" | ||||
25 | 26 | | |||
26 | #include <QVector> | 27 | #include <QVector> | ||
27 | 28 | | |||
28 | namespace Baloo { | 29 | namespace Baloo { | ||
29 | 30 | | |||
30 | class BALOO_ENGINE_EXPORT PhraseAndIterator : public PostingIterator | 31 | class BALOO_ENGINE_EXPORT PhraseAndIterator : public PostingIterator | ||
31 | { | 32 | { | ||
32 | public: | 33 | public: | ||
33 | explicit PhraseAndIterator(const QVector<PostingIterator*>& iterators); | 34 | explicit PhraseAndIterator(const QVector<VectorPositionInfoIterator*>& iterators); | ||
34 | ~PhraseAndIterator(); | 35 | ~PhraseAndIterator(); | ||
35 | 36 | | |||
36 | quint64 next() override; | 37 | quint64 next() override; | ||
37 | quint64 docId() const override; | 38 | quint64 docId() const override; | ||
38 | 39 | | |||
39 | private: | 40 | private: | ||
40 | QVector<PostingIterator*> m_iterators; | 41 | QVector<VectorPositionInfoIterator*> m_iterators; | ||
41 | quint64 m_docId; | 42 | quint64 m_docId; | ||
42 | 43 | | |||
43 | bool checkIfPositionsMatch(); | 44 | bool checkIfPositionsMatch(); | ||
44 | }; | 45 | }; | ||
45 | } | 46 | } | ||
46 | 47 | | |||
47 | #endif // BALOO_PHRASEANDITERATOR_H | 48 | #endif // BALOO_PHRASEANDITERATOR_H |