xapian-core  1.4.27
Public Member Functions | Private Attributes | List of all members
Chert::PostlistChunkWriter Class Reference

PostlistChunkWriter is a wrapper which acts roughly as an output iterator on a postlist chunk, taking care of the messy details. More...

+ Collaboration diagram for Chert::PostlistChunkWriter:

Public Member Functions

 PostlistChunkWriter (const string &orig_key_, bool is_first_chunk_, const string &tname_, bool is_last_chunk_)
 
void append (ChertTable *table, Xapian::docid did, Xapian::termcount wdf)
 Append an entry to this chunk. More...
 
void raw_append (Xapian::docid first_did_, Xapian::docid current_did_, const string &s)
 Append a block of raw entries to this chunk. More...
 
void flush (ChertTable *table)
 Flush the chunk to the buffered table. More...
 

Private Attributes

string orig_key
 
string tname
 
bool is_first_chunk
 
bool is_last_chunk
 
bool started
 
Xapian::docid first_did
 
Xapian::docid current_did
 
string chunk
 

Detailed Description

PostlistChunkWriter is a wrapper which acts roughly as an output iterator on a postlist chunk, taking care of the messy details.

It's intended to be used with deletion and replacing of entries, not for adding to the end, when it's not really needed.

Definition at line 93 of file chert_postlist.cc.

Constructor & Destructor Documentation

◆ PostlistChunkWriter()

PostlistChunkWriter::PostlistChunkWriter ( const string &  orig_key_,
bool  is_first_chunk_,
const string &  tname_,
bool  is_last_chunk_ 
)

Definition at line 305 of file chert_postlist.cc.

References LOGCALL_CTOR.

Member Function Documentation

◆ append()

void PostlistChunkWriter::append ( ChertTable table,
Xapian::docid  did,
Xapian::termcount  wdf 
)

◆ flush()

void PostlistChunkWriter::flush ( ChertTable table)

◆ raw_append()

void Chert::PostlistChunkWriter::raw_append ( Xapian::docid  first_did_,
Xapian::docid  current_did_,
const string &  s 
)
inline

Append a block of raw entries to this chunk.

Definition at line 105 of file chert_postlist.cc.

References Assert.

Member Data Documentation

◆ chunk

string Chert::PostlistChunkWriter::chunk
private

Definition at line 132 of file chert_postlist.cc.

Referenced by append(), flush(), make_start_of_chunk(), and make_start_of_first_chunk().

◆ current_did

Xapian::docid Chert::PostlistChunkWriter::current_did
private

Definition at line 130 of file chert_postlist.cc.

Referenced by append(), and flush().

◆ first_did

Xapian::docid Chert::PostlistChunkWriter::first_did
private

Definition at line 129 of file chert_postlist.cc.

Referenced by append(), and flush().

◆ is_first_chunk

bool Chert::PostlistChunkWriter::is_first_chunk
private

Definition at line 125 of file chert_postlist.cc.

Referenced by append(), and flush().

◆ is_last_chunk

bool Chert::PostlistChunkWriter::is_last_chunk
private

Definition at line 126 of file chert_postlist.cc.

Referenced by append(), and flush().

◆ orig_key

string Chert::PostlistChunkWriter::orig_key
private

Definition at line 123 of file chert_postlist.cc.

Referenced by append(), and flush().

◆ started

bool Chert::PostlistChunkWriter::started
private

Definition at line 127 of file chert_postlist.cc.

Referenced by append(), and flush().

◆ tname

string Chert::PostlistChunkWriter::tname
private

Definition at line 124 of file chert_postlist.cc.

Referenced by append(), and flush().


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