xapian-core  1.4.25
Public Member Functions | Private Attributes | List of all members
Glass::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 Glass::PostlistChunkWriter:

Public Member Functions

 PostlistChunkWriter (const string &orig_key_, bool is_first_chunk_, const string &tname_, bool is_last_chunk_)
 
void append (GlassTable *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 (GlassTable *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 234 of file glass_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 334 of file glass_postlist.cc.

References LOGCALL_CTOR.

Member Function Documentation

◆ append()

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

◆ flush()

void PostlistChunkWriter::flush ( GlassTable table)

◆ raw_append()

void Glass::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 246 of file glass_postlist.cc.

References Assert.

Member Data Documentation

◆ chunk

string Glass::PostlistChunkWriter::chunk
private

Definition at line 273 of file glass_postlist.cc.

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

◆ current_did

Xapian::docid Glass::PostlistChunkWriter::current_did
private

Definition at line 271 of file glass_postlist.cc.

Referenced by append(), and flush().

◆ first_did

Xapian::docid Glass::PostlistChunkWriter::first_did
private

Definition at line 270 of file glass_postlist.cc.

Referenced by append(), and flush().

◆ is_first_chunk

bool Glass::PostlistChunkWriter::is_first_chunk
private

Definition at line 266 of file glass_postlist.cc.

Referenced by append(), and flush().

◆ is_last_chunk

bool Glass::PostlistChunkWriter::is_last_chunk
private

Definition at line 267 of file glass_postlist.cc.

Referenced by append(), and flush().

◆ orig_key

string Glass::PostlistChunkWriter::orig_key
private

Definition at line 264 of file glass_postlist.cc.

Referenced by append(), and flush().

◆ started

bool Glass::PostlistChunkWriter::started
private

Definition at line 268 of file glass_postlist.cc.

Referenced by append(), and flush().

◆ tname

string Glass::PostlistChunkWriter::tname
private

Definition at line 265 of file glass_postlist.cc.

Referenced by append(), and flush().


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