#include <serialisationcontext.h>
Public Member Functions | |
SerialisationContext (const SerialisationContext &other) | |
SerialisationContext & | operator= (const SerialisationContext &other) |
SerialisationContext () | |
void | register_weighting_scheme (const Xapian::Weight &wt) |
Register a weighting scheme with the context. | |
const Xapian::Weight * | get_weighting_scheme (const std::string &name) const |
void | register_posting_source (const Xapian::PostingSource &source) |
Register a user-defined posting source class. | |
const Xapian::PostingSource * | get_posting_source (const std::string &name) const |
This context is used to look up weighting schemes and posting sources when unserialising.
Xapian::SerialisationContext::SerialisationContext | ( | const SerialisationContext & | other | ) |
Copy the context.
The internals are reference counted, so copying is cheap.
Xapian::SerialisationContext::SerialisationContext | ( | ) |
Default constructor: makes a context with default settings.
The context will contain all standard weighting schemes and posting sources.
SerialisationContext& Xapian::SerialisationContext::operator= | ( | const SerialisationContext & | other | ) |
Assign to the context - the copy is shallow.
The internals are reference counted, so assignment is cheap.
void Xapian::SerialisationContext::register_weighting_scheme | ( | const Xapian::Weight & | wt | ) |
Register a weighting scheme with the context.
const Xapian::Weight* Xapian::SerialisationContext::get_weighting_scheme | ( | const std::string & | name | ) | const |
Get a weighting scheme given a name.
The returned weighting scheme is owned by the context object.
Returns NULL if the weighting scheme could not be found.
void Xapian::SerialisationContext::register_posting_source | ( | const Xapian::PostingSource & | source | ) |
Register a user-defined posting source class.
const Xapian::PostingSource* Xapian::SerialisationContext::get_posting_source | ( | const std::string & | name | ) | const |
Get a posting source given a name.
The returned posting source is owned by the context object.
Returns NULL if the posting source could not be found.