MyCompactor Class Reference

Inheritance diagram for MyCompactor:

Inheritance graph
[legend]
Collaboration diagram for MyCompactor:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 MyCompactor ()
void set_quiet (bool quiet_)
void set_status (const string &table, const string &status)
 Update progress.
string resolve_duplicate_metadata (const string &key, size_t n, const string tags[])
 Resolve multiple user metadata entries with the same key.

Private Attributes

bool quiet


Detailed Description

Definition at line 61 of file xapian-compact.cc.


Constructor & Destructor Documentation

MyCompactor::MyCompactor (  )  [inline]

Definition at line 65 of file xapian-compact.cc.


Member Function Documentation

string MyCompactor::resolve_duplicate_metadata ( const string &  key,
size_t  num_tags,
const string  tags[] 
) [virtual]

Resolve multiple user metadata entries with the same key.

When merging, if the same user metadata key is set in more than one input, then this method is called to allow this to be resolving in an appropriate way.

The default implementation just returns tags[0].

For multipass this will currently get called multiple times for the same key if there are duplicates to resolve in each pass, but this may change in the future.

Parameters:
key The metadata key with duplicate entries.
num_tags How many tags there are.
tags An array of num_tags strings containing the tags to merge.

Reimplemented from Xapian::Compactor.

Definition at line 89 of file xapian-compact.cc.

void MyCompactor::set_quiet ( bool  quiet_  )  [inline]

Definition at line 67 of file xapian-compact.cc.

References quiet.

Referenced by main().

void MyCompactor::set_status ( const string &  table,
const string &  status 
) [virtual]

Update progress.

Subclass this method if you want to get progress updates during compaction. This is called for each table first with empty status, And then one or more times with non-empty status.

The default implementation does nothing.

Parameters:
table The table currently being compacted.
status A status message.

Reimplemented from Xapian::Compactor.

Definition at line 78 of file xapian-compact.cc.

References quiet.


Member Data Documentation

bool MyCompactor::quiet [private]

Definition at line 62 of file xapian-compact.cc.

Referenced by set_quiet(), and set_status().


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.