Class SearchIterator

Class Documentation

class SearchIterator

A interator on search result (an Entry)

SearchIterator are mostly thread safe:

  • Manipulating the iterator itself (increment it, …) is not thread safe. You should not share an iterator between different thread (and you probably don’t have use case for that)

  • Reading from two iterators (getPath, …) from two differents thread is ok. (ie: You can pass iterator from one thread to the other one)

Be aware that the referenced/pointed Entry is generated and stored in the iterator itself. Once the iterator is destructed or incremented/decremented, you must NOT use the Entry.

Public Types

using iterator_category = std::input_iterator_tag
using value_type = Entry
using pointer = Entry*
using reference = Entry&

Public Functions

SearchIterator()
SearchIterator(const SearchIterator &it)
SearchIterator &operator=(const SearchIterator &it)
SearchIterator(SearchIterator &&it)
SearchIterator &operator=(SearchIterator &&it)
~SearchIterator()
bool operator==(const SearchIterator &it) const
bool operator!=(const SearchIterator &it) const
SearchIterator &operator++()
SearchIterator operator++(int)
SearchIterator &operator--()
SearchIterator operator--(int)
std::string getPath() const
std::string getTitle() const
int getScore() const
std::string getSnippet() const
int getWordCount() const
int getSize() const
int getFileIndex() const
Uuid getZimId() const
reference operator*() const
pointer operator->() const

Friends

friend class zim::SearchResultSet