clang-tools 20.0.0git
Public Member Functions | List of all members
clang::clangd::dex::PostingList Class Reference

PostingList is the storage of DocIDs which can be inserted to the Query Tree as a leaf by constructing Iterator over the PostingList object. More...

#include <PostingList.h>

Public Member Functions

 PostingList (llvm::ArrayRef< DocID > Documents)
 
std::unique_ptr< Iteratoriterator (const Token *Tok=nullptr) const
 Constructs DocumentIterator over given posting list.
 
size_t bytes () const
 Returns in-memory size of external storage.
 

Detailed Description

PostingList is the storage of DocIDs which can be inserted to the Query Tree as a leaf by constructing Iterator over the PostingList object.

DocIDs are stored in underlying chunks. Compression saves memory at a small cost in access time, which is still fast enough in practice.

Definition at line 59 of file PostingList.h.

Constructor & Destructor Documentation

◆ PostingList()

clang::clangd::dex::PostingList::PostingList ( llvm::ArrayRef< DocID Documents)
explicit

Definition at line 218 of file PostingList.cpp.

Member Function Documentation

◆ bytes()

size_t clang::clangd::dex::PostingList::bytes ( ) const
inline

Returns in-memory size of external storage.

Definition at line 69 of file PostingList.h.

◆ iterator()

std::unique_ptr< Iterator > clang::clangd::dex::PostingList::iterator ( const Token Tok = nullptr) const

Constructs DocumentIterator over given posting list.

DocumentIterator will go through the chunks and decompress them on-the-fly when necessary. If given, Tok is only used for the string representation.

Definition at line 221 of file PostingList.cpp.


The documentation for this class was generated from the following files: