clang-tools
7.0.0
|
Iterator is the interface for Query Tree node. More...
#include <Iterator.h>
Public Member Functions | |
virtual bool | reachedEnd () const =0 |
Returns true if all valid DocIDs were processed and hence the iterator is exhausted. More... | |
virtual void | advance ()=0 |
Moves to next valid DocID. More... | |
virtual void | advanceTo (DocID ID)=0 |
Moves to the first valid DocID which is equal or higher than given ID. More... | |
virtual DocID | peek () const =0 |
Returns the current element this iterator points to. More... | |
virtual | ~Iterator () |
Friends | |
llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, const Iterator &Iterator) |
Prints a convenient human-readable iterator representation by recursively dumping iterators in the following format: More... | |
Iterator is the interface for Query Tree node.
The simplest type of Iterator is DocumentIterator which is simply a wrapper around PostingList iterator and serves as the Query Tree leaf. More sophisticated examples of iterators can manage intersection, union of the elements produced by other iterators (their children) to form a multi-level Query Tree. The interface is designed to be extensible in order to support multiple types of iterators.
Definition at line 60 of file Iterator.h.
|
inlinevirtual |
Definition at line 85 of file Iterator.h.
|
pure virtual |
Moves to next valid DocID.
If it doesn't exist, the iterator is exhausted and proceeds to the END.
Note: reachedEnd() must be false.
Referenced by clang::clangd::dex::consume().
|
pure virtual |
Moves to the first valid DocID which is equal or higher than given ID.
If it doesn't exist, the iterator is exhausted and proceeds to the END.
Note: reachedEnd() must be false.
|
pure virtual |
Returns the current element this iterator points to.
Note: reachedEnd() must be false.
Referenced by clang::clangd::dex::consume().
|
pure virtual |
Returns true if all valid DocIDs were processed and hence the iterator is exhausted.
Referenced by clang::clangd::dex::consume().
|
friend |
Prints a convenient human-readable iterator representation by recursively dumping iterators in the following format:
(Type Child1 Child2 ...)
Where Type is the iterator type representation: "&" for And, "|" for Or, ChildN is N-th iterator child. Raw iterators over PostingList are represented as "[ID1, ID2, ...]" where IDN is N-th PostingList entry.
Definition at line 95 of file Iterator.h.