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:

Collaboration graph
[legend]

List of all members.

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.
void raw_append (Xapian::docid first_did_, Xapian::docid current_did_, const string &s)
 Append a block of raw entries to this chunk.
void flush (ChertTable *table)
 Flush the chunk to the buffered table.

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 98 of file chert_postlist.cc.


Constructor & Destructor Documentation

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

Definition at line 310 of file chert_postlist.cc.

References LOGCALL_VOID.


Member Function Documentation

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

Append an entry to this chunk.

Definition at line 323 of file chert_postlist.cc.

References Assert, chunk, CHUNKSIZE, current_did, first_did, flush(), is_first_chunk, is_last_chunk, make_key(), orig_key, pack_uint(), started, and tname.

Referenced by ChertPostListTable::merge_changes().

void PostlistChunkWriter::flush ( ChertTable table  ) 

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 110 of file chert_postlist.cc.

References Assert, chunk, current_did, first_did, and started.


Member Data Documentation

Definition at line 137 of file chert_postlist.cc.

Referenced by append(), flush(), and raw_append().

Definition at line 135 of file chert_postlist.cc.

Referenced by append(), flush(), and raw_append().

Definition at line 134 of file chert_postlist.cc.

Referenced by append(), flush(), and raw_append().

Definition at line 130 of file chert_postlist.cc.

Referenced by append(), and flush().

Definition at line 131 of file chert_postlist.cc.

Referenced by append(), and flush().

Definition at line 128 of file chert_postlist.cc.

Referenced by append(), and flush().

Definition at line 132 of file chert_postlist.cc.

Referenced by append(), flush(), and raw_append().

Definition at line 129 of file chert_postlist.cc.

Referenced by append(), and flush().


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

Documentation for Xapian (version 1.2.9).
Generated on 10 May 2012 by Doxygen 1.5.9.