Brass::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 Brass::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 (BrassTable *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 (BrassTable *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 brass_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 brass_postlist.cc.

References LOGCALL_VOID.


Member Function Documentation

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

void PostlistChunkWriter::flush ( BrassTable table  ) 

void Brass::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 brass_postlist.cc.

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


Member Data Documentation

Definition at line 137 of file brass_postlist.cc.

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

Definition at line 135 of file brass_postlist.cc.

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

Definition at line 134 of file brass_postlist.cc.

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

Definition at line 130 of file brass_postlist.cc.

Referenced by append(), and flush().

Definition at line 131 of file brass_postlist.cc.

Referenced by append(), and flush().

Definition at line 128 of file brass_postlist.cc.

Referenced by append(), and flush().

Definition at line 132 of file brass_postlist.cc.

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

Definition at line 129 of file brass_postlist.cc.

Referenced by append(), and flush().


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

Documentation for Xapian (version 1.2.13).
Generated on 9 Jan 2013 by Doxygen 1.5.9.